From 52e69d78eee5612ac195e0701a5cebe40d1ab0e1 Mon Sep 17 00:00:00 2001 From: kan Date: Wed, 26 Mar 2003 18:12:01 +0000 Subject: Remove files incidentally imported from the wrong place during 3.2.1 import. They are not used by any of our system GCC versions and will be physically removed from repository soon. Reviewed by: obrien --- contrib/gcc/FAQ | 653 ---- contrib/gcc/GNATS | 187 - contrib/gcc/MAINTAINERS | 254 -- contrib/gcc/bugs.html | 698 ---- contrib/gcc/config-ml.in | 871 ----- contrib/gcc/config.if | 79 - contrib/gcc/config.sub | 1450 ------- contrib/gcc/config/ChangeLog | 477 --- contrib/gcc/config/acinclude.m4 | 1995 ---------- contrib/gcc/config/mh-a68bsd | 12 - contrib/gcc/config/mh-aix386 | 1 - contrib/gcc/config/mh-apollo68 | 3 - contrib/gcc/config/mh-armpic | 1 - contrib/gcc/config/mh-cxux | 14 - contrib/gcc/config/mh-cygwin | 6 - contrib/gcc/config/mh-decstation | 5 - contrib/gcc/config/mh-delta88 | 4 - contrib/gcc/config/mh-dgux | 4 - contrib/gcc/config/mh-dgux386 | 22 - contrib/gcc/config/mh-djgpp | 14 - contrib/gcc/config/mh-elfalphapic | 1 - contrib/gcc/config/mh-hp300 | 13 - contrib/gcc/config/mh-hpux | 4 - contrib/gcc/config/mh-hpux8 | 4 - contrib/gcc/config/mh-i370pic | 1 - contrib/gcc/config/mh-ia64pic | 1 - contrib/gcc/config/mh-interix | 14 - contrib/gcc/config/mh-irix4 | 7 - contrib/gcc/config/mh-irix5 | 3 - contrib/gcc/config/mh-irix6 | 3 - contrib/gcc/config/mh-lynxos | 2 - contrib/gcc/config/mh-lynxrs6k | 8 - contrib/gcc/config/mh-m68kpic | 1 - contrib/gcc/config/mh-mingw32 | 12 - contrib/gcc/config/mh-ncr3000 | 17 - contrib/gcc/config/mh-ncrsvr43 | 9 - contrib/gcc/config/mh-necv4 | 11 - contrib/gcc/config/mh-openedition | 2 - contrib/gcc/config/mh-papic | 1 - contrib/gcc/config/mh-ppcpic | 1 - contrib/gcc/config/mh-riscos | 15 - contrib/gcc/config/mh-sco | 10 - contrib/gcc/config/mh-solaris | 6 - contrib/gcc/config/mh-sparcpic | 1 - contrib/gcc/config/mh-sun3 | 3 - contrib/gcc/config/mh-sysv | 3 - contrib/gcc/config/mh-sysv4 | 11 - contrib/gcc/config/mh-sysv5 | 8 - contrib/gcc/config/mh-vaxult2 | 2 - contrib/gcc/config/mh-x86pic | 1 - contrib/gcc/config/mpw-mh-mpw | 157 - contrib/gcc/config/mpw/ChangeLog | 81 - contrib/gcc/config/mpw/MoveIfChange | 19 - contrib/gcc/config/mpw/README | 23 - contrib/gcc/config/mpw/forward-include | 3 - contrib/gcc/config/mpw/g-mpw-make.sed | 293 -- contrib/gcc/config/mpw/mpw-touch | 7 - contrib/gcc/config/mpw/mpw-true | 1 - contrib/gcc/config/mpw/null-command | 1 - contrib/gcc/config/mpw/open-brace | 4 - contrib/gcc/config/mpw/tr-7to8-src | 9 - contrib/gcc/config/mpw/true | 1 - contrib/gcc/config/mt-aix43 | 4 - contrib/gcc/config/mt-alphaieee | 2 - contrib/gcc/config/mt-armpic | 1 - contrib/gcc/config/mt-d30v | 4 - contrib/gcc/config/mt-elfalphapic | 1 - contrib/gcc/config/mt-i370pic | 1 - contrib/gcc/config/mt-ia64pic | 1 - contrib/gcc/config/mt-linux | 1 - contrib/gcc/config/mt-m68kpic | 1 - contrib/gcc/config/mt-netware | 1 - contrib/gcc/config/mt-ospace | 3 - contrib/gcc/config/mt-papic | 1 - contrib/gcc/config/mt-ppcpic | 1 - contrib/gcc/config/mt-sparcpic | 1 - contrib/gcc/config/mt-v810 | 4 - contrib/gcc/config/mt-wince | 10 - contrib/gcc/config/mt-x86pic | 1 - contrib/gcc/contrib/ChangeLog | 721 ---- contrib/gcc/contrib/analyze_brprob | 146 - contrib/gcc/contrib/compare_tests | 98 - contrib/gcc/contrib/convert_to_f2c | 48 - contrib/gcc/contrib/convert_to_g2c | 48 - contrib/gcc/contrib/download_f2c | 77 - contrib/gcc/contrib/gcc_build | 316 -- contrib/gcc/contrib/gcc_update | 226 -- contrib/gcc/contrib/gccbug.el | 84 - contrib/gcc/contrib/gennews | 56 - contrib/gcc/contrib/index-prop | 26 - contrib/gcc/contrib/newcvsroot | 34 - contrib/gcc/contrib/regression/ChangeLog | 37 - contrib/gcc/contrib/regression/README | 18 - contrib/gcc/contrib/regression/btest-gcc.sh | 172 - contrib/gcc/contrib/regression/objs-gcc.sh | 121 - contrib/gcc/contrib/regression/site.exp | 18 - contrib/gcc/contrib/test_installed | 114 - contrib/gcc/contrib/test_summary | 142 - contrib/gcc/contrib/texi2pod.pl | 427 --- contrib/gcc/contrib/warn_summary | 210 - contrib/gcc/faq.html | 698 ---- contrib/gcc/gnats.html | 170 - contrib/gcc/include/COPYING | 340 -- contrib/gcc/include/ChangeLog | 1960 ---------- contrib/gcc/include/ansidecl.h | 295 -- contrib/gcc/include/demangle.h | 163 - contrib/gcc/include/dyn-string.h | 92 - contrib/gcc/include/fibheap.h | 81 - contrib/gcc/include/floatformat.h | 122 - contrib/gcc/include/fnmatch.h | 70 - contrib/gcc/include/getopt.h | 141 - contrib/gcc/include/hashtab.h | 155 - contrib/gcc/include/libiberty.h | 317 -- contrib/gcc/include/md5.h | 142 - contrib/gcc/include/objalloc.h | 115 - contrib/gcc/include/obstack.h | 599 --- contrib/gcc/include/partition.h | 81 - contrib/gcc/include/safe-ctype.h | 103 - contrib/gcc/include/sort.h | 48 - contrib/gcc/include/splay-tree.h | 154 - contrib/gcc/include/symcat.h | 49 - contrib/gcc/include/ternary.h | 51 - contrib/gcc/include/xregex.h | 28 - contrib/gcc/include/xregex2.h | 571 --- contrib/gcc/install-sh | 251 -- contrib/gcc/libtool.m4 | 854 ----- contrib/gcc/ltcf-c.sh | 815 ---- contrib/gcc/ltcf-cxx.sh | 1005 ----- contrib/gcc/ltcf-gcj.sh | 651 ---- contrib/gcc/ltconfig | 2795 -------------- contrib/gcc/ltmain.sh | 5483 --------------------------- contrib/gcc/missing | 190 - contrib/gcc/mkdep | 87 - contrib/gcc/mkinstalldirs | 36 - contrib/gcc/symlink-tree | 53 - contrib/gcc/ylwrap | 123 - 136 files changed, 29589 deletions(-) delete mode 100644 contrib/gcc/FAQ delete mode 100644 contrib/gcc/GNATS delete mode 100644 contrib/gcc/MAINTAINERS delete mode 100644 contrib/gcc/bugs.html delete mode 100644 contrib/gcc/config-ml.in delete mode 100644 contrib/gcc/config.if delete mode 100755 contrib/gcc/config.sub delete mode 100644 contrib/gcc/config/ChangeLog delete mode 100644 contrib/gcc/config/acinclude.m4 delete mode 100644 contrib/gcc/config/mh-a68bsd delete mode 100644 contrib/gcc/config/mh-aix386 delete mode 100644 contrib/gcc/config/mh-apollo68 delete mode 100644 contrib/gcc/config/mh-armpic delete mode 100644 contrib/gcc/config/mh-cxux delete mode 100644 contrib/gcc/config/mh-cygwin delete mode 100644 contrib/gcc/config/mh-decstation delete mode 100644 contrib/gcc/config/mh-delta88 delete mode 100644 contrib/gcc/config/mh-dgux delete mode 100644 contrib/gcc/config/mh-dgux386 delete mode 100644 contrib/gcc/config/mh-djgpp delete mode 100644 contrib/gcc/config/mh-elfalphapic delete mode 100644 contrib/gcc/config/mh-hp300 delete mode 100644 contrib/gcc/config/mh-hpux delete mode 100644 contrib/gcc/config/mh-hpux8 delete mode 100644 contrib/gcc/config/mh-i370pic delete mode 100644 contrib/gcc/config/mh-ia64pic delete mode 100644 contrib/gcc/config/mh-interix delete mode 100644 contrib/gcc/config/mh-irix4 delete mode 100644 contrib/gcc/config/mh-irix5 delete mode 100644 contrib/gcc/config/mh-irix6 delete mode 100644 contrib/gcc/config/mh-lynxos delete mode 100644 contrib/gcc/config/mh-lynxrs6k delete mode 100644 contrib/gcc/config/mh-m68kpic delete mode 100644 contrib/gcc/config/mh-mingw32 delete mode 100644 contrib/gcc/config/mh-ncr3000 delete mode 100644 contrib/gcc/config/mh-ncrsvr43 delete mode 100644 contrib/gcc/config/mh-necv4 delete mode 100644 contrib/gcc/config/mh-openedition delete mode 100644 contrib/gcc/config/mh-papic delete mode 100644 contrib/gcc/config/mh-ppcpic delete mode 100644 contrib/gcc/config/mh-riscos delete mode 100644 contrib/gcc/config/mh-sco delete mode 100644 contrib/gcc/config/mh-solaris delete mode 100644 contrib/gcc/config/mh-sparcpic delete mode 100644 contrib/gcc/config/mh-sun3 delete mode 100644 contrib/gcc/config/mh-sysv delete mode 100644 contrib/gcc/config/mh-sysv4 delete mode 100644 contrib/gcc/config/mh-sysv5 delete mode 100644 contrib/gcc/config/mh-vaxult2 delete mode 100644 contrib/gcc/config/mh-x86pic delete mode 100644 contrib/gcc/config/mpw-mh-mpw delete mode 100644 contrib/gcc/config/mpw/ChangeLog delete mode 100644 contrib/gcc/config/mpw/MoveIfChange delete mode 100644 contrib/gcc/config/mpw/README delete mode 100644 contrib/gcc/config/mpw/forward-include delete mode 100644 contrib/gcc/config/mpw/g-mpw-make.sed delete mode 100644 contrib/gcc/config/mpw/mpw-touch delete mode 100644 contrib/gcc/config/mpw/mpw-true delete mode 100644 contrib/gcc/config/mpw/null-command delete mode 100644 contrib/gcc/config/mpw/open-brace delete mode 100644 contrib/gcc/config/mpw/tr-7to8-src delete mode 100644 contrib/gcc/config/mpw/true delete mode 100644 contrib/gcc/config/mt-aix43 delete mode 100644 contrib/gcc/config/mt-alphaieee delete mode 100644 contrib/gcc/config/mt-armpic delete mode 100644 contrib/gcc/config/mt-d30v delete mode 100644 contrib/gcc/config/mt-elfalphapic delete mode 100644 contrib/gcc/config/mt-i370pic delete mode 100644 contrib/gcc/config/mt-ia64pic delete mode 100644 contrib/gcc/config/mt-linux delete mode 100644 contrib/gcc/config/mt-m68kpic delete mode 100644 contrib/gcc/config/mt-netware delete mode 100644 contrib/gcc/config/mt-ospace delete mode 100644 contrib/gcc/config/mt-papic delete mode 100644 contrib/gcc/config/mt-ppcpic delete mode 100644 contrib/gcc/config/mt-sparcpic delete mode 100644 contrib/gcc/config/mt-v810 delete mode 100644 contrib/gcc/config/mt-wince delete mode 100644 contrib/gcc/config/mt-x86pic delete mode 100644 contrib/gcc/contrib/ChangeLog delete mode 100755 contrib/gcc/contrib/analyze_brprob delete mode 100755 contrib/gcc/contrib/compare_tests delete mode 100755 contrib/gcc/contrib/convert_to_f2c delete mode 100755 contrib/gcc/contrib/convert_to_g2c delete mode 100755 contrib/gcc/contrib/download_f2c delete mode 100755 contrib/gcc/contrib/gcc_build delete mode 100755 contrib/gcc/contrib/gcc_update delete mode 100644 contrib/gcc/contrib/gccbug.el delete mode 100755 contrib/gcc/contrib/gennews delete mode 100755 contrib/gcc/contrib/index-prop delete mode 100755 contrib/gcc/contrib/newcvsroot delete mode 100644 contrib/gcc/contrib/regression/ChangeLog delete mode 100644 contrib/gcc/contrib/regression/README delete mode 100755 contrib/gcc/contrib/regression/btest-gcc.sh delete mode 100755 contrib/gcc/contrib/regression/objs-gcc.sh delete mode 100644 contrib/gcc/contrib/regression/site.exp delete mode 100755 contrib/gcc/contrib/test_installed delete mode 100755 contrib/gcc/contrib/test_summary delete mode 100755 contrib/gcc/contrib/texi2pod.pl delete mode 100755 contrib/gcc/contrib/warn_summary delete mode 100644 contrib/gcc/faq.html delete mode 100644 contrib/gcc/gnats.html delete mode 100644 contrib/gcc/include/COPYING delete mode 100644 contrib/gcc/include/ChangeLog delete mode 100644 contrib/gcc/include/ansidecl.h delete mode 100644 contrib/gcc/include/demangle.h delete mode 100644 contrib/gcc/include/dyn-string.h delete mode 100644 contrib/gcc/include/fibheap.h delete mode 100644 contrib/gcc/include/floatformat.h delete mode 100644 contrib/gcc/include/fnmatch.h delete mode 100644 contrib/gcc/include/getopt.h delete mode 100644 contrib/gcc/include/hashtab.h delete mode 100644 contrib/gcc/include/libiberty.h delete mode 100644 contrib/gcc/include/md5.h delete mode 100644 contrib/gcc/include/objalloc.h delete mode 100644 contrib/gcc/include/obstack.h delete mode 100644 contrib/gcc/include/partition.h delete mode 100644 contrib/gcc/include/safe-ctype.h delete mode 100644 contrib/gcc/include/sort.h delete mode 100644 contrib/gcc/include/splay-tree.h delete mode 100644 contrib/gcc/include/symcat.h delete mode 100644 contrib/gcc/include/ternary.h delete mode 100644 contrib/gcc/include/xregex.h delete mode 100644 contrib/gcc/include/xregex2.h delete mode 100755 contrib/gcc/install-sh delete mode 100644 contrib/gcc/libtool.m4 delete mode 100644 contrib/gcc/ltcf-c.sh delete mode 100644 contrib/gcc/ltcf-cxx.sh delete mode 100644 contrib/gcc/ltcf-gcj.sh delete mode 100755 contrib/gcc/ltconfig delete mode 100644 contrib/gcc/ltmain.sh delete mode 100755 contrib/gcc/missing delete mode 100755 contrib/gcc/mkdep delete mode 100755 contrib/gcc/mkinstalldirs delete mode 100755 contrib/gcc/symlink-tree delete mode 100755 contrib/gcc/ylwrap (limited to 'contrib/gcc') diff --git a/contrib/gcc/FAQ b/contrib/gcc/FAQ deleted file mode 100644 index a40c0f9..0000000 --- a/contrib/gcc/FAQ +++ /dev/null @@ -1,653 +0,0 @@ - - GCC Frequently Asked Questions - - The latest version of this document is always available at - [1]http://www.gnu.org/software/gcc/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. - _________________________________________________________________ - - Questions - - 1. [7]General information - 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? - 3. [24]How can I run the test suite with multiple options? - 4. [25]Older versions of GCC - 1. [26]Is there a stringstream / sstream for GCC 2.95.2? - 5. [27]Miscellaneous - 1. [28]Virtual memory exhausted - 2. [29]Friend Templates - 3. [30]dynamic_cast, throw, typeid don't work with shared - libraries - 4. [31]Why do I need autoconf, bison, xgettext, automake, etc? - 5. [32]Why can't I build a shared library? - 6. [33]How to work around too long C++ symbol names? - (-fsquangle) - 7. [34]When building C++, the linker says my constructors, - destructors or virtual tables are undefined, but I defined - them - 8. [35]Will GCC someday include an incremental linker? - _________________________________________________________________ - - General information - -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 - [36]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 [37]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 [38][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 ``[39]The Cathedral and the Bazaar''. The paper is a useful - starting point for discussions. - _________________________________________________________________ - -How do I report a bug? - - There are complete instructions [40]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. - * [41]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 - [42]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 [43]latest version is always - available at the GCC web site. Reports of [44]successful builds for - several versions of GCC are also available at the web site. - _________________________________________________________________ - - Installation - -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, [45]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 - - This should result in GCC being installed as /usr/local/bin/gcc-2.95.2 - instead of /usr/local/bin/gcc. - _________________________________________________________________ - -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 asembler 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 [46]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. - - Also note '::' in these paths will also cause similar problems. - _________________________________________________________________ - -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 - [47]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++ - _________________________________________________________________ - -How can I run the test suite with multiple options? - - If you invoke runtest directly, you can use the --target_board option, - 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. - _________________________________________________________________ - - Older versions of GCC and EGCS - -Is there a stringstream / sstream for GCC 2.95.2? - - Yes, it's at: - [48]http://gcc.gnu.org/ml/libstdc++/2000-q2/msg00700/sstream. - _________________________________________________________________ - - Miscellaneous - -Virtual memory exhausted error - - This error means your system ran out of memory; this can happen for - large files, particularly when optimizing. If you're getting this - error you should consider trying to simplify your files or reducing - the optimization level. - - Note that using -pedantic or -Wreturn-type can cause an explosion in - the amount of memory needed for template-heavy C++ code, such as code - that uses STL. Also note that -Wall includes -Wreturn-type, so if you - use -Wall you will need to specify -Wno-return-type to turn it off. - _________________________________________________________________ - -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; - -template -void bar(foo); - -template -class foo { - friend void bar<>(foo); -}; - -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 with shared libraries - - 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 [49]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 - [50]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 - [51]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 - _________________________________________________________________ - -How to work around too long C++ symbol names (-fsquangle) - - This question does not apply to GCC 3.0 or later versions, which have - a new C++ ABI with much shorter mangled names. - - If the standard assembler of your platform can't cope with the large - symbol names that the default g++ name mangling mechanism produces, - your best bet is to use GNU as, from the GNU binutils package. - - Unfortunately, GNU as does not support all platforms supported by GCC, - so you may have to use an experimental work-around: the -fsquangle - option, that enables compression of symbol names. - - Note that this option is still under development, and subject to - change. Since it modifies the name mangling mechanism, you'll need to - build libstdc++ and any other C++ libraries with this option enabled. - Furthermore, if this option changes its behavior in the future, you'll - have to rebuild them all again. :-( - - This option can be enabled by default by initializing - `flag_do_squangling' with `1' in `gcc/cp/decl2.c' (it is not - initialized by default), then rebuilding GCC and any C++ libraries. - _________________________________________________________________ - -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 - - 1. http://www.gnu.org/software/gcc/faq.html - 2. http://www.eskimo.com/~scs/C-faq/top.html - 3. http://www.research.att.com/~austern/csc/faq.html - 4. http://www.fortran.com/fortran/info.html - 5. http://gcc.gnu.org/onlinedocs/libstdc++/faq/index.html - 6. http://gcc.gnu.org/java/faq.html - 7. http://gcc.gnu.org/faq.html#general - 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 - 24. http://gcc.gnu.org/faq.html#multipletests - 25. http://gcc.gnu.org/faq.html#old - 26. http://gcc.gnu.org/faq.html#2.95sstream - 27. http://gcc.gnu.org/faq.html#misc - 28. http://gcc.gnu.org/faq.html#memexhausted - 29. http://gcc.gnu.org/faq.html#friend - 30. http://gcc.gnu.org/faq.html#dso - 31. http://gcc.gnu.org/faq.html#generated_files - 32. http://gcc.gnu.org/faq.html#picflag-needed - 33. http://gcc.gnu.org/faq.html#squangle - 34. http://gcc.gnu.org/faq.html#vtables - 35. http://gcc.gnu.org/faq.html#incremental - 36. http://gcc.gnu.org/steering.html - 37. http://gcc.gnu.org/steering.html - 38. http://gcc.gnu.org/faq.html#cathedral-vs-bazaar - 39. http://www.tuxedo.org/~esr/writings/cathedral-bazaar/ - 40. http://gcc.gnu.org/bugs.html - 41. http://gcc.gnu.org/bugs.html - 42. http://gcc.gnu.org/bugs.html - 43. http://gcc.gnu.org/install/specific.html - 44. http://gcc.gnu.org/buildstat.html - 45. http://gcc.gnu.org/faq.html#gas - 46. http://gcc.gnu.org/install/specific.html - 47. http://www.gnu.org/software/dejagnu/dejagnu.html - 48. http://gcc.gnu.org/ml/libstdc++/2000-q2/msg00700/sstream - 49. http://www.codesourcery.com/cxx-abi/ - 50. ftp://ftp.gnu.org/gnu/ - 51. ftp://gcc.gnu.org/pub/gcc/infrastructure/ diff --git a/contrib/gcc/GNATS b/contrib/gcc/GNATS deleted file mode 100644 index aa67bc9..0000000 --- a/contrib/gcc/GNATS +++ /dev/null @@ -1,187 +0,0 @@ - - Submitting Bug Reports using GNATS - -gnatsweb and gccbug - - GNATS, the GNU bug tracking system, is used to track GCC bug reports. - Before submitting a bug report, please read the [1]general - instructions. - - The preferred way to submit a bug report is by means of the - [2]gnatsweb interface. Make sure you include an e-mail address, so we - can inform you when the status of your report changes. - - Another way is to use the gccbug program that is automatically - installed with current versions of GCC, which submits the bug report - by e-mail. - - Both techniques use the same GNATS bug database. - -Filling out a report - - The bug report form provides a number of fields; you'll need to - fill-out most of those (as indicated below) to provide a complete - report. The fields have the following purpose: - - Originator - Your name. - - Organization - Your organization. You can leave this field blank. - - Confidential - This field is unused and set to 'no'. All bug reports, - including sample code, are publicly accessible. - - Synopsis - A one-line description of the problem; something like "GCC 2.95 - does not foo", "objc crashes when doing bar". - - Severity - Can be one of - - critical - GCC is completely not operational; no work-around known. - - serious - GCC is not working properly; a work-around is possible. - - non-critical - Report indicates minor problem. - - Priority - Can be one of - - high - A solution is necessary as soon as possible. This is - reserved to GCC maintainers. - - medium - The problem should be solved in the next release. - - low - The problem should be solved in a future release. - - Category - This indicates the GCC subproject which is affected by the - problem. Currently, it can be one of - - ada - A problem with the Ada compiler, libraries or tools. - - bootstrap - GCC fails to bootstrap. This should be filed only if a - bootstrap failure prevails for an extended period of time - (at least one week) on any platform (and possibly - not-so-common conditions like a read-only srcdir), or - non-mainstream platforms. - - c++ - A problem with the C++ compiler. - - c - A problem with the C compiler. - - debug - A problem with generating debugging information. - - fortran - A problem with the Fortran compiler. - - java - A problem with the Java compiler. - - libf2c - A problem in the Fortran runtime library. - - libgcj - A problem in the Java runtime library. - - libobjc - A problem in the Objective C runtime library. - - libstdc++ - A problem in the Standard C++ runtime library. - - middle-end - A problem in the internal compiler passes. - - objc - A problem with the Objective C compiler. - - optimization - A problem only occurring under optimization. - - preprocessor - A problem with the C preprocessor. - - target - The problem depends on the specific target architecture. - - web - There is an error or omission on the Web pages. - - other - The problem is in none of these categories. - - Class - A classification of the problem; one of - - doc-bug - The documentation is incorrect. - - accepts-illegal - GCC fails to reject erroneous code. - - rejects-legal - GCC gives an error message for correct code. - - wrong-code - The machine code generated by GCC is incorrect. - - ice-on-legal-code - GCC gives an Internal Compiler Error (ICE) for correct - code. - - ice-on-illegal-code - GCC gives an ICE instead of reporting an error. - - pessimizes-code - GCC misses an important optimization opportunity. - - sw-bug - Software bug of some other class than above. - - change-request - A feature in GCC is missing. - - support - I need help with GCC. - - Release - GCC version, as obtained from 'gcc -v' (one line). - - Environment - Information about your operating system version, hardware - architecture, and environment settings that affect GCC. - - Description - Precise description of the problem. You should put the error - messages printed by GCC here; source code should go into the - next section. - - How-To-Repeat - Please put the complete source code to reproduce the problem - here. The gccbug script currently does not support file - attachments. Instead, if you have multiple files, include them - uuencoded (compressing them before if they are large). If you - use gnatsweb, you can use the file attachments button instead. - - Fix - How to correct or work around the problem, if known (multiple - lines). - -References - - 1. http://gcc.gnu.org/bugs.html - 2. http://gcc.gnu.org/cgi-bin/gnatsweb.pl?database=gcc&user=guest&password=guest&cmd=login diff --git a/contrib/gcc/MAINTAINERS b/contrib/gcc/MAINTAINERS deleted file mode 100644 index 805c439..0000000 --- a/contrib/gcc/MAINTAINERS +++ /dev/null @@ -1,254 +0,0 @@ -Note -==== - -This file contains information about people who are permitted to make -changes to various parts of the compiler and associated libraries. - -Please do not contact the people in this file directly to report -problems in GCC. - -For general information about GCC, please visit: - - http://gcc.gnu.org - -To report problems in GCC, please visit: - - http://gcc.gnu.org/bugs.html - -Maintainers -=========== - - Blanket Write Privs. - -John Carr jfc@mit.edu -Richard Earnshaw rearnsha@arm.com -Richard Henderson rth@redhat.com -Geoffrey Keating geoffk@geoffk.org -Richard Kenner kenner@nyu.edu -Jeff Law law@redhat.com -Jason Merrill jason@redhat.com -Michael Meissner meissner@redhat.com -David S. Miller davem@redhat.com -Mark Mitchell mark@codesourcery.com -Bernd Schmidt bernds@redhat.com -Jim Wilson wilson@redhat.com - - - CPU Port Maintainers (CPU alphabetical order) - -alpha port Richard Henderson rth@redhat.com -arc port Richard Kenner kenner@nyu.edu -arm port Nick Clifton nickc@redhat.com -arm port Richard Earnshaw rearnsha@arm.com -avr port Denis Chertykov denisc@overta.ru -avr port Marek Michalkiewicz marekm@linux.org.pl -c4x port Michael Hayes m.hayes@elec.canterbury.ac.nz -cris port Hans-Peter Nilsson hp@axis.com -fr30 port Nick Clifton nickc@redhat.com -h8 port Jeff Law law@redhat.com -h8 port Kazu Hirata kazu@cs.umass.edu -hppa port Jeff Law law@redhat.com -hppa port Dave Anglin dave.anglin@nrc.ca -i386 port Richard Henderson rth@redhat.com -i860 port Jason Eckhardt jle@redhat.com -i960 port Jim Wilson wilson@redhat.com -ia64 port Jim Wilson wilson@redhat.com -m32r port Nick Clifton nickc@redhat.com -m32r port Michael Meissner meissner@redhat.com -m68hc11 port Stephane Carrez stcarrez@nerim.fr -m68k port (?) Jeff Law law@redhat.com -m68k-motorola-sysv port Philippe De Muyter phdm@macqel.be -mcore port Nick Clifton nickc@redhat.com -mips port Eric Christopher echristo@redhat.com -mmix port Hans-Peter Nilsson hp@bitrange.com -mn10200 port Jeff Law law@redhat.com -mn10300 port Jeff Law law@redhat.com -mn10300 port Alexandre Oliva aoliva@redhat.com -rs6000 port Geoff Keating geoffk@geoffk.org -rs6000 port David Edelsohn dje@watson.ibm.com -s390 port Hartmut Penner hpenner@de.ibm.com -s390 port Ulrich Weigand uweigand@de.ibm.com -sh port Joern Rennecke joern.rennecke@superh.com -sh port Alexandre Oliva aoliva@redhat.com -sparc port Richard Henderson rth@redhat.com -sparc port David S. Miller davem@redhat.com -sparc port Jakub Jelinek jakub@redhat.com -v850 port Nick Clifton nickc@redhat.com -v850 port Michael Meissner meissner@redhat.com -vax port Dave Anglin dave.anglin@nrc.ca -x86-64 port Jan Hubicka jh@suse.cz -xstormy16 port Geoffrey Keating geoffk@geoffk.org -xtensa port Bob Wilson bob.wilson@acm.org - - OS Port Maintainers (OS alphabetical order) - -darwin port Stan Shebs shebs@apple.com -netbsd Jason Thorpe thorpej@wasabisystems.com -sco5, unixware, sco udk Robert Lipe robertlipe@usa.net - - Various Maintainers - -C front end/ISO C99 Joseph Myers jsm28@cam.ac.uk -C front end/ISO C99 Richard Henderson rth@redhat.com -Ada front end Geert Bosch bosch@gnat.com -Ada front end Robert Dewar dewar@gnat.com -fortran Richard Henderson rth@redhat.com -fortran Toon Moene toon@moene.indiv.nluug.nl -c++ Jason Merrill jason@redhat.com -c++ Mark Mitchell mark@codesourcery.com -cpplib Dave Brolley brolley@redhat.com -cpplib Per Bothner per@bothner.com -cpplib Zack Weinberg zack@codesourcery.com -cpplib Neil Booth neil@daikokuya.co.uk -java Per Bothner per@bothner.com -java Alexandre Petit-Bianco apbianco@redhat.com -mercury Fergus Henderson fjh@cs.mu.oz.au -objective-c Stan Shebs shebs@apple.com -objective-c Ovidiu Predescu ovidiu@cup.hp.com -alias analysis John Carr jfc@mit.edu -loop unrolling Jim Wilson wilson@redhat.com -loop discovery Michael Hayes m.hayes@elec.canterbury.ac.nz -scheduler (+ haifa) Jim Wilson wilson@redhat.com -scheduler (+ haifa) Michael Meissner meissner@redhat.com -scheduler (+ haifa) Jeff Law law@redhat.com -reorg Jeff Law law@redhat.com -caller-save.c Jeff Law law@redhat.com -debugging code Jim Wilson wilson@redhat.com -dwarf debugging code Jason Merrill jason@redhat.com -c++ runtime libs Paolo Carlini pcarlini@unitus.it -c++ runtime libs Gabriel Dos Reis gdr@integrable-solutions.net -c++ runtime libs Ulrich Drepper drepper@redhat.com -c++ runtime libs Phil Edwards pme@gcc.gnu.org -c++ runtime libs Benjamin Kosnik bkoz@redhat.com -*synthetic multiply Torbjorn Granlund tege@swox.com -*c-torture Torbjorn Granlund tege@swox.com -fixincludes Bruce Korb bkorb@gnu.org -gcse.c Jeff Law law@redhat.com -global opt framework Jeff Law law@redhat.com -jump.c David S. Miller davem@redhat.com -web pages Gerald Pfeifer pfeifer@dbai.tuwien.ac.at -config.sub/config.guess Ben Elliston config-patches@gnu.org -basic block reordering Jason Eckhardt jle@redhat.com -i18n Philipp Thomas pthomas@suse.de -diagnostic messages Gabriel Dos Reis gdr@integrable-solutions.net -windows, cygwin, mingw Christopher Faylor cgf@redhat.com -windows, cygwin, mingw DJ Delorie dj@redhat.com -DJGPP DJ Delorie dj@delorie.com -libiberty DJ Delorie dj@redhat.com -build machinery (*.in) DJ Delorie dj@redhat.com -build machinery (*.in) Alexandre Oliva aoliva@redhat.com -docs co-maintainer Gerald Pfeifer pfeifer@dbai.tuwien.ac.at -docs co-maintainer Joseph Myers jsm28@cam.ac.uk -Pico-Java port Steve Chamberlain sac@transmeta.com -RTEMS Ports Joel Sherrill -predict.def Jan Hubicka jh@suse.cz -contrib/regression Geoff Keating geoffk@geoffk.org - -Note individuals who maintain parts of the compiler need approval to check -in changes outside of the parts of the compiler they maintain. - - - Write After Approval (last name alphabetical order) - -Matt Austern austern@apple.com -Scott Bambrough scottb@netwinder.org -Daniel Berlin dan@dberlin.org -David Billinghurst David.Billinghurst@riotinto.com -Laurynas Biveinis lauras@softhome.net -Jim Blandy jimb@redhat.com -Phil Blundell pb@futuretv.com -Hans Boehm hboehm@gcc.gnu.org -Eric Botcazou ebotcazou@libertysurf.fr -Andrew Cagney cagney@redhat.com -Chandra Chavva cchavva@redhat.com -William Cohen wcohen@redhat.com -Chris Demetriou cgd@broadcom.com -*Paul Eggert eggert@twinsun.com -Ben Elliston bje@redhat.com -Marc Espie espie@cvs.openbsd.org -Doug Evans devans@transmeta.com -Kaveh Ghazi ghazi@caip.rutgers.edu -Matthew Gingell gingell@gnat.com -Anthony Green green@redhat.com -Stu Grossman grossman@redhat.com -Laurent Guerby guerby@acm.org -Andrew Haley aph@redhat.com -Stuart Hastings stuart@apple.com -Aldy Hernandez aldyh@redhat.com -Matthew Hiller hiller@redhat.com -Manfred Hollstein mhollstein@redhat.com -Andreas Jaeger aj@suse.de -Jakub Jelinek jakub@redhat.com -Dale Johannesen dalej@apple.com -Janis Johnson janis187@us.ibm.com -Klaus Kaempf kkaempf@progis.de -Brendan Kehoe brendan@zen.org -Mumit Khan khan@xraylith.wisc.edu -Matthias Klose doko@debian.org -Jeff Knaggs jknaggs@redhat.com -Matt Kraai kraai@alumni.carnegiemellon.edu -Ziemowit Laski zlaski@apple.com -Marc Lehmann pcg@goof.com -Alan Lehotsky apl@alum.mit.edu -Warren Levy warrenl@redhat.com -Kriang Lerdsuwanakij lerdsuwa@users.sourceforge.net -Don Lindsay dlindsay@redhat.com -Dave Love d.love@dl.ac.uk -Martin v. Löwis loewis@informatik.hu-berlin.de -*HJ Lu hjl@lucon.org -Andrew Macleod amacleod@redhat.com -Vladimir Makarov vmakarov@redhat.com -Michael Matz matz@suse.de -Greg McGary gkm@gnu.org -Bryce McKinlay bryce@gcc.gnu.org -Adam Megacz adam@xwt.org -Alan Modra amodra@bigpond.net.au -Toon Moene toon@moene.indiv.nluug.nl -Catherine Moore clm@redhat.com -Adam Nemet anemet@lnxw.com -Diego Novillo dnovillo@redhat.com -David O'Brien obrien@FreeBSD.org -Turly O'Connor turly@apple.com -Jeffrey D. Oldham oldham@codesourcery.com -Rainer Orth ro@TechFak.Uni-Bielefeld.DE -Devang Patel dpatel@apple.com -Nicola Pero n.pero@mi.flashnet.it -Alexandre Petit-Bianco apbianco@redhat.com -Clinton Popetz cpopetz@cpopetz.com -Ken Raeburn raeburn@redhat.com -Rolf Rasmussen rolfwr@gcc.gnu.org -Loren J. Rittle ljrittle@acm.org -Tom Rix trix@redhat.com -Craig Rodrigues rodrigc@gcc.gnu.org -Gavin Romig-Koch gavin@redhat.com -Ira Ruben ira@apple.com -Alex Samuel samuel@codesourcery.com -Richard Sandiford rsandifo@redhat.com -Roger Sayle roger@eyesopen.com -Bernd Schmidt bernds@redhat.com -Andreas Schwab schwab@suse.de -Stan Shebs shebs@apple.com -Nathan Sidwell nathan@acm.org -Franz Sirl franz.sirl-kernel@lauterbach.com -Danny Smith dannysmith@users.sourceforge.net -Michael Sokolov msokolov@ivan.Harhan.ORG -Richard Stallman rms@gnu.org -Graham Stott grahams@redhat.com -Mike Stump mrs@apple.com -Ian Taylor ian@zembu.com -Michael Tiemann tiemann@redhat.com -Philipp Thomas pthomas@suse.de -Kresten Krab Thorup krab@gcc.gnu.org -Tom Tromey tromey@redhat.com -John Wehle john@feith.com -Florian Weimer fw@deneb.enyo.de -Mark Wielaard mark@gcc.gnu.org - -GNATS only accounts - -James Dennett jdennett jdennett@acm.org - -Peter Bienstman(?) -Benjamin Chelf(?) -Mark Galassi(?) -Jeff Strum(?) diff --git a/contrib/gcc/bugs.html b/contrib/gcc/bugs.html deleted file mode 100644 index a8dab54..0000000 --- a/contrib/gcc/bugs.html +++ /dev/null @@ -1,698 +0,0 @@ - - - -GCC Bugs - - - -

GCC Bugs

- -

The latest version of this document is always available at -http://www.gnu.org/software/gcc/bugs.html.

- -
- -

Table of Contents

- - -
- -

Reporting Bugs

- -

Our preferred way of receiving bugs is via the -GCC GNATS bug reporting system.

- -

Before you report a bug, please check the -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

- -
    -
  • 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 or core 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 -GCC GNATS bug database. -Only if this is not possible, mail all information to -bug-gcc@gnu.org or -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 GCC GNATS bug -database.

- -

Detailed bug reporting instructions

- -

Please refer to the next section when reporting -bugs in GNAT, the Ada compiler.

- -

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, or (ii) if you've -reduced the testcase to a small file that doesn't include any -other file. 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 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 accoding to our generic instructions. -(If you use a mailing list for reporting, please include an -"[Ada]" tag in the subject.)

- -

Managing Bugs (GNATS and the test-suite)

- -

This section contains information mostly intended for GCC -contributors.

- -

If you find a bug, but you are not fixing it (yet):

-
    -
  1. Create a (minimal) test-case.
  2. -
  3. Add the test-case to our test-suite, marking it as XFAIL unless -the bug is a regression.
  4. -
  5. Add a bug report referencing the test-case to GNATS.
  6. -
- -

If you fix a bug for which there is already a GNATS entry:

-
    -
  1. Remove the XFAIL on the test-case.
  2. -
  3. Close the bug report in GNATS.
  4. -
- -

If you find a bug, and you are fixing it right then:

-
    -
  1. Create a (minimal) test-case.
  2. -
  3. Add the test-case to our test-suite, marking it as PASS.
  4. -
  5. Check in your fixes.
  6. -
- -
- -

Frequently Reported Bugs in GCC

- -

Fortran

- -

Fortran bugs are documented in the G77 manual rather than -explicitly listed here. Please see -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 <stdio.h>
-
-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 -GNU libc web pages -for details. -

- -
Cannot use preprocessor directive in macro arguments.
-

Let me guess... you wrote code that looks something like this:

-
-  memcpy(dest, src,
-#ifdef PLATFORM1
-	 12
-#else
-	 24
-#endif
-	);
-
-

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
-test.c:8: undefined or invalid # directive
-test.c:9: parse error before `24'
-test.c:10: undefined or invalid # directive
-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 <string.h> 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
-   memcpy(dest, src, 12);
-#else
-   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. 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 -http://www.ncits.org/cplusplus.htm).

- -

We have also implemented some of the core and library defect reports -(available at -http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/cwg_defects.html -& - -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. -<cstdlib> rather than <stdlib.h>). -The .h names are still available, but are deprecated.
  • - -
  • <strstream> is deprecated, use -<sstream> 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 forgotton 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

- -

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. -
  3. The base object constructor/destructor.
  4. -
  5. The allocating destructor/deallocating destructor.
  6. -
-

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 <iostream>
-
-int main() {
-
- double min = 0.0;
- double max = 0.5;
- double width = 0.01;
- std::cout << (int)(((max - min) / width) - 1) << - std::endl;
-
-}
-
-

might print 50 on some systems and optimization levels, and 51 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 -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

-

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();
-  A(int);
-  void func();
-};
-
-struct B{
-  B(A);
-  B(A,A);
-  void func();
-};
-
-void foo(){
-  B b(A(),A(1));     //Variable b, initialized with two temporaries
-  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));
-
-

-Another example is the parse error for the return -statement in

-
-struct A{};
-
-struct B{
-  A a;
-  A f1(bool);
-};
-
-A B::f1(bool b)
-{
-  if (b)
-    return (A()); 
-  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 --git a/contrib/gcc/config-ml.in b/contrib/gcc/config-ml.in deleted file mode 100644 index 16885f9..0000000 --- a/contrib/gcc/config-ml.in +++ /dev/null @@ -1,871 +0,0 @@ -# Configure fragment invoked in the post-target section for subdirs -# wanting multilib support. -# -# It is advisable to support a few --enable/--disable options to let the -# user select which libraries s/he really wants. -# -# Subdirectories wishing to use multilib should put the following lines -# in the "post-target" section of configure.in. -# -# if [ "${srcdir}" = "." ] ; then -# if [ "${with_target_subdir}" != "." ] ; then -# . ${with_multisrctop}../../config-ml.in -# else -# . ${with_multisrctop}../config-ml.in -# fi -# else -# . ${srcdir}/../config-ml.in -# fi -# -# -# Things are complicated because 6 separate cases must be handled: -# 2 (native, cross) x 3 (absolute-path, relative-not-dot, dot) = 6. -# -# srcdir=. is special. It must handle make programs that don't handle VPATH. -# To implement this, a symlink tree is built for each library and for each -# multilib subdir. -# -# The build tree is layed out as -# -# ./ -# newlib -# m68020/ -# newlib -# m68881/ -# newlib -# -# The nice feature about this arrangement is that inter-library references -# in the build tree work without having to care where you are. Note that -# inter-library references also work in the source tree because symlink trees -# are built when srcdir=. -# -# Unfortunately, trying to access the libraries in the build tree requires -# the user to manually choose which library to use as GCC won't be able to -# find the right one. This is viewed as the lesser of two evils. -# -# Configure variables: -# ${with_target_subdir} = "." for native, or ${target_alias} for cross. -# Set by top level Makefile. -# ${with_multisrctop} = how many levels of multilibs there are in the source -# tree. It exists to handle the case of configuring in the source tree: -# ${srcdir} is not constant. -# ${with_multisubdir} = name of multilib subdirectory (eg: m68020/m68881). -# -# Makefile variables: -# MULTISRCTOP = number of multilib levels in source tree (+1 if cross) -# (FIXME: note that this is different than ${with_multisrctop}. Check out.). -# MULTIBUILDTOP = number of multilib levels in build tree -# MULTIDIRS = list of multilib subdirs (eg: m68000 m68020 ...) -# (only defined in each library's main Makefile). -# MULTISUBDIR = installed subdirectory name with leading '/' (eg: /m68000) -# (only defined in each multilib subdir). - -# FIXME: Multilib is currently disabled by default for everything other than -# 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 -# -# We *could* figure srcdir and host out, but we'd have to do work that -# our caller has already done to figure them out and requiring these two -# seems reasonable. -# 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. - -ml_verbose=--verbose -for option in ${ml_arguments} -do - case $option in - --*) ;; - -*) option=-$option ;; - esac - - case $option in - --*=*) - optarg=`echo $option | sed -e 's/^[^=]*=//'` - ;; - esac - - case $option in - --disable-*) - enableopt=`echo ${option} | sed 's:^--disable-:enable_:;s:-:_:g'` - eval $enableopt=no - ;; - --enable-*) - case "$option" in - *=*) ;; - *) optarg=yes ;; - esac - enableopt=`echo ${option} | sed 's:^--::;s:=.*$::;s:-:_:g'` - eval $enableopt="$optarg" - ;; - --norecursion | --no*) - ml_norecursion=yes - ;; - --silent | --sil* | --quiet | --q*) - ml_verbose=--silent - ;; - --verbose | --v | --verb*) - ml_verbose=--verbose - ;; - --with-*) - case "$option" in - *=*) ;; - *) optarg=yes ;; - esac - withopt=`echo ${option} | sed 's:^--::;s:=.*$::;s:-:_:g'` - eval $withopt="$optarg" - ;; - --without-*) - withopt=`echo ${option} | sed 's:^--::;s:out::;s:-:_:g'` - eval $withopt=no - ;; - esac -done - -# Only do this if --enable-multilib. -if [ "${enable_multilib}" = yes ]; then - -# Compute whether this is the library's top level directory -# (ie: not a multilib subdirectory, and not a subdirectory like newlib/src). -# ${with_multisubdir} tells us we're in the right branch, but we could be -# in a subdir of that. -# ??? The previous version could void this test by separating the process into -# two files: one that only the library's toplevel configure.in ran (to -# configure the multilib subdirs), and another that all configure.in's ran to -# update the Makefile. It seemed reasonable to collapse all multilib support -# into one file, but it does leave us with having to perform this test. -ml_toplevel_p=no -if [ -z "${with_multisubdir}" ]; then - if [ "${srcdir}" = "." ]; then - # Use ${ml_realsrcdir} instead of ${srcdir} here to account for ${subdir}. - # ${with_target_subdir} = "." for native, otherwise target alias. - if [ "${with_target_subdir}" = "." ]; then - if [ -f ${ml_realsrcdir}/../config-ml.in ]; then - ml_toplevel_p=yes - fi - else - if [ -f ${ml_realsrcdir}/../../config-ml.in ]; then - ml_toplevel_p=yes - fi - fi - else - # Use ${ml_realsrcdir} instead of ${srcdir} here to account for ${subdir}. - if [ -f ${ml_realsrcdir}/../config-ml.in ]; then - ml_toplevel_p=yes - fi - fi -fi - -# If this is the library's top level directory, set multidirs to the -# multilib subdirs to support. This lives at the top because we need -# `multidirs' set right away. - -if [ "${ml_toplevel_p}" = yes ]; then - -multidirs= -for i in `${CC-gcc} --print-multi-lib 2>/dev/null`; do - dir=`echo $i | sed -e 's/;.*$//'` - if [ "${dir}" = "." ]; then - true - else - if [ -z "${multidirs}" ]; then - multidirs="${dir}" - else - multidirs="${multidirs} ${dir}" - fi - fi -done - -# Target libraries are configured for the host they run on, so we check -# $host here, not $target. - -case "${host}" in -arc-*-elf*) - if [ x$enable_biendian != xyes ] - then - old_multidirs=${multidirs} - multidirs="" - for x in ${old_multidirs}; do - case "${x}" in - *be*) : ;; - *) multidirs="${multidirs} ${x}" ;; - esac - done - fi - ;; -arm-*-*) - if [ x"$enable_fpu" = xno ] - then - old_multidirs=${multidirs} - multidirs="" - for x in ${old_multidirs}; do - case "${x}" in - *fpu*) : ;; - *) multidirs="${multidirs} ${x}" ;; - esac - done - fi - if [ x"$enable_26bit" = xno ] - then - old_multidirs=${multidirs} - multidirs="" - for x in ${old_multidirs}; do - case "${x}" in - *26bit*) : ;; - *) multidirs="${multidirs} ${x}" ;; - esac - done - fi - if [ x"$enable_underscore" = xno ] - then - old_multidirs=${multidirs} - multidirs="" - for x in ${old_multidirs}; do - case "${x}" in - *under*) : ;; - *) multidirs="${multidirs} ${x}" ;; - esac - done - fi - if [ x"$enable_interwork" = xno ] - then - old_multidirs=${multidirs} - multidirs="" - for x in ${old_multidirs}; do - case "${x}" in - *interwork*) : ;; - *) multidirs="${multidirs} ${x}" ;; - esac - done - fi - if [ x$enable_biendian = xno ] - then - old_multidirs="${multidirs}" - multidirs="" - for x in ${old_multidirs}; do - case "$x" in - *le* ) : ;; - *be* ) : ;; - *) multidirs="${multidirs} ${x}" ;; - esac - done - fi - if [ x"$enable_nofmult" = xno ] - then - old_multidirs="${multidirs}" - multidirs="" - for x in ${old_multidirs}; do - case "$x" in - *nofmult* ) : ;; - *) multidirs="${multidirs} ${x}" ;; - esac - done - fi - ;; -m68*-*-*) - if [ x$enable_softfloat = xno ] - then - old_multidirs="${multidirs}" - multidirs="" - for x in ${old_multidirs}; do - case "$x" in - *soft-float* ) : ;; - *) multidirs="${multidirs} ${x}" ;; - esac - done - fi - if [ x$enable_m68881 = xno ] - then - old_multidirs="${multidirs}" - multidirs="" - for x in ${old_multidirs}; do - case "$x" in - *m68881* ) : ;; - *) multidirs="${multidirs} ${x}" ;; - esac - done - fi - if [ x$enable_m68000 = xno ] - then - old_multidirs="${multidirs}" - multidirs="" - for x in ${old_multidirs}; do - case "$x" in - *m68000* ) : ;; - *) multidirs="${multidirs} ${x}" ;; - esac - done - fi - if [ x$enable_m68020 = xno ] - then - old_multidirs="${multidirs}" - multidirs="" - for x in ${old_multidirs}; do - case "$x" in - *m68020* ) : ;; - *) multidirs="${multidirs} ${x}" ;; - esac - done - fi - ;; -mips*-*-*) - if [ x$enable_single_float = xno ] - then - old_multidirs="${multidirs}" - multidirs="" - for x in ${old_multidirs}; do - case "$x" in - *single* ) : ;; - *) multidirs="${multidirs} ${x}" ;; - esac - done - fi - if [ x$enable_biendian = xno ] - then - old_multidirs="${multidirs}" - multidirs="" - for x in ${old_multidirs}; do - case "$x" in - *el* ) : ;; - *eb* ) : ;; - *) multidirs="${multidirs} ${x}" ;; - esac - done - fi - if [ x$enable_softfloat = xno ] - then - old_multidirs="${multidirs}" - multidirs="" - for x in ${old_multidirs}; do - case "$x" in - *soft-float* ) : ;; - *) multidirs="${multidirs} ${x}" ;; - esac - done - fi - case " $multidirs " in - *" mabi=64 "*) - # We will not be able to create libraries with -mabi=64 if - # we cannot even link a trivial program. It usually - # indicates the 64bit libraries are missing. - if echo 'main() {}' > conftest.c && - ${CC-gcc} -mabi=64 conftest.c -o conftest; then - : - else - echo Could not link program with -mabi=64, disabling it. - old_multidirs="${multidirs}" - multidirs="" - for x in ${old_multidirs}; do - case "$x" in - *mabi=64* ) : ;; - *) multidirs="${multidirs} ${x}" ;; - esac - done - fi - rm -f conftest.c conftest - ;; - esac - ;; -powerpc*-*-* | rs6000*-*-*) - if [ x$enable_aix64 = xno ] - then - old_multidirs="${multidirs}" - multidirs="" - for x in ${old_multidirs}; do - case "$x" in - *ppc64* ) : ;; - *) multidirs="${multidirs} ${x}" ;; - esac - done - fi - if [ x$enable_pthread = xno ] - then - old_multidirs="${multidirs}" - multidirs="" - for x in ${old_multidirs}; do - case "$x" in - *pthread* ) : ;; - *) multidirs="${multidirs} ${x}" ;; - esac - done - fi - if [ x$enable_softfloat = xno ] - then - old_multidirs="${multidirs}" - multidirs="" - for x in ${old_multidirs}; do - case "$x" in - *soft-float* ) : ;; - *) multidirs="${multidirs} ${x}" ;; - esac - done - fi - if [ x$enable_powercpu = xno ] - then - old_multidirs="${multidirs}" - multidirs="" - for x in ${old_multidirs}; do - case "$x" in - power | */power | */power/* ) : ;; - *) multidirs="${multidirs} ${x}" ;; - esac - done - fi - if [ x$enable_powerpccpu = xno ] - then - old_multidirs="${multidirs}" - multidirs="" - for x in ${old_multidirs}; do - case "$x" in - *powerpc* ) : ;; - *) multidirs="${multidirs} ${x}" ;; - esac - done - fi - if [ x$enable_powerpcos = xno ] - then - old_multidirs="${multidirs}" - multidirs="" - for x in ${old_multidirs}; do - case "$x" in - *mcall-linux* | *mcall-solaris* ) : ;; - *) multidirs="${multidirs} ${x}" ;; - esac - done - fi - if [ x$enable_biendian = xno ] - then - old_multidirs="${multidirs}" - multidirs="" - for x in ${old_multidirs}; do - case "$x" in - *mlittle* | *mbig* ) : ;; - *) multidirs="${multidirs} ${x}" ;; - esac - done - fi - if [ x$enable_sysv = xno ] - then - old_multidirs="${multidirs}" - multidirs="" - for x in ${old_multidirs}; do - case "$x" in - *mcall-sysv* ) : ;; - *) multidirs="${multidirs} ${x}" ;; - esac - done - fi - if [ x$enable_aix = xno ] - then - old_multidirs="${multidirs}" - multidirs="" - for x in ${old_multidirs}; do - case "$x" in - *mcall-aix* ) : ;; - *) multidirs="${multidirs} ${x}" ;; - esac - done - fi - ;; -sparc*-*-*) - case " $multidirs " in - *" m64 "*) - # We will not be able to create libraries with -m64 if - # we cannot even link a trivial program. It usually - # indicates the 64bit libraries are missing. - if echo 'main() {}' > conftest.c && - ${CC-gcc} -m64 conftest.c -o conftest; then - : - else - echo Could not link program with -m64, disabling it. - old_multidirs="${multidirs}" - multidirs="" - for x in ${old_multidirs}; do - case "$x" in - *m64* ) : ;; - *) multidirs="${multidirs} ${x}" ;; - esac - done - fi - rm -f conftest.c conftest - ;; - esac - ;; -esac - -# Remove extraneous blanks from multidirs. -# Tests like `if [ -n "$multidirs" ]' require it. -multidirs=`echo "$multidirs" | sed -e 's/^[ ][ ]*//' -e 's/[ ][ ]*$//' -e 's/[ ][ ]*/ /g'` - -# Add code to library's top level makefile to handle building the multilib -# subdirs. - -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 \ - dir=`echo $$i | sed -e 's/;.*$$//'`; \ - if [ "$${dir}" = "." ]; then \ - true; \ - else \ - if [ -d ../$${dir}/$${lib} ]; then \ - flags=`echo $$i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; \ - if (cd ../$${dir}/$${lib}; $(MAKE) $(FLAGS_TO_PASS) \ - CFLAGS="$(CFLAGS) $${flags}" \ - prefix="$(prefix)" \ - exec_prefix="$(exec_prefix)" \ - GCJFLAGS="$(GCJFLAGS) $${flags}" \ - CXXFLAGS="$(CXXFLAGS) $${flags}" \ - LIBCFLAGS="$(LIBCFLAGS) $${flags}" \ - LIBCXXFLAGS="$(LIBCXXFLAGS) $${flags}" \ - LDFLAGS="$(LDFLAGS) $${flags}" \ - $(DO)); then \ - true; \ - else \ - exit 1; \ - fi; \ - else true; \ - fi; \ - fi; \ - done; \ - fi - -# FIXME: There should be an @-sign in front of the `if'. -# Leave out until this is tested a bit more. -multi-clean: - 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)); \ - then true; \ - else exit 1; \ - fi; \ - else true; \ - fi; \ - done; \ - fi -EOF - -cat ${Makefile} Multi.tem > Makefile.tem -rm -f ${Makefile} Multi.tem -mv Makefile.tem ${Makefile} - -fi # ${ml_toplevel_p} = yes - -if [ "${ml_verbose}" = --verbose ]; then - echo "Adding multilib support to Makefile in ${ml_realsrcdir}" - if [ "${ml_toplevel_p}" = yes ]; then - echo "multidirs=${multidirs}" - fi - echo "with_multisubdir=${with_multisubdir}" -fi - -if [ "${srcdir}" = "." ]; then - if [ "${with_target_subdir}" != "." ]; then - ml_srcdotdot="../" - else - ml_srcdotdot="" - fi -else - ml_srcdotdot="" -fi - -if [ -z "${with_multisubdir}" ]; then - ml_subdir= - ml_builddotdot= - : # ml_srcdotdot= # already set -else - ml_subdir="/${with_multisubdir}" - # The '[^/][^/]*' appears that way to work around a SunOS sed bug. - ml_builddotdot=`echo ${with_multisubdir} | sed -e 's:[^/][^/]*:..:g'`/ - if [ "$srcdir" = "." ]; then - ml_srcdotdot=${ml_srcdotdot}${ml_builddotdot} - else - : # ml_srcdotdot= # already set - fi -fi - -if [ "${ml_toplevel_p}" = yes ]; then - ml_do='$(MAKE)' - ml_clean='$(MAKE)' -else - ml_do=true - ml_clean=true -fi - -# TOP is used by newlib and should not be used elsewhere for this purpose. -# MULTI{SRC,BUILD}TOP are the proper ones to use. MULTISRCTOP is empty -# when srcdir != builddir. MULTIBUILDTOP is always some number of ../'s. -# FIXME: newlib needs to be updated to use MULTI{SRC,BUILD}TOP so we can -# delete TOP. Newlib may wish to continue to use TOP for its own purposes -# of course. -# MULTIDIRS is non-empty for the cpu top level Makefile (eg: newlib/Makefile) -# and lists the subdirectories to recurse into. -# MULTISUBDIR is non-empty in each cpu subdirectory's Makefile -# (eg: newlib/h8300h/Makefile) and is the installed subdirectory name with -# a leading '/'. -# MULTIDO is used for targets like all, install, and check where -# $(FLAGS_TO_PASS) augmented with the subdir's compiler option is needed. -# MULTICLEAN is used for the *clean targets. -# -# ??? It is possible to merge MULTIDO and MULTICLEAN into one. They are -# currently kept separate because we don't want the *clean targets to require -# the existence of the compiler (which MULTIDO currently requires) and -# therefore we'd have to record the directory options as well as names -# (currently we just record the names and use --print-multi-lib to get the -# options). - -sed -e "s:^TOP[ ]*=[ ]*\([./]*\)[ ]*$:TOP = ${ml_builddotdot}\1:" \ - -e "s:^MULTISRCTOP[ ]*=.*$:MULTISRCTOP = ${ml_srcdotdot}:" \ - -e "s:^MULTIBUILDTOP[ ]*=.*$:MULTIBUILDTOP = ${ml_builddotdot}:" \ - -e "s:^MULTIDIRS[ ]*=.*$:MULTIDIRS = ${multidirs}:" \ - -e "s:^MULTISUBDIR[ ]*=.*$:MULTISUBDIR = ${ml_subdir}:" \ - -e "s:^MULTIDO[ ]*=.*$:MULTIDO = $ml_do:" \ - -e "s:^MULTICLEAN[ ]*=.*$:MULTICLEAN = $ml_clean:" \ - ${Makefile} > Makefile.tem -rm -f ${Makefile} -mv Makefile.tem ${Makefile} - -# If this is the library's top level, configure each multilib subdir. -# This is done at the end because this is the loop that runs configure -# in each multilib subdir and it seemed reasonable to finish updating the -# Makefile before going on to configure the subdirs. - -if [ "${ml_toplevel_p}" = yes ]; then - -# We must freshly configure each subdirectory. This bit of code is -# actually partially stolen from the main configure script. FIXME. - -if [ -n "${multidirs}" ] && [ -z "${ml_norecursion}" ]; then - - 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 .. - - for ml_dir in ${multidirs}; do - - if [ "${ml_verbose}" = --verbose ]; then - echo "Running configure in multilib subdir ${ml_dir}" - echo "pwd: `pwd`" - fi - - if [ -d ${ml_dir} ]; then true; else - # ``mkdir -p ${ml_dir}'' See also mkinstalldirs. - pathcomp="" - for d in `echo ":${ml_dir}" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`; do - pathcomp="$pathcomp$d" - case "$pathcomp" in - -* ) pathcomp=./$pathcomp ;; - esac - if test ! -d "$pathcomp"; then - echo "mkdir $pathcomp" 1>&2 - mkdir "$pathcomp" > /dev/null 2>&1 || lasterr=$? - fi - if test ! -d "$pathcomp"; then - exit $lasterr - fi - pathcomp="$pathcomp/" - done - fi - if [ -d ${ml_dir}/${ml_libdir} ]; then true; else mkdir ${ml_dir}/${ml_libdir}; fi - - # Eg: if ${ml_dir} = m68000/m68881, dotdot = ../../ - dotdot=../`echo ${ml_dir} | sed -e 's|[^/]||g' -e 's|/|../|g'` - - case ${srcdir} in - ".") - echo Building symlink tree in `pwd`/${ml_dir}/${ml_libdir} - if [ "${with_target_subdir}" != "." ]; then - ml_unsubdir="../" - else - ml_unsubdir="" - fi - (cd ${ml_dir}/${ml_libdir}; - ../${dotdot}${ml_unsubdir}symlink-tree ../${dotdot}${ml_unsubdir}${ml_libdir} "") - if [ -f ${ml_dir}/${ml_libdir}/Makefile ]; then - if [ x"${MAKE}" = x ]; then - (cd ${ml_dir}/${ml_libdir}; make distclean) - else - (cd ${ml_dir}/${ml_libdir}; ${MAKE} distclean) - fi - fi - ml_newsrcdir="." - ml_srcdiroption= - multisrctop=${dotdot} - ;; - *) - case "${srcdir}" in - /* | [A-Za-z]:[\\/]* ) # absolute path - ml_newsrcdir=${srcdir} - ;; - *) # otherwise relative - ml_newsrcdir=${dotdot}${srcdir} - ;; - esac - ml_srcdiroption="-srcdir=${ml_newsrcdir}" - multisrctop= - ;; - esac - - case "${progname}" in - /* | [A-Za-z]:[\\/]* ) ml_recprog=${progname} ;; - *) ml_recprog=${dotdot}${progname} ;; - esac - - # FIXME: POPDIR=${PWD=`pwd`} doesn't work here. - ML_POPDIR=`pwd` - cd ${ml_dir}/${ml_libdir} - - if [ -f ${ml_newsrcdir}/configure ]; then - ml_recprog="${ml_newsrcdir}/configure --cache-file=../config.cache" - fi - - # find compiler flag corresponding to ${ml_dir} - for i in `${CC-gcc} --print-multi-lib 2>/dev/null`; do - dir=`echo $i | sed -e 's/;.*$//'` - if [ "${dir}" = "${ml_dir}" ]; then - flags=`echo $i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'` - break - fi - done - ml_config_env='CC="${CC_}$flags" CXX="${CXX_}$flags" GCJ="${GCJ_}$flags"' - - if [ "${with_target_subdir}" = "." ]; then - CC_=$CC' ' - CXX_=$CXX' ' - GCJ_=$GCJ' ' - else - # Create a regular expression that matches any string as long - # as ML_POPDIR. - popdir_rx=`echo ${ML_POPDIR} | sed 's,.,.,g'` - CC_= - for arg in ${CC}; do - case $arg in - -[BIL]"${ML_POPDIR}"/*) - CC_="${CC_}"`echo "X${arg}" | sed -n "s/X\\(-[BIL]${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X-[BIL]${popdir_rx}\\(.*\\)/\1/p"`' ' ;; - "${ML_POPDIR}"/*) - CC_="${CC_}"`echo "X${arg}" | sed -n "s/X\\(${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X${popdir_rx}\\(.*\\)/\\1/p"`' ' ;; - *) - CC_="${CC_}${arg} " ;; - esac - done - - CXX_= - for arg in ${CXX}; do - case $arg in - -[BIL]"${ML_POPDIR}"/*) - CXX_="${CXX_}"`echo "X${arg}" | sed -n "s/X\\(-[BIL]${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X-[BIL]${popdir_rx}\\(.*\\)/\\1/p"`' ' ;; - "${ML_POPDIR}"/*) - CXX_="${CXX_}"`echo "X${arg}" | sed -n "s/X\\(${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X${popdir_rx}\\(.*\\)/\\1/p"`' ' ;; - *) - CXX_="${CXX_}${arg} " ;; - esac - done - - GCJ_= - for arg in ${GCJ}; do - case $arg in - -[BIL]"${ML_POPDIR}"/*) - GCJ_="${GCJ_}"`echo "X${arg}" | sed -n "s/X\\(-[BIL]${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X-[BIL]${popdir_rx}\\(.*\\)/\\1/p"`' ' ;; - "${ML_POPDIR}"/*) - GCJ_="${GCJ_}"`echo "X${arg}" | sed -n "s/X\\(${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X${popdir_rx}\\(.*\\)/\\1/p"`' ' ;; - *) - GCJ_="${GCJ_}${arg} " ;; - esac - done - - if test "x${LD_LIBRARY_PATH+set}" = xset; then - LD_LIBRARY_PATH_= - for arg in `echo "$LD_LIBRARY_PATH" | tr ':' ' '`; do - case "$arg" in - "${ML_POPDIR}"/*) - arg=`echo "X${arg}" | sed -n "s/X\\(${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X${popdir_rx}\\(.*\\)/\\1/p"` - ;; - esac - if test "x$LD_LIBRARY_PATH_" != x; then - LD_LIBRARY_PATH_=$LD_LIBRARY_PATH_:$arg - else - LD_LIBRARY_PATH_=$arg - fi - done - ml_config_env="$ml_config_env LD_LIBRARY_PATH=$LD_LIBRARY_PATH_" - fi - - if test "x${SHLIB_PATH+set}" = xset; then - SHLIB_PATH_= - for arg in `echo "$SHLIB_PATH" | tr ':' ' '`; do - case "$arg" in - "${ML_POPDIR}"/*) - arg=`echo "X${arg}" | sed -n "s/X\\(${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X${popdir_rx}\\(.*\\)/\\1/p"` - ;; - esac - if test "x$SHLIB_PATH_" != x; then - SHLIB_PATH_=$SHLIB_PATH_:$arg - else - SHLIB_PATH_=$arg - fi - done - ml_config_env="$ml_config_env SHLIB_PATH=$SHLIB_PATH_" - fi - fi - - if eval ${ml_config_env} ${ml_config_shell} ${ml_recprog} \ - --with-multisubdir=${ml_dir} --with-multisrctop=${multisrctop} \ - ${ml_arguments} ${ml_srcdiroption} ; then - true - else - exit 1 - fi - - cd ${ML_POPDIR} - - done - - cd ${ml_origdir} -fi - -fi # ${ml_toplevel_p} = yes -fi # ${enable_multilib} = yes diff --git a/contrib/gcc/config.if b/contrib/gcc/config.if deleted file mode 100644 index aa35a3f..0000000 --- a/contrib/gcc/config.if +++ /dev/null @@ -1,79 +0,0 @@ -#! /dev/null -# Don't call it directly. This shell script fragment is called to -# determine: -# -# 1. libstcxx_incdir: the interface name for libstdc++. -# 2. libc_interface: the interface name for libc. -# - -# Get the top level src dir. -if [ -z "${topsrcdir}" -a -z "${top_srcdir}" ] -then - echo "Undefined top level src dir: topsrcdir and top_srcdir are empty" >&2 - exit 1 -fi - -if [ -n "${topsrcdir}" ] -then - if_topsrcdir=${topsrcdir} -else - if_topsrcdir=${top_srcdir} -fi - -# 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. -if [ -z "${libc_interface}" ] -then - case ${target_os} in - *linux*libc1*|*linux*libc5*) - case ${target_alias} in - *alpha*|*powerpc*) - libc_interface=-libc5.9- - ;; - *) - libc_interface=-libc5- - ;; - esac - ;; - *linux*gnu*) - # We have to work harder to figure it out. - if [ ${target_alias} = ${build_alias} ] - then - dummy=if$$ - cat >$dummy.c < -main(argc, argv) - int argc; - char *argv[]; -{ - printf("%d\n", __GLIBC_MINOR__); - return 0; -} -EOF - ${CC-cc} $dummy.c -o $dummy 2>/dev/null - if [ "$?" = 0 ] - then - libc_interface=-libc6.`./$dummy`- - rm -f $dummy.c $dummy - else - # It should never happen. - echo "Cannot find the GNU C library minor version number." >&2 - rm -f $dummy.c $dummy - exit 1 - fi - else - # Cross compiling. Assume glibc 2.1. - libc_interface=-libc6.1- - fi - ;; - *) - libc_interface=- - ;; - esac -fi diff --git a/contrib/gcc/config.sub b/contrib/gcc/config.sub deleted file mode 100755 index c840398..0000000 --- a/contrib/gcc/config.sub +++ /dev/null @@ -1,1450 +0,0 @@ -#! /bin/sh -# Configuration validation subroutine script. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002 Free Software Foundation, Inc. - -timestamp='2002-02-01' - -# This file is (in principle) common to ALL GNU software. -# The presence of a machine in this file suggests that SOME GNU software -# can handle that machine. It does not imply ALL GNU software can. -# -# 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 of the License, 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 to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. -# -# Configuration subroutine to validate and canonicalize a configuration type. -# Supply the specified configuration type as an argument. -# If it is invalid, we print an error message on stderr and exit with code 1. -# Otherwise, we print the canonical config type on stdout and succeed. - -# This file is supposed to be the same for all GNU packages -# and recognize all the CPU types, system types and aliases -# that are meaningful with *any* GNU software. -# Each package is responsible for reporting which valid configurations -# it does not support. The user should be able to distinguish -# a failure to support a valid configuration from a meaningless -# configuration. - -# The goal of this file is to map all the various variations of a given -# machine specification into a single specification in the form: -# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM -# or in some cases, the newer four-part form: -# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM -# It is wrong to echo any other type of specification. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] CPU-MFR-OPSYS - $0 [OPTION] ALIAS - -Canonicalize a configuration name. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.sub ($timestamp) - -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 -Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit 0 ;; - --version | -v ) - echo "$version" ; exit 0 ;; - --help | --h* | -h ) - echo "$usage"; exit 0 ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" - exit 1 ;; - - *local*) - # First pass through any local machine types. - echo $1 - exit 0;; - - * ) - break ;; - esac -done - -case $# in - 0) echo "$me: missing argument$help" >&2 - exit 1;; - 1) ;; - *) echo "$me: too many arguments$help" >&2 - exit 1;; -esac - -# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). -# Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` -case $maybe_os in - nto-qnx* | linux-gnu* | storm-chaos* | os2-emx* | windows32-*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - *) - basic_machine=`echo $1 | sed 's/-[^-]*$//'` - if [ $basic_machine != $1 ] - then os=`echo $1 | sed 's/.*-/-/'` - else os=; fi - ;; -esac - -### Let's recognize common machines as not being operating systems so -### that things like config.sub decstation-3100 work. We also -### recognize some manufacturers as not being operating systems, so we -### can provide default operating systems below. -case $os in - -sun*os*) - # Prevent following clause from handling this invalid input. - ;; - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis) - os= - basic_machine=$1 - ;; - -sim | -cisco | -oki | -wec | -winbond) - os= - basic_machine=$1 - ;; - -scout) - ;; - -wrs) - os=-vxworks - basic_machine=$1 - ;; - -chorusos*) - os=-chorusos - basic_machine=$1 - ;; - -chorusrdb) - os=-chorusrdb - basic_machine=$1 - ;; - -hiux*) - os=-hiuxwe2 - ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco4) - os=-sco3.2v4 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2v[4-9]*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -udk*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -isc) - os=-isc2.2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -clix*) - basic_machine=clipper-intergraph - ;; - -isc*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -lynx*) - os=-lynxos - ;; - -ptx*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` - ;; - -windowsnt*) - os=`echo $os | sed -e 's/windowsnt/winnt/'` - ;; - -psos*) - os=-psos - ;; - -mint | -mint[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; -esac - -# Decode aliases for certain CPU-COMPANY combinations. -case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. - 1750a | 580 \ - | a29k \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ - | c4x | clipper \ - | d10v | d30v | dsp16xx \ - | fr30 \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | i370 | i860 | i960 | ia64 \ - | m32r | m68000 | m68k | m88k | mcore \ - | mips16 | mips64 | mips64el | mips64orion | mips64orionel \ - | mips64vr4100 | mips64vr4100el | mips64vr4300 \ - | mips64vr4300el | mips64vr5000 | mips64vr5000el \ - | mipsbe | mipseb | mipsel | mipsle | mipstx39 | mipstx39el \ - | mipsisa32 \ - | mn10200 | mn10300 \ - | ns16k | ns32k \ - | openrisc | or32 \ - | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ - | pyramid \ - | sh | sh[34] | sh[34]eb | shbe | shle | sh64 \ - | sparc | sparc64 | sparclet | sparclite | sparcv9 | sparcv9b \ - | strongarm \ - | tahoe | thumb | tic80 | tron \ - | v850 | v850e \ - | we32k \ - | x86 | xscale | xstormy16 | xtensa \ - | z8k) - basic_machine=$basic_machine-unknown - ;; - m6811 | m68hc11 | m6812 | m68hc12) - # Motorola 68HC11/12. - basic_machine=$basic_machine-unknown - os=-none - ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) - ;; - - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and - # (2) the word "unknown" tends to confuse beginning users. - i*86 | x86_64) - basic_machine=$basic_machine-pc - ;; - # Object if more than one company name word. - *-*-*) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; - # Recognize the basic CPU types with company name. - 580-* \ - | a29k-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ - | arm-* | armbe-* | armle-* | armv*-* \ - | avr-* \ - | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c54x-* \ - | clipper-* | cray2-* | cydra-* \ - | d10v-* | d30v-* \ - | elxsi-* \ - | f30[01]-* | f700-* | fr30-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | i*86-* | i860-* | i960-* | ia64-* \ - | m32r-* \ - | m68000-* | m680[01234]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | mcore-* \ - | mips-* | mips16-* | mips64-* | mips64el-* | mips64orion-* \ - | mips64orionel-* | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* | mipsbe-* | mipseb-* \ - | mipsle-* | mipsel-* | mipstx39-* | mipstx39el-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ - | pyramid-* \ - | romp-* | rs6000-* \ - | sh-* | sh[34]-* | sh[34]eb-* | shbe-* | shle-* | sh64-* \ - | sparc-* | sparc64-* | sparc86x-* | sparclite-* \ - | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* \ - | t3e-* | tahoe-* | thumb-* | tic30-* | tic54x-* | tic80-* | tron-* \ - | v850-* | v850e-* | vax-* \ - | we32k-* \ - | x86-* | x86_64-* | xmp-* | xps100-* | xscale-* | xstormy16-* \ - | xtensa-* \ - | ymp-* \ - | z8k-*) - ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 386bsd) - basic_machine=i386-unknown - os=-bsd - ;; - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att - ;; - 3b*) - basic_machine=we32k-att - ;; - a29khif) - basic_machine=a29k-amd - os=-udi - ;; - adobe68k) - basic_machine=m68010-adobe - os=-scout - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) - basic_machine=m68k-unknown - ;; - amigaos | amigados) - basic_machine=m68k-unknown - os=-amigaos - ;; - amigaunix | amix) - basic_machine=m68k-unknown - os=-sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - os=-sysv - ;; - apollo68bsd) - basic_machine=m68k-apollo - os=-bsd - ;; - aux) - basic_machine=m68k-apple - os=-aux - ;; - balance) - basic_machine=ns32k-sequent - os=-dynix - ;; - convex-c1) - basic_machine=c1-convex - os=-bsd - ;; - convex-c2) - basic_machine=c2-convex - os=-bsd - ;; - convex-c32) - basic_machine=c32-convex - os=-bsd - ;; - convex-c34) - basic_machine=c34-convex - os=-bsd - ;; - convex-c38) - basic_machine=c38-convex - os=-bsd - ;; - cray | ymp) - basic_machine=ymp-cray - os=-unicos - ;; - cray2) - basic_machine=cray2-cray - os=-unicos - ;; - [cjt]90) - basic_machine=${basic_machine}-cray - os=-unicos - ;; - crds | unos) - basic_machine=m68k-crds - ;; - cris | cris-* | etrax*) - basic_machine=cris-axis - ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec - ;; - decsystem10* | dec10*) - basic_machine=pdp10-dec - os=-tops10 - ;; - decsystem20* | dec20*) - basic_machine=pdp10-dec - os=-tops20 - ;; - delta | 3300 | motorola-3300 | motorola-delta \ - | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola - ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 - ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx - ;; - dpx2* | dpx2*-bull) - basic_machine=m68k-bull - os=-sysv3 - ;; - ebmon29k) - basic_machine=a29k-amd - os=-ebmon - ;; - elxsi) - basic_machine=elxsi-elxsi - os=-bsd - ;; - encore | umax | mmax) - basic_machine=ns32k-encore - ;; - es1800 | OSE68k | ose68k | ose | OSE) - basic_machine=m68k-ericsson - os=-ose - ;; - fx2800) - basic_machine=i860-alliant - ;; - genix) - basic_machine=ns32k-ns - ;; - gmicro) - basic_machine=tron-gmicro - os=-sysv - ;; - go32) - basic_machine=i386-pc - os=-go32 - ;; - h3050r* | hiux*) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - h8300hms) - basic_machine=h8300-hitachi - os=-hms - ;; - h8300xray) - basic_machine=h8300-hitachi - os=-xray - ;; - h8500hms) - basic_machine=h8500-hitachi - os=-hms - ;; - harris) - basic_machine=m88k-harris - os=-sysv3 - ;; - hp300-*) - basic_machine=m68k-hp - ;; - hp300bsd) - basic_machine=m68k-hp - os=-bsd - ;; - hp300hpux) - basic_machine=m68k-hp - os=-hpux - ;; - hp3k9[0-9][0-9] | hp9[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k2[0-9][0-9] | hp9k31[0-9]) - basic_machine=m68000-hp - ;; - hp9k3[2-9][0-9]) - basic_machine=m68k-hp - ;; - hp9k6[0-9][0-9] | hp6[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k7[0-79][0-9] | hp7[0-79][0-9]) - basic_machine=hppa1.1-hp - ;; - hp9k78[0-9] | hp78[0-9]) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][13679] | hp8[0-9][13679]) - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][0-9] | hp8[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hppa-next) - os=-nextstep3 - ;; - hppaosf) - basic_machine=hppa1.1-hp - os=-osf - ;; - hppro) - basic_machine=hppa1.1-hp - os=-proelf - ;; - i370-ibm* | ibm*) - basic_machine=i370-ibm - ;; -# I'm not sure what "Sysv32" means. Should this be sysv3.2? - i*86v32) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv32 - ;; - i*86v4*) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv4 - ;; - i*86v) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv - ;; - i*86sol2) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-solaris2 - ;; - i386mach) - basic_machine=i386-mach - os=-mach - ;; - i386-vsta | vsta) - basic_machine=i386-unknown - os=-vsta - ;; - iris | iris4d) - basic_machine=mips-sgi - case $os in - -irix*) - ;; - *) - os=-irix4 - ;; - esac - ;; - isi68 | isi) - basic_machine=m68k-isi - os=-sysv - ;; - m88k-omron*) - basic_machine=m88k-omron - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - mingw32) - basic_machine=i386-pc - os=-mingw32 - ;; - miniframe) - basic_machine=m68000-convergent - ;; - *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; - mipsel*-linux*) - basic_machine=mipsel-unknown - os=-linux-gnu - ;; - mips*-linux*) - basic_machine=mips-unknown - os=-linux-gnu - ;; - mips3*-*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown - ;; - mmix*) - basic_machine=mmix-knuth - os=-mmixware - ;; - monitor) - basic_machine=m68k-rom68k - os=-coff - ;; - morphos) - basic_machine=powerpc-unknown - os=-morphos - ;; - msdos) - basic_machine=i386-pc - os=-msdos - ;; - mvs) - basic_machine=i370-ibm - os=-mvs - ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 - ;; - netbsd386) - basic_machine=i386-unknown - os=-netbsd - ;; - netwinder) - basic_machine=armv4l-rebel - os=-linux - ;; - news | news700 | news800 | news900) - basic_machine=m68k-sony - os=-newsos - ;; - news1000) - basic_machine=m68030-sony - os=-newsos - ;; - news-3600 | risc-news) - basic_machine=mips-sony - os=-newsos - ;; - necv70) - basic_machine=v70-nec - os=-sysv - ;; - next | m*-next ) - basic_machine=m68k-next - case $os in - -nextstep* ) - ;; - -ns2*) - os=-nextstep2 - ;; - *) - os=-nextstep3 - ;; - esac - ;; - nh3000) - basic_machine=m68k-harris - os=-cxux - ;; - nh[45]000) - basic_machine=m88k-harris - os=-cxux - ;; - nindy960) - basic_machine=i960-intel - os=-nindy - ;; - mon960) - basic_machine=i960-intel - os=-mon960 - ;; - nonstopux) - basic_machine=mips-compaq - os=-nonstopux - ;; - np1) - basic_machine=np1-gould - ;; - nsr-tandem) - basic_machine=nsr-tandem - ;; - op50n-* | op60c-*) - basic_machine=hppa1.1-oki - os=-proelf - ;; - or32 | or32-*) - basic_machine=or32-unknown - os=-coff - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - os=-ose - ;; - os68k) - basic_machine=m68k-none - os=-os68k - ;; - pa-hitachi) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - paragon) - basic_machine=i860-intel - os=-osf - ;; - pbd) - basic_machine=sparc-tti - ;; - pbb) - basic_machine=m68k-tti - ;; - pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc - ;; - pentiumpro | p6 | 6x86 | athlon) - basic_machine=i686-pc - ;; - pentiumii | pentium2) - basic_machine=i686-pc - ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumii-* | pentium2-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pn) - basic_machine=pn-gould - ;; - power) basic_machine=power-ibm - ;; - ppc) basic_machine=powerpc-unknown - ;; - ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppcle | powerpclittle | ppc-le | powerpc-little) - basic_machine=powerpcle-unknown - ;; - ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64) basic_machine=powerpc64-unknown - ;; - ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64le | powerpc64little | ppc64-le | powerpc64-little) - basic_machine=powerpc64le-unknown - ;; - ppc64le-* | powerpc64little-*) - basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ps2) - basic_machine=i386-ibm - ;; - pw32) - basic_machine=i586-unknown - os=-pw32 - ;; - rom68k) - basic_machine=m68k-rom68k - os=-coff - ;; - rm[46]00) - basic_machine=mips-siemens - ;; - rtpc | rtpc-*) - basic_machine=romp-ibm - ;; - s390 | s390-*) - basic_machine=s390-ibm - ;; - s390x | s390x-*) - basic_machine=s390x-ibm - ;; - sa29200) - basic_machine=a29k-amd - os=-udi - ;; - sequent) - basic_machine=i386-sequent - ;; - sh) - basic_machine=sh-hitachi - os=-hms - ;; - sparclite-wrs | simso-wrs) - basic_machine=sparclite-wrs - os=-vxworks - ;; - sps7) - basic_machine=m68k-bull - os=-sysv2 - ;; - spur) - basic_machine=spur-unknown - ;; - st2000) - basic_machine=m68k-tandem - ;; - stratus) - basic_machine=i860-stratus - os=-sysv4 - ;; - sun2) - basic_machine=m68000-sun - ;; - sun2os3) - basic_machine=m68000-sun - os=-sunos3 - ;; - sun2os4) - basic_machine=m68000-sun - os=-sunos4 - ;; - sun3os3) - basic_machine=m68k-sun - os=-sunos3 - ;; - sun3os4) - basic_machine=m68k-sun - os=-sunos4 - ;; - sun4os3) - basic_machine=sparc-sun - os=-sunos3 - ;; - sun4os4) - basic_machine=sparc-sun - os=-sunos4 - ;; - sun4sol2) - basic_machine=sparc-sun - os=-solaris2 - ;; - sun3 | sun3-*) - basic_machine=m68k-sun - ;; - sun4) - basic_machine=sparc-sun - ;; - sun386 | sun386i | roadrunner) - basic_machine=i386-sun - ;; - sv1) - basic_machine=sv1-cray - os=-unicos - ;; - symmetry) - basic_machine=i386-sequent - os=-dynix - ;; - t3e) - basic_machine=t3e-cray - os=-unicos - ;; - tic54x | c54x*) - basic_machine=tic54x-unknown - os=-coff - ;; - tx39) - basic_machine=mipstx39-unknown - ;; - tx39el) - basic_machine=mipstx39el-unknown - ;; - toad1) - basic_machine=pdp10-xkl - os=-tops20 - ;; - tower | tower-32) - basic_machine=m68k-ncr - ;; - udi29k) - basic_machine=a29k-amd - os=-udi - ;; - ultra3) - basic_machine=a29k-nyu - os=-sym1 - ;; - v810 | necv810) - basic_machine=v810-nec - os=-none - ;; - vaxv) - basic_machine=vax-dec - os=-sysv - ;; - vms) - basic_machine=vax-dec - os=-vms - ;; - vpp*|vx|vx-*) - basic_machine=f301-fujitsu - ;; - vxworks960) - basic_machine=i960-wrs - os=-vxworks - ;; - vxworks68) - basic_machine=m68k-wrs - os=-vxworks - ;; - vxworks29k) - basic_machine=a29k-wrs - os=-vxworks - ;; - w65*) - basic_machine=w65-wdc - os=-none - ;; - w89k-*) - basic_machine=hppa1.1-winbond - os=-proelf - ;; - windows32) - basic_machine=i386-pc - os=-windows32-msvcrt - ;; - xmp) - basic_machine=xmp-cray - os=-unicos - ;; - xps | xps100) - basic_machine=xps100-honeywell - ;; - z8k-*-coff) - basic_machine=z8k-unknown - os=-sim - ;; - none) - basic_machine=none-none - os=-none - ;; - -# Here we handle the default manufacturer of certain CPU types. It is in -# some cases the only manufacturer, in others, it is the most popular. - w89k) - basic_machine=hppa1.1-winbond - ;; - op50n) - basic_machine=hppa1.1-oki - ;; - op60c) - basic_machine=hppa1.1-oki - ;; - mips) - if [ x$os = x-linux-gnu ]; then - basic_machine=mips-unknown - else - basic_machine=mips-mips - fi - ;; - romp) - basic_machine=romp-ibm - ;; - rs6000) - basic_machine=rs6000-ibm - ;; - vax) - basic_machine=vax-dec - ;; - pdp10) - # there are many clones, so DEC is not a safe bet - basic_machine=pdp10-unknown - ;; - pdp11) - basic_machine=pdp11-dec - ;; - we32k) - basic_machine=we32k-att - ;; - sh3 | sh4 | sh3eb | sh4eb) - basic_machine=sh-unknown - ;; - sh64) - basic_machine=sh64-unknown - ;; - sparc | sparcv9 | sparcv9b) - basic_machine=sparc-sun - ;; - cydra) - basic_machine=cydra-cydrome - ;; - orion) - basic_machine=orion-highlevel - ;; - orion105) - basic_machine=clipper-highlevel - ;; - mac | mpw | mac-mpw) - basic_machine=m68k-apple - ;; - pmac | pmac-mpw) - basic_machine=powerpc-apple - ;; - c4x*) - basic_machine=c4x-none - os=-coff - ;; - *-unknown) - # Make sure to match an already-canonicalized machine name. - ;; - *) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; -esac - -# Here we canonicalize certain aliases for manufacturers. -case $basic_machine in - *-digital*) - basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` - ;; - *-commodore*) - basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` - ;; - *) - ;; -esac - -# Decode manufacturer-specific aliases for certain operating systems. - -if [ x"$os" != x"" ] -then -case $os in - # First match some system type aliases - # that might get confused with valid system types. - # -solaris* is a basic system type, with this one exception. - -solaris1 | -solaris1.*) - os=`echo $os | sed -e 's|solaris1|sunos4|'` - ;; - -solaris) - os=-solaris2 - ;; - -svr4*) - os=-sysv4 - ;; - -unixware*) - os=-sysv4.2uw - ;; - -gnu/linux*) - os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` - ;; - # First accept the basic system types. - # The portable systems comes first. - # Each alternative MUST END IN A *, to match a version number. - # -sysv* is not here because it comes later, after sysvr4. - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ - | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* | -morphos*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -qnx*) - case $basic_machine in - x86-* | i*86-*) - ;; - *) - os=-nto$os - ;; - esac - ;; - -nto*) - os=-nto-qnx - ;; - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ - | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) - ;; - -mac*) - os=`echo $os | sed -e 's|mac|macos|'` - ;; - -linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` - ;; - -sunos5*) - os=`echo $os | sed -e 's|sunos5|solaris2|'` - ;; - -sunos6*) - os=`echo $os | sed -e 's|sunos6|solaris3|'` - ;; - -opened*) - os=-openedition - ;; - -wince*) - os=-wince - ;; - -osfrose*) - os=-osfrose - ;; - -osf*) - os=-osf - ;; - -utek*) - os=-bsd - ;; - -dynix*) - os=-bsd - ;; - -acis*) - os=-aos - ;; - -atheos*) - os=-atheos - ;; - -386bsd) - os=-bsd - ;; - -ctix* | -uts*) - os=-sysv - ;; - -ns2 ) - os=-nextstep2 - ;; - -nsk*) - os=-nsk - ;; - # Preserve the version number of sinix5. - -sinix5.*) - os=`echo $os | sed -e 's|sinix|sysv|'` - ;; - -sinix*) - os=-sysv4 - ;; - -triton*) - os=-sysv3 - ;; - -oss*) - os=-sysv3 - ;; - -svr4) - os=-sysv4 - ;; - -svr3) - os=-sysv3 - ;; - -sysvr4) - os=-sysv4 - ;; - # This must come after -sysvr4. - -sysv*) - ;; - -ose*) - os=-ose - ;; - -es1800*) - os=-ose - ;; - -xenix) - os=-xenix - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - os=-mint - ;; - -none) - ;; - *) - # Get rid of the `-' at the beginning of $os. - os=`echo $os | sed 's/[^-]*-//'` - echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 - exit 1 - ;; -esac -else - -# Here we handle the default operating systems that come with various machines. -# The value should be what the vendor currently ships out the door with their -# machine or put another way, the most popular os provided with the machine. - -# Note that if you're going to try to match "-MANUFACTURER" here (say, -# "-sun"), then you have to tell the case statement up towards the top -# that MANUFACTURER isn't an operating system. Otherwise, code above -# will signal an error saying that MANUFACTURER isn't an operating -# system, and we'll never get to this point. - -case $basic_machine in - *-acorn) - os=-riscix1.2 - ;; - arm*-rebel) - os=-linux - ;; - arm*-semi) - os=-aout - ;; - # This must come before the *-dec entry. - pdp10-*) - os=-tops20 - ;; - pdp11-*) - os=-none - ;; - *-dec | vax-*) - os=-ultrix4.2 - ;; - m68*-apollo) - os=-domain - ;; - i386-sun) - os=-sunos4.0.2 - ;; - m68000-sun) - os=-sunos3 - # This also exists in the configure program, but was not the - # default. - # os=-sunos4 - ;; - m68*-cisco) - os=-aout - ;; - mips*-cisco) - os=-elf - ;; - mips*-*) - os=-elf - ;; - or32-*) - os=-coff - ;; - *-tti) # must be before sparc entry or we get the wrong os. - os=-sysv3 - ;; - sparc-* | *-sun) - os=-sunos4.1.1 - ;; - *-be) - os=-beos - ;; - *-ibm) - os=-aix - ;; - *-wec) - os=-proelf - ;; - *-winbond) - os=-proelf - ;; - *-oki) - os=-proelf - ;; - *-hp) - os=-hpux - ;; - *-hitachi) - os=-hiux - ;; - i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) - os=-sysv - ;; - *-cbm) - os=-amigaos - ;; - *-dg) - os=-dgux - ;; - *-dolphin) - os=-sysv3 - ;; - m68k-ccur) - os=-rtu - ;; - m88k-omron*) - os=-luna - ;; - *-next ) - os=-nextstep - ;; - *-sequent) - os=-ptx - ;; - *-crds) - os=-unos - ;; - *-ns) - os=-genix - ;; - i370-*) - os=-mvs - ;; - *-next) - os=-nextstep3 - ;; - *-gould) - os=-sysv - ;; - *-highlevel) - os=-bsd - ;; - *-encore) - os=-bsd - ;; - *-sgi) - os=-irix - ;; - *-siemens) - os=-sysv4 - ;; - *-masscomp) - os=-rtu - ;; - f30[01]-fujitsu | f700-fujitsu) - os=-uxpv - ;; - *-rom68k) - os=-coff - ;; - *-*bug) - os=-coff - ;; - *-apple) - os=-macos - ;; - *-atari*) - os=-mint - ;; - *) - os=-none - ;; -esac -fi - -# Here we handle the case where we know the os, and the CPU type, but not the -# manufacturer. We pick the logical manufacturer. -vendor=unknown -case $basic_machine in - *-unknown) - case $os in - -riscix*) - vendor=acorn - ;; - -sunos*) - vendor=sun - ;; - -aix*) - vendor=ibm - ;; - -beos*) - vendor=be - ;; - -hpux*) - vendor=hp - ;; - -mpeix*) - vendor=hp - ;; - -hiux*) - vendor=hitachi - ;; - -unos*) - vendor=crds - ;; - -dgux*) - vendor=dg - ;; - -luna*) - vendor=omron - ;; - -genix*) - vendor=ns - ;; - -mvs* | -opened*) - vendor=ibm - ;; - -ptx*) - vendor=sequent - ;; - -vxsim* | -vxworks*) - vendor=wrs - ;; - -aux*) - vendor=apple - ;; - -hms*) - vendor=hitachi - ;; - -mpw* | -macos*) - vendor=apple - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - vendor=atari - ;; - -vos*) - vendor=stratus - ;; - esac - basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` - ;; -esac - -echo $basic_machine$os -exit 0 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/contrib/gcc/config/ChangeLog b/contrib/gcc/config/ChangeLog deleted file mode 100644 index 78ea3bb..0000000 --- a/contrib/gcc/config/ChangeLog +++ /dev/null @@ -1,477 +0,0 @@ -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 - - * acinclude.m4: Fix spelling error of "separate" as "seperate". - -2001-05-22 Jason Merrill - - * mt-linux (CXXFLAGS_FOR_TARGET): Lose -fvtable-thunks. - -2001-01-27 Richard Henderson - - * mt-alphaieee: New file. - -2001-01-02 Laurynas Biveinis - - * mh-djgpp: do not set CFLAGS. - -2000-08-04 Mark Elbrecht - - * mh-djgpp: Conditionally set 'target_alias' to djgpp. Conditionally - modify 'gcc_version'. - -2000-07-21 Andrew Haley - - * 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. - -2000-06-21 Branko Cibej - - * mh-sparcpic: Use single instead of double quotes. - * mt-sparcpic: Likewise. - -2000-06-19 Syd Polk - - * acinclude.m4: Updated for Incr Tcl 3.0. - -2000-02-23 Linas Vepstas - - * mh-i370pic: New file. - * mt-i370pic: New file. - -2000-02-22 Nick Clifton - - * config/mt-wince: new file: Makefile fragment for WinCE targets. - -2000-01-06 Geoff Keating - - * mh-aix43: Delete, move to mt-aix43. - * mt-aix43: New file. - -Tue Sep 7 23:31:01 1999 Linas Vepstas - - * mh-openedition: New file. - -1999-04-07 Michael Meissner - - * mt-d30v: New file, pass -g -Os -Wa,-C as default options. - -1999-02-08 Syd Polk - - * acinclude.m4: Added macros to find itcl files. - Export TCL_CFLAGS from tclConfig.sh. - Export TCL_LIB_FULL_PATH, TK_LIB_FULL_PATH, ITCL_LIB_FULL_PATH, - ITK_LIB_FULL_PATH, and TIX_LIB_FULL_PATH - Replace TIX macros with better ones from snavigator. - -Tue Feb 2 22:51:21 1999 Philip Blundell - - * mh-armpic: New file. Patch from Jim Pick . - * mt-armpic: Likewise. - -Mon Jan 18 19:41:08 1999 Christopher Faylor - - * cygwin.mh: Activate commented out dependencies for - gdb: libtermcap. - -Wed Nov 18 20:29:46 1998 Christopher Faylor - - * cygwin.mh: Add extra libtermcap target information. - Add commented out dependency for gdb to libtermcap for - future readline requirement. - -Mon Nov 2 15:15:33 1998 Geoffrey Noer - - * mh-cygwin32: delete - * mh-cygwin: was mh-cygwin32 - -1998-10-26 Syd Polk - - * acinclude.m4: TCLHDIR and TKHDIR need to be run through - cygpath for Microsoft builds. - -1998-10-20 Syd Polk - - * acinclude.m4: Re-exported TCL_LIBS and TCL_LD_SEARCH_FLAGS - because itcl needs them. - -Mon Aug 31 17:50:53 1998 David Edelsohn - - * mh-aix43 (NM_FOR_TARGET): Add -X32_64 as well. - -Sat Aug 29 14:32:55 1998 David Edelsohn - - * mh-aix43: New file. - -Mon Aug 10 00:15:47 1998 HJ Lu (hjl@gnu.org) - - * mt-linux (CXXFLAGS_FOR_TARGET): Add -D_GNU_SOURCE. - -1998-05-29 Rob Savoye - - * acinclude.m4: New collection of generic autoconf macros. - -Wed Apr 22 12:24:28 1998 Michael Meissner - - * mt-ospace: New file, support using -Os instead of -O2 to compile - the libraries. - -Wed Apr 22 10:53:14 1998 Andreas Schwab - - * mt-linux (CXXFLAGS_FOR_TARGET): Set this instead of CXXFLAGS. - -Sat Apr 11 22:43:17 1998 J. Kean Johnston - - * mh-svsv5: New file - support for SCO UnixWare 7 / SVR5. - -Thu Mar 26 01:54:25 1998 Geoffrey Noer - - * mh-cygwin32: stop configuring and building dosrel. - -Thu Sep 11 16:43:27 1997 Jim Wilson - - * mh-elfalphapic, mt-elfalphapic: New files. - -Wed Jul 23 12:32:18 1997 Robert Hoehne - - * mh-go32 (CFLAGS): Don't set -fno-omit-frame-pointer. - -Mon Jun 16 19:06:41 1997 Geoff Keating - - * mh-ppcpic: New file. - * mt-ppcpic: New file. - -Thu Mar 27 15:52:40 1997 Geoffrey Noer - - * mh-cygwin32: override CXXFLAGS, setting to -O2 only - (no debug) - -Tue Mar 25 18:16:43 1997 Geoffrey Noer - - * mh-cygwin32: override LIBGCC2_DEBUG_CFLAGS so debug info - isn't included in cygwin32-hosted libgcc2.a by default - -Wed Jan 8 19:56:43 1997 Geoffrey Noer - - * mh-cygwin32: override CFLAGS so debug info isn't included - in cygwin32-hosted tools by default - -Tue Dec 31 16:04:26 1996 Ian Lance Taylor - - * mh-linux: Remove. - -Mon Nov 11 10:29:51 1996 Michael Meissner - - * mt-ppc: Delete file, options moved to newlib configure. - -Fri Oct 4 12:21:03 1996 Angela Marie Thomas (angela@cygnus.com) - - * mh-dgux386: New file. x86 dgux specific flags - -Mon Sep 30 15:10:07 1996 Stan Shebs - - * mpw-mh-mpw (EXTRALIBS_PPC_XCOFF): New, was EXTRALIBS_PPC. - (EXTRALIBS_PPC): Use shared libraries instead of xcoff. - -Sat Aug 17 04:56:25 1996 Geoffrey Noer - - * mh-cygwin32: don't -D_WIN32 here anymore - -Thu Aug 15 19:46:44 1996 Stan Shebs - - * mpw-mh-mpw (SEGFLAG_68K, SEGFLAG_PPC): Remove. - (EXTRALIBS_PPC): Add libgcc.xcoff. - -Thu Aug 8 14:51:47 1996 Michael Meissner - - * mt-ppc: New file, add -mrelocatable-lib and -mno-eabi to all - target builds for PowerPC eabi targets. - -Fri Jul 12 12:06:01 1996 Stan Shebs - - * mpw: New subdir, Mac MPW configuration support bits. - -Mon Jul 8 17:30:52 1996 Jim Wilson - - * mh-irix6: New file. - -Mon Jul 8 15:15:37 1996 Jason Merrill - - * mt-sparcpic (PICFLAG_FOR_TARGET): Use -fPIC. - -Fri Jul 5 11:49:02 1996 Ian Lance Taylor - - * mh-irix4 (RANLIB): Don't define; Irix 4 does have ranlib. - -Sun Jun 23 22:59:25 1996 Geoffrey Noer - - * mh-cygwin32: new file. Like mh-go32 without the CFLAGS entry. - -Tue Mar 26 14:10:41 1996 Ian Lance Taylor - - * mh-go32 (CFLAGS): Define. - -Thu Mar 14 19:20:54 1996 Ian Lance Taylor - - * mh-necv4: New file. - -Thu Feb 15 13:07:43 1996 Ian Lance Taylor - - * mh-cxux (CC): New variable. - (CFLAGS, LDFLAGS): Remove. - * mh-ncrsvr43 (CC): New variable. - (CFLAGS): Remove. - * mh-solaris (CFLAGS): Remove. - - * mh-go32: Remove most variable settings, since they presumed a - Canadian Cross, which is now handled correctly by the configure - script. - - * mh-sparcpic (PICFLAG): Set to -fPIC, not -fpic. - -Mon Feb 12 14:53:39 1996 Andreas Schwab - - * mh-m68kpic, mt-m68kpic: New files. - -Thu Feb 1 14:15:42 1996 Stan Shebs - - * mpw-mh-mpw (CC_MWC68K): Add options similar to those used - in CC_MWCPPC, and -mc68020 -model far. - (AR_MWLINK68K): Add -xm library. - (AR_AR): Define. - (CC_LD_MWLINK68K): Remove -d. - (EXTRALIBS_MWC68K): Define. - -Thu Jan 25 16:05:33 1996 Ian Lance Taylor - - * mh-ncrsvr43 (CFLAGS): Remove -Hnocopyr. - -Tue Nov 7 15:41:30 1995 Stan Shebs - - * mpw-mh-mpw (CC_MWC68K, CC_MWCPPC): Remove unused include path. - (CC_MWCPPC): Add -mpw_chars, disable warnings, add comments - explaining reasons for various flags. - (EXTRALIBS_PPC, EXTRALIBS_MWCPPC ): Put runtime library first. - -Fri Oct 13 14:44:25 1995 Jason Molenda (crash@phydeaux.cygnus.com) - - * mh-aix, mh-sun: Removed. - - * mh-decstation (X11_EXTRA_CFLAGS): Define. - - * mh-sco, mh-solaris, mh-sysv4 (X11_EXTRA_LIBS): Define. - - * mh-hp300, mh-hpux, mh-hpux8, mh-solaris, mh-sun3, mh-sysv4: Don't - hardcode location of X stuff here. - -Thu Sep 28 13:14:56 1995 Stan Shebs - - * mpw-mh-mpw: Add definitions for various 68K and PowerMac - compilers, add definitions for library and link steps for - PowerMacs. - -Thu Sep 14 08:20:04 1995 Fred Fish - - * mh-hp300 (CC): Add "CC = cc -Wp,-H256000" to avoid - "too much defining" errors from the HPUX compiler. - -Thu Aug 17 17:28:56 1995 Ken Raeburn - - * mh-hp300 (RANLIB): Use "ar ts", in case GNU ar was used and - didn't build a symbol table. - -Thu Jun 22 17:47:24 1995 Stan Shebs - - * mpw-mh-mpw (CC): Define ANSI_PROTOTYPES. - -Mon Apr 10 12:29:48 1995 Stan Shebs - - * mpw-mh-mpw (EXTRALIBS): Always link in Math.o, CSANELIB.o, - and ToolLibs.o. - - * mpw-mh-mpw (CC): Define ALMOST_STDC. - (CFLAGS): Remove ALMOST_STDC, -mc68881. - (LDFLAGS): add -w. - - * mpw-mh-mpw (CFLAGS): Add -b option to put strings at the ends of - functions. - - * mpw-mh-mpw: New file, host makefile definitions for MPW. - -Fri Mar 31 11:35:17 1995 Jason Molenda (crash@phydeaux.cygnus.com) - - * mt-netware: New file. - -Mon Mar 13 12:31:29 1995 Ian Lance Taylor - - * mh-hpux8: New file. - * mh-hpux: Use X11R5 rather than X11R4. - -Thu Feb 9 11:04:13 1995 Ian Lance Taylor - - * mh-linux (SYSV): Don't define. - (RANLIB): Don't define. - -Wed Jan 11 16:29:34 1995 Jason Merrill - - * m?-*pic (LIBCXXFLAGS): Add -fno-implicit-templates. - -Thu Nov 3 17:27:19 1994 Ken Raeburn - - * mh-irix4 (CC): Increase maximum string length. - - * mh-sco (CC): Define away const, it doesn't work right; elements - of arrays of ptr-to-const are considered const themselves. - -Sat Jul 16 12:17:49 1994 Stan Shebs (shebs@andros.cygnus.com) - - * mh-cxux: New file, from Bob Rusk (rrusk@mail.csd.harris.com). - -Sat Jun 4 17:22:12 1994 Per Bothner (bothner@kalessin.cygnus.com) - - * mh-ncrsvr43: New file from Tom McConnell - . - -Thu May 19 00:32:11 1994 Jeff Law (law@snake.cs.utah.edu) - - * mh-hpux (CC): Add -Wp,-H256000 to avoid "too much defining" - errors from the HPUX 8 compilers. - -Wed May 4 20:14:47 1994 D. V. Henkel-Wallace (gumby@cygnus.com) - - * mh-lynxrs6k: set SHELL to /bin/bash - -Tue Apr 12 12:38:17 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * mh-irix4 (CC): Change -XNh1500 to -XNh2000. - -Sat Dec 25 20:03:45 1993 Jeffrey A. Law (law@snake.cs.utah.edu) - - * mt-hppa: Delete. - -Tue Nov 16 22:54:39 1993 Jim Kingdon (kingdon@lioth.cygnus.com) - - * mh-a68bsd: Define CC to gcc. - -Mon Nov 15 16:56:51 1993 Jim Kingdon (kingdon@lioth.cygnus.com) - - * mh-linux: Don't put -static in LDFLAGS. Add comments. - -Mon Nov 15 13:37:58 1993 david d `zoo' zuhn (zoo@cirdan.cygnus.com) - - * mh-sysv4 (AR_FLAGS): change from cq to cr - -Fri Nov 5 08:12:32 1993 D. V. Henkel-Wallace (gumby@blues.cygnus.com) - - * mh-unixware: remove. It's the same as sysv4, and config.guess - can't tell the difference. So don't allow skew. - -Wed Oct 20 20:35:14 1993 Jim Kingdon (kingdon@lioth.cygnus.com) - - * mh-hp300: Revert yesterday's change, but add comment explaining. - -Tue Oct 19 18:58:21 1993 Jim Kingdon (kingdon@lioth.cygnus.com) - - * mh-hp300: Don't define CFLAGS to empty. Why should hp300 be - different from anything else? ("gdb doesn't understand the native - debug format" isn't a good enough answer because we might be using - gcc). - -Tue Oct 5 12:17:40 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de) - - * mh-alphaosf: Remove, no longer necessary now that gdb knows - how to handle OSF/1 shared libraries. - -Tue Jul 6 11:27:33 1993 Steve Chamberlain (sac@phydeaux.cygnus.com) - - * mh-alphaosf: New file. - -Thu Jul 1 15:49:33 1993 Jim Kingdon (kingdon@lioth.cygnus.com) - - * mh-riscos: New file. - -Mon Jun 14 12:03:18 1993 david d `zoo' zuhn (zoo at rtl.cygnus.com) - - * mh-aix, mh-aix386, mh-decstation, mh-delta88, mh-hpux, mh-irix4, - mh-ncr3000, mh-solaris, mh-sysv, mh-sysv4: remove INSTALL=cp line, - now that we're using install.sh globally - -Fri Jun 4 16:09:34 1993 Ian Lance Taylor (ian@cygnus.com) - - * mh-sysv4 (INSTALL): Use cp, not /usr/ucb/install. - -Thu Apr 8 11:21:52 1993 Ian Lance Taylor (ian@cygnus.com) - - * mt-a29k, mt-ebmon29k, mt-os68k, mt-ose68000, mt-ose68k, - mt-vxworks68, mt-vxworks960: Removed obsolete, unused target - Makefile fragment files. - -Mon Mar 8 15:05:25 1993 Ken Raeburn (raeburn@cambridge.cygnus.com) - - * mh-aix386: New file; old mh-aix, plus no-op RANLIB. - -Thu Oct 1 13:50:48 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com) - - * mh-solaris: INSTALL is NOT /usr/ucb/install - -Mon Aug 24 14:25:35 1992 Ian Lance Taylor (ian@cygnus.com) - - * mt-ose68000, mt-ose68k: renamed from mt-OSE*. - -Tue Jul 21 02:11:01 1992 D. V. Henkel-Wallace (gumby@cygnus.com) - - * mt-OSE68k, mt-680000: new configs. - -Thu Jul 16 17:12:09 1992 K. Richard Pixley (rich@rtl.cygnus.com) - - * mh-irix4: merged changes from progressive. - -Tue Jun 9 23:29:38 1992 Per Bothner (bothner@rtl.cygnus.com) - - * Everywhere: Change RANLIB=echo>/dev/null (which confuses - some shells - and I don't blame them) to RANLIB=true. - * mh-solaris: Use /usr/ucb/install for INSTALL. - -Sun May 31 14:45:23 1992 Mark Eichin (eichin at cygnus.com) - - * mh-solaris2: Add new configuration for Solaris 2 (sysv, no ranlib) - -Fri Apr 10 23:10:08 1992 Fred Fish (fnf@cygnus.com) - - * mh-ncr3000: Add new configuration for NCR 3000. - -Tue Dec 10 00:10:55 1991 K. Richard Pixley (rich at rtl.cygnus.com) - - * ChangeLog: fresh changelog. - diff --git a/contrib/gcc/config/acinclude.m4 b/contrib/gcc/config/acinclude.m4 deleted file mode 100644 index 6669ac2..0000000 --- a/contrib/gcc/config/acinclude.m4 +++ /dev/null @@ -1,1995 +0,0 @@ -dnl This file is included into all any other acinclude file that needs -dnl to use these macros. - -dnl This is copied from autoconf 2.12, but does calls our own AC_PROG_CC_WORKS, -dnl and doesn't call AC_PROG_CXX_GNU, cause we test for that in AC_PROG_CC_WORKS. -dnl We are probably using a cross compiler, which will not be able to fully -dnl link an executable. This should really be fixed in autoconf itself. -dnl Find a working G++ cross compiler. This only works for the GNU C++ compiler. -AC_DEFUN(CYG_AC_PROG_CXX_CROSS, -[AC_BEFORE([$0], [AC_PROG_CXXCPP]) -AC_CHECK_PROGS(CXX, $CCC c++ g++ gcc CC cxx cc++, gcc) - -CYG_AC_PROG_GXX_WORKS - -if test $ac_cv_prog_gxx = yes; then - GXX=yes -dnl Check whether -g works, even if CXXFLAGS is set, in case the package -dnl plays around with CXXFLAGS (such as to build both debugging and -dnl normal versions of a library), tasteless as that idea is. - ac_test_CXXFLAGS="${CXXFLAGS+set}" - ac_save_CXXFLAGS="$CXXFLAGS" - CXXFLAGS= - AC_PROG_CXX_G - if test "$ac_test_CXXFLAGS" = set; then - CXXFLAGS="$ac_save_CXXFLAGS" - elif test $ac_cv_prog_cxx_g = yes; then - CXXFLAGS="-g -O2" - else - CXXFLAGS="-O2" - fi -else - GXX= - test "${CXXFLAGS+set}" = set || CXXFLAGS="-g" -fi -]) - -dnl See if the G++ compiler we found works. -AC_DEFUN(CYG_AC_PROG_GXX_WORKS, -[AC_MSG_CHECKING([whether the G++ compiler ($CXX $CXXFLAGS $LDFLAGS) actually works]) -AC_LANG_SAVE -AC_LANG_CPLUSPLUS -dnl Try a test case. We only compile, because it's close to impossible -dnl to get a correct fully linked executable with a cross compiler. For -dnl most cross compilers, this test is bogus. For G++, we can use various -dnl other compile line options to get a decent idea that the cross compiler -dnl actually does work, even though we can't produce an executable without -dnl more info about the target it's being compiled for. This only works -dnl for the GNU C++ compiler. - -dnl Transform the name of the compiler to it's cross variant, unless -dnl CXX is set. This is also what CXX gets set to in the generated -dnl Makefile. -if test x"${CXX}" = xc++ ; then - CXX=`echo gcc | sed -e "${program_transform_name}"` -fi - -dnl Get G++'s full path to libgcc.a -libgccpath=`${CXX} --print-libgcc` - -dnl If we don't have a path with libgcc.a on the end, this isn't G++. -if test `echo $libgccpath | sed -e 's:/.*/::'` = libgcc.a ; then - ac_cv_prog_gxx=yes -else - ac_cv_prog_gxx=no -fi - -dnl If we are using G++, look for the files that need to exist if this -dnl compiler works. -if test x"${ac_cv_prog_gxx}" = xyes ; then - gccfiles=`echo $libgccpath | sed -e 's:/libgcc.a::'` - if test -f ${gccfiles}/specs -a -f ${gccfiles}/cpp -a -f ${gccfiles}/cc1plus; then - gccfiles=yes - else - gccfiles=no - fi - gcclibs=`echo $libgccpath | sed -e 's:lib/gcc-lib/::' -e 's:/libgcc.a::' -e 's,\(.*\)/.*,\1,g'`/lib - if test -d ${gcclibs}/ldscripts -a -f ${gcclibs}/libc.a -a -f ${gcclibs}/libstdc++.a ; then - gcclibs=yes - else - gcclibs=no - fi -fi - -dnl If everything is OK, then we can safely assume the compiler works. -if test x"${gccfiles}" = xno -o x"${gcclibs}" = xno; then - ac_cv_prog_cxx_works=no - AC_MSG_ERROR(${CXX} is a non-working cross compiler) -else - ac_cv_prog_cxx_works=yes -fi - -AC_LANG_RESTORE -AC_MSG_RESULT($ac_cv_prog_cxx_works) -if test x"$ac_cv_prog_cxx_works" = xno; then - AC_MSG_ERROR([installation or configuration problem: C++ compiler cannot create executables.]) -fi -AC_MSG_CHECKING([whether the G++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler]) -AC_MSG_RESULT($ac_cv_prog_cxx_cross) -cross_compiling=$ac_cv_prog_cxx_cross -AC_SUBST(CXX) -]) - -dnl ==================================================================== -dnl Find a working GCC cross compiler. This only works for the GNU gcc compiler. -dnl This is based on the macros above for G++. -AC_DEFUN(CYG_AC_PROG_CC_CROSS, -[AC_BEFORE([$0], [AC_PROG_CCPP]) -AC_CHECK_PROGS(CC, cc, gcc) - -CYG_AC_PROG_GCC_WORKS - -if test $ac_cv_prog_gcc = yes; then - GCC=yes -dnl Check whether -g works, even if CFLAGS is set, in case the package -dnl plays around with CFLAGS (such as to build both debugging and -dnl normal versions of a library), tasteless as that idea is. - ac_test_CFLAGS="${CFLAGS+set}" - ac_save_CFLAGS="$CFLAGS" - CFLAGS= - AC_PROG_CC_G - if test "$ac_test_CFLAGS" = set; then - CFLAGS="$ac_save_CFLAGS" - elif test $ac_cv_prog_cc_g = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-O2" - fi -else - GXX= - test "${CFLAGS+set}" = set || CFLAGS="-g" -fi -]) - -dnl See if the GCC compiler we found works. -AC_DEFUN(CYG_AC_PROG_GCC_WORKS, -[AC_MSG_CHECKING([whether the Gcc compiler ($CC $CFLAGS $LDFLAGS) actually works]) -AC_LANG_SAVE -AC_LANG_C -dnl Try a test case. We only compile, because it's close to impossible -dnl to get a correct fully linked executable with a cross -dnl compiler. For most cross compilers, this test is bogus. For G++, -dnl we can use various other compile line options to get a decent idea -dnl that the cross compiler actually does work, even though we can't -dnl produce an executable without more info about the target it's -dnl being compiled for. This only works for the GNU C++ compiler. - -dnl Transform the name of the compiler to it's cross variant, unless -dnl CXX is set. This is also what CC gets set to in the generated Makefile. -if test x"${CC}" = xcc ; then - CC=`echo gcc | sed -e "${program_transform_name}"` -fi - -dnl Get Gcc's full path to libgcc.a -libgccpath=`${CC} --print-libgcc` - -dnl If we don't have a path with libgcc.a on the end, this isn't G++. -if test `echo $libgccpath | sed -e 's:/.*/::'` = libgcc.a ; then - ac_cv_prog_gcc=yes -else - ac_cv_prog_gcc=no -fi - -dnl If we are using Gcc, look for the files that need to exist if this -dnl compiler works. -if test x"${ac_cv_prog_gcc}" = xyes ; then - gccfiles=`echo $libgccpath | sed -e 's:/libgcc.a::'` - if test -f ${gccfiles}/specs -a -f ${gccfiles}/cpp -a -f ${gccfiles}/cc1plus; then - gccfiles=yes - else - gccfiles=no - fi - gcclibs=`echo $libgccpath | sed -e 's:lib/gcc-lib/::' -e 's:/libgcc.a::' -e 's,\(.*\)/.*,\1,g'`/lib - if test -d ${gcclibs}/ldscripts -a -f ${gcclibs}/libc.a -a -f ${gcclibs}/libstdc++.a ; then - gcclibs=yes - else - gcclibs=no - fi -fi - -dnl If everything is OK, then we can safely assume the compiler works. -if test x"${gccfiles}" = xno -o x"${gcclibs}" = xno; then - ac_cv_prog_cc_works=no - AC_MSG_ERROR(${CC} is a non-working cross compiler) -else - ac_cv_prog_cc_works=yes -fi - -AC_LANG_RESTORE -AC_MSG_RESULT($ac_cv_prog_cc_works) -if test x"$ac_cv_prog_cc_works" = xno; then - AC_MSG_ERROR([installation or configuration problem: C++ compiler cannot create executables.]) -fi -AC_MSG_CHECKING([whether the Gcc compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler]) -AC_MSG_RESULT($ac_cv_prog_cc_cross) -cross_compiling=$ac_cv_prog_cc_cross -AC_SUBST(CC) -]) - -dnl ==================================================================== -dnl Find the BFD library in the build tree. This is used to access and -dnl manipulate object or executable files. -AC_DEFUN(CYG_AC_PATH_BFD, [ -AC_MSG_CHECKING(for the bfd header in the build tree) -dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.." -dnl Look for the header file -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 -]) -if test x"${ac_cv_c_bfdh}" != x; then - BFDHDIR="-I${ac_cv_c_bfdh}" - AC_MSG_RESULT(${ac_cv_c_bfdh}) -else - AC_MSG_RESULT(none) -fi -AC_SUBST(BFDHDIR) - -dnl Look for the library -AC_MSG_CHECKING(for the bfd library in the build tree) -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 -]) -dnl We list two directories cause bfd now uses libtool -if test x"${ac_cv_c_bfdlib}" != x; then - BFDLIB="-L${ac_cv_c_bfdlib} -L${ac_cv_c_bfdlib}/.libs" - AC_MSG_RESULT(${ac_cv_c_bfdlib}) -else - AC_MSG_RESULT(none) -fi -AC_SUBST(BFDLIB) -]) - -dnl ==================================================================== -dnl Find the libiberty library. This defines many commonly used C -dnl functions that exists in various states based on the underlying OS. -AC_DEFUN(CYG_AC_PATH_LIBERTY, [ -AC_MSG_CHECKING(for the liberty library in the build tree) -dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.." -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 -]) -if test x"${ac_cv_c_liberty}" != x; then - LIBERTY="-L${ac_cv_c_liberty}" - AC_MSG_RESULT(${ac_cv_c_liberty}) -else - AC_MSG_RESULT(none) -fi -AC_SUBST(LIBERTY) -]) - -dnl ==================================================================== -dnl Find the opcodes library. This is used to do dissasemblies. -AC_DEFUN(CYG_AC_PATH_OPCODES, [ -AC_MSG_CHECKING(for the opcodes library in the build tree) -dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.." -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 -]) -if test x"${ac_cv_c_opc}" != x; then - OPCODESLIB="-L${ac_cv_c_opc}" - AC_MSG_RESULT(${ac_cv_c_opc}) -else - AC_MSG_RESULT(none) -fi -AC_SUBST(OPCODESLIB) -]) - -dnl ==================================================================== -dnl Look for the DejaGnu header file in the source tree. This file -dnl defines the functions used to testing support. -AC_DEFUN(CYG_AC_PATH_DEJAGNU, [ -AC_MSG_CHECKING(for the testing support files in the source tree) -dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.." -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 -]) -if test x"${ac_cv_c_dejagnu}" != x; then - DEJAGNUHDIR="-I${ac_cv_c_dejagnu}" - AC_MSG_RESULT(${ac_cv_c_dejagnu}) -else - AC_MSG_RESULT(none) -fi -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 -]) -if test x"${ac_cv_c_dejagnulib}" != x; then - DEJAGNULIB="${ac_cv_c_dejagnulib}" -else - DEJAGNULIB="" -fi -AC_MSG_CHECKING(for runtest in the source tree) -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 -]) -if test x"${ac_cv_c_runtest}" != x; then - RUNTESTDIR="${ac_cv_c_runtest}" - AC_MSG_RESULT(${ac_cv_c_runtest}) -else - RUNTESTDIR="" - AC_MSG_RESULT(none) -fi -AC_SUBST(RUNTESTDIR) -AC_SUBST(DEJAGNULIB) -AC_SUBST(DEJAGNUHDIR) -]) - -dnl ==================================================================== -dnl Find the libintl library in the build tree. This is for -dnl internationalization support. -AC_DEFUN(CYG_AC_PATH_INTL, [ -AC_MSG_CHECKING(for the intl header in the build tree) -dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.." -dnl Look for the header file -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 -]) -if test x"${ac_cv_c_intlh}" != x; then - INTLHDIR="-I${ac_cv_c_intlh}" - AC_MSG_RESULT(${ac_cv_c_intlh}) -else - AC_MSG_RESULT(none) -fi -AC_SUBST(INTLHDIR) - -dnl Look for the library -AC_MSG_CHECKING(for the libintl library in the build tree) -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 -]) -if test x"${ac_cv_c_intllib}" != x; then - INTLLIB="-L${ac_cv_c_intllib} -lintl" - AC_MSG_RESULT(${ac_cv_c_intllib}) -else - AC_MSG_RESULT(none) -fi -AC_SUBST(INTLLIB) -]) - -dnl ==================================================================== -dnl Find the simulator library. -AC_DEFUN(CYG_AC_PATH_SIM, [ -dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.. ../../../../../../../../../.." -case "$target_cpu" in - powerpc) target_dir=ppc ;; - sparc*) target_dir=erc32 ;; - mips*) target_dir=mips ;; - *) target_dir=$target_cpu ;; -esac -dnl First look for the header file -AC_MSG_CHECKING(for the simulator header file) -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 -]) -if test x"${ac_cv_c_simh}" != x; then - SIMHDIR="-I${ac_cv_c_simh}" - AC_MSG_RESULT(${ac_cv_c_simh}) -else - AC_MSG_RESULT(none) -fi -AC_SUBST(SIMHDIR) - -dnl See whether it's a devo or Foundry branch simulator -AC_MSG_CHECKING(Whether this is a devo simulator ) -AC_CACHE_VAL(ac_cv_c_simdevo,[ - CPPFLAGS="$CPPFLAGS $SIMHDIR" - AC_EGREP_HEADER([SIM_DESC sim_open.*struct _bfd], remote-sim.h, - ac_cv_c_simdevo=yes, - ac_cv_c_simdevo=no) -]) -if test x"$ac_cv_c_simdevo" = x"yes" ; then - AC_DEFINE(HAVE_DEVO_SIM) -fi -AC_MSG_RESULT(${ac_cv_c_simdevo}) -AC_SUBST(HAVE_DEVO_SIM) - -dnl Next look for the library -AC_MSG_CHECKING(for the simulator library) -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 -]) -if test x"${ac_cv_c_simlib}" != x; then - SIMLIB="-L${ac_cv_c_simlib}" -else - AC_MSG_RESULT(none) - dnl FIXME: this is kinda bogus, cause umtimately the TM will build - dnl all the libraries for several architectures. But for now, this - dnl will work till then. -dnl AC_MSG_CHECKING(for the simulator installed with the compiler libraries) - dnl Transform the name of the compiler to it's cross variant, unless - dnl CXX is set. This is also what CXX gets set to in the generated - dnl Makefile. - CROSS_GCC=`echo gcc | sed -e "s/^/$target/"` - - dnl Get G++'s full path to libgcc.a -changequote(,) - gccpath=`${CROSS_GCC} --print-libgcc | sed -e 's:[a-z0-9A-Z\.\-]*/libgcc.a::' -e 's:lib/gcc-lib/::'`lib -changequote([,]) - if test -f $gccpath/libsim.a -o -f $gccpath/libsim.so ; then - ac_cv_c_simlib="$gccpath/" - SIMLIB="-L${ac_cv_c_simlib}" - AC_MSG_RESULT(${ac_cv_c_simlib}) - else - AM_CONDITIONAL(PSIM, test x$psim = xno) - SIMLIB="" - AC_MSG_RESULT(none) -dnl ac_cv_c_simlib=none - fi -fi -AC_SUBST(SIMLIB) -]) - -dnl ==================================================================== -dnl Find the libiberty library. -AC_DEFUN(CYG_AC_PATH_LIBIBERTY, [ -AC_MSG_CHECKING(for the libiberty library in the build tree) -dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.." -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 -]) -if test x"${ac_cv_c_libib}" != x; then - LIBIBERTY="-L${ac_cv_c_libib}" - AC_MSG_RESULT(${ac_cv_c_libib}) -else - AC_MSG_RESULT(none) -fi -AC_SUBST(LIBIBERTY) -]) - -dnl ==================================================================== -AC_DEFUN(CYG_AC_PATH_DEVO, [ -AC_MSG_CHECKING(for devo headers in the source tree) -dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.." -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 -]) -if test x"${ac_cv_c_devoh}" != x; then - DEVOHDIR="-I${ac_cv_c_devoh}" - AC_MSG_RESULT(${ac_cv_c_devoh}) -else - AC_MSG_RESULT(none) -fi -AC_SUBST(DEVOHDIR) -]) - -dnl ==================================================================== -dnl find the IDE library and headers. -AC_DEFUN(CYG_AC_PATH_IDE, [ -AC_MSG_CHECKING(for IDE headers in the source tree) -dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.." -IDEHDIR= -IDELIB= -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 -]) -if test x"${ac_cv_c_ideh}" != x; then - IDEHDIR="-I${ac_cv_c_ideh}" - AC_MSG_RESULT(${ac_cv_c_ideh}) -else - AC_MSG_RESULT(none) -fi - -AC_MSG_CHECKING(for LIBIDE TCL headers in the source tree) -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 -]) -if test x"${ac_cv_c_idetclh}" != x; then - IDEHDIR="${IDEHDIR} -I${ac_cv_c_idetclh}" - AC_MSG_RESULT(${ac_cv_c_idetclh}) -else - AC_MSG_RESULT(none) -fi - -AC_MSG_CHECKING(for IDE headers in the build tree) -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 -]) -if test x"${ac_cv_c_ideh2}" != x; then - IDEHDIR="${IDEHDIR} -I${ac_cv_c_ideh2}" - AC_MSG_RESULT(${ac_cv_c_ideh2}) -else - AC_MSG_RESULT(none) -fi - -dnl look for the library -AC_MSG_CHECKING(for IDE library) -AC_CACHE_VAL(ac_cv_c_idelib,[ -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 -fi]) -if test x"${ac_cv_c_idelib}" != x ; then - IDELIB="-L${ac_cv_c_idelib}" - AC_MSG_RESULT(${ac_cv_c_idelib}) -else - AC_MSG_RESULT(none) -fi - -dnl find libiddetcl.a if it exists -AC_MSG_CHECKING(for IDE TCL library) -AC_CACHE_VAL(ac_cv_c_idetcllib,[ -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 -fi -]) -if test x"${ac_cv_c_idetcllib}" != x ; then - IDELIB="${IDELIB} -L${ac_cv_c_idetcllib}" - IDETCLLIB="-lidetcl" - AC_MSG_RESULT(${ac_cv_c_idetcllib}) -else - AC_MSG_RESULT(none) -fi -AC_SUBST(IDEHDIR) -AC_SUBST(IDELIB) -AC_SUBST(IDETCLLIB) -]) - -dnl ==================================================================== -dnl Find all the ILU headers and libraries -AC_DEFUN(CYG_AC_PATH_ILU, [ -AC_MSG_CHECKING(for ILU kernel headers in the source tree) -dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.." -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 -]) -if test x"${ac_cv_c_iluh}" != x; then - ILUHDIR="-I${ac_cv_c_iluh}" - AC_MSG_RESULT(${ac_cv_c_iluh}) -else - AC_MSG_RESULT(none) -fi - -AC_MSG_CHECKING(for ILU kernel headers in the build tree) -dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.." -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 -]) -if test x"${ac_cv_c_iluh5}" != x; then - ILUHDIR="${ILUHDIR} -I${ac_cv_c_iluh5}" - AC_MSG_RESULT(${ac_cv_c_iluh5}) -else - AC_MSG_RESULT(none) -fi - -AC_MSG_CHECKING(for ILU C++ headers in the source tree) -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 -]) -if test x"${ac_cv_c_iluh2}" != x; then - ILUHDIR="${ILUHDIR} -I${ac_cv_c_iluh2}" - AC_MSG_RESULT(${ac_cv_c_iluh2}) -else - AC_MSG_RESULT(none) -fi - -AC_MSG_CHECKING(for ILU C headers) -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 -]) -if test x"${ac_cv_c_iluh3}" != x; then - ILUHDIR="${ILUHDIR} -I${ac_cv_c_iluh3}" - AC_MSG_RESULT(${ac_cv_c_iluh3}) -else - AC_MSG_RESULT(none) -fi - -AC_MSG_CHECKING(for ILU C runtime headers) -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 -]) -if test x"${ac_cv_c_iluh4}" != x; then - ILUHDIR="${ILUHDIR} -I${ac_cv_c_iluh4}" - AC_MSG_RESULT(${ac_cv_c_iluh4}) -else - AC_MSG_RESULT(none) -fi - -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 -]) -ILUTOP=${ac_cv_c_ilupath} - -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) -fi]) - -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) -fi]) - -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) -fi]) - -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) -fi]) - -if test x"${ac_cv_c_ilulib}" = x -a x"${ac_cv_c_ilulib2}" = x; then - ILUHDIR="" -fi - -if test x"${ac_cv_c_ilulib}" != x -a x"${ac_cv_c_ilulib2}" != x; then - ILULIB="-L${ac_cv_c_ilulib} -L${ac_cv_c_ilulib2} -L${ac_cv_c_ilulib3} -L${ac_cv_c_ilulib4}" -else - ILULIB="" -fi - -if test x"${ILULIB}" = x; then - AC_MSG_CHECKING(for ILU libraries installed with the compiler) - AC_CACHE_VAL(ac_cv_c_ilulib5,[ - NATIVE_GCC=`echo gcc | sed -e "${program_transform_name}"` - - dnl Get G++'s full path to it's libraries - ac_cv_c_ilulib5=`${NATIVE_GCC} --print-libgcc | sed -e 's:lib/gcc-lib/.*::'`lib - if test -f $ac_cv_c_ilulib5/libilu-c.a -o -f $ac_cv_c_ilulib5/libilu-c.so ; then - if test x"${ILUHDIR}" = x; then - ILUHDIR="-I${ac_cv_c_ilulib5}/../include" - fi - ILULIB="-L${ac_cv_c_ilulib5}" - AC_MSG_RESULT(${ac_cv_c_ilulib5}) - else - ac_cv_c_ilulib=none - AC_MSG_RESULT(none) - fi -fi]) -AC_SUBST(ILUHDIR) -AC_SUBST(ILULIB) -AC_SUBST(ILUTOP) -]) - -dnl ==================================================================== -dnl This defines the byte order for the host. We can't use -dnl AC_C_BIGENDIAN, cause we want to create a config file and -dnl substitue the real value, so the header files work right -AC_DEFUN(CYG_AC_C_ENDIAN, [ -AC_MSG_CHECKING(to see if this is a little endian host) -AC_CACHE_VAL(ac_cv_c_little_endian, [ -ac_cv_c_little_endian=unknown -# See if sys/param.h defines the BYTE_ORDER macro. -AC_TRY_COMPILE([#include -#include ], [ -#if !BYTE_ORDER || !_BIG_ENDIAN || !_LITTLE_ENDIAN - bogus endian macros -#endif], [# It does; now see whether it defined to _LITTLE_ENDIAN or not. -AC_TRY_COMPILE([#include -#include ], [ -#if BYTE_ORDER != _LITTLE_ENDIAN - not big endian -#endif], ac_cv_c_little_endian=yes, ac_cv_c_little_endian=no) -]) -if test ${ac_cv_c_little_endian} = unknown; then -old_cflags=$CFLAGS -CFLAGS=-g -AC_TRY_RUN([ -main () { - /* Are we little or big endian? From Harbison&Steele. */ - union - { - long l; - char c[sizeof (long)]; - } u; - u.l = 1; - exit (u.c[0] == 1); -}], -ac_cv_c_little_endian=no, -ac_cv_c_little_endian=yes,[ -dnl Yes, this is ugly, and only used for a canadian cross anyway. This -dnl is just to keep configure from stopping here. -case "${host}" in -changequote(,) - i[3456]86-*-*) ac_cv_c_little_endian=yes ;; - sparc*-*-*) ac_cv_c_little_endian=no ;; -changequote([,]) - *) AC_MSG_WARN(Can't cross compile this test) ;; -esac]) -CFLAGS=$old_cflags -fi]) - -if test x"${ac_cv_c_little_endian}" = xyes; then - AC_DEFINE(LITTLE_ENDIAN_HOST) - ENDIAN="CYG_LSBFIRST"; -else - ENDIAN="CYG_MSBFIRST"; -fi -AC_MSG_RESULT(${ac_cv_c_little_endian}) -AC_SUBST(ENDIAN) -]) - -dnl ==================================================================== -dnl Look for the path to libgcc, so we can use it to directly link -dnl in libgcc.a with LD. -AC_DEFUN(CYG_AC_PATH_LIBGCC, -[AC_MSG_CHECKING([Looking for the path to libgcc.a]) -AC_LANG_SAVE -AC_LANG_C - -dnl Get Gcc's full path to libgcc.a -libgccpath=`${CC} --print-libgcc` - -dnl If we don't have a path with libgcc.a on the end, this isn't G++. -if test `echo $libgccpath | sed -e 's:/.*/::'` = libgcc.a ; then - ac_cv_prog_gcc=yes -else - ac_cv_prog_gcc=no -fi - -dnl -if test x"${ac_cv_prog_gcc}" = xyes ; then - gccpath=`echo $libgccpath | sed -e 's:/libgcc.a::'` - LIBGCC="-L${gccpath}" - AC_MSG_RESULT(${gccpath}) -else - LIBGCC="" - AC_MSG_ERROR(Not using gcc) -fi - -AC_LANG_RESTORE -AC_SUBST(LIBGCC) -]) - -dnl ==================================================================== -dnl Ok, lets find the tcl source trees so we can use the headers -dnl Warning: transition of version 9 to 10 will break this algorithm -dnl because 10 sorts before 9. We also look for just tcl. We have to -dnl be careful that we don't match stuff like tclX by accident. -dnl the alternative search directory is involked by --with-tclinclude -AC_DEFUN(CYG_AC_PATH_TCL, [ - CYG_AC_PATH_TCLH - CYG_AC_PATH_TCLCONFIG - CYG_AC_LOAD_TCLCONFIG -]) -AC_DEFUN(CYG_AC_PATH_TCLH, [ -dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.." -no_tcl=true -AC_MSG_CHECKING(for Tcl headers in the source tree) -AC_ARG_WITH(tclinclude, [ --with-tclinclude directory where tcl headers are], with_tclinclude=${withval}) -AC_CACHE_VAL(ac_cv_c_tclh,[ -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 -fi - -dnl next check if it came with Tcl configuration file -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 -fi - -dnl next check in private source directory -dnl since ls returns lowest version numbers first, reverse its output -if test x"${ac_cv_c_tclh}" = x ; then - dnl find the top level Tcl source directory - for i in $dirlist; do - if test -n "`ls -dr $srcdir/$i/tcl* 2>/dev/null`" ; then - tclpath=$srcdir/$i - break - fi - done - - dnl find the exact Tcl source 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 $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 -fi - -dnl check if its installed with the compiler -if test x"${ac_cv_c_tclh}" = x ; then - dnl Get the path to the compiler - ccpath=`which ${CC} | sed -e 's:/bin/.*::'`/include - if test -f $ccpath/tcl.h; then - ac_cv_c_tclh=$ccpath - fi -fi - -dnl see if one is installed -if test x"${ac_cv_c_tclh}" = x ; then - AC_MSG_RESULT(none) - AC_CHECK_HEADER(tcl.h, ac_cv_c_tclh=installed, ac_cv_c_tclh="") -else - AC_MSG_RESULT(${ac_cv_c_tclh}) -fi -]) - TCLHDIR="" -if test x"${ac_cv_c_tclh}" = x ; then - AC_MSG_ERROR([Can't find any Tcl headers]) -fi -if test x"${ac_cv_c_tclh}" != x ; then - no_tcl="" - if test x"${ac_cv_c_tclh}" != x"installed" ; then - if test x"${CC}" = xcl ; then - tmp="`cygpath --windows ${ac_cv_c_tclh}`" - ac_cv_c_tclh="`echo $tmp | sed -e s#\\\\\\\\#/#g`" - fi - AC_MSG_RESULT(${ac_cv_c_tclh}) - TCLHDIR="-I${ac_cv_c_tclh}" - fi -fi - -AC_SUBST(TCLHDIR) -]) - -dnl ==================================================================== -dnl Ok, lets find the tcl configuration -AC_DEFUN(CYG_AC_PATH_TCLCONFIG, [ -dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.." -dnl First, look for one uninstalled. -dnl the alternative search directory is invoked by --with-tclconfig -if test x"${no_tcl}" = x ; then - dnl we reset no_tcl in case something fails here - no_tcl=true - AC_ARG_WITH(tclconfig, [ --with-tclconfig directory containing tcl configuration (tclConfig.sh)], - with_tclconfig=${withval}) - AC_MSG_CHECKING([for Tcl configuration script]) - AC_CACHE_VAL(ac_cv_c_tclconfig,[ - - 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 - fi - - 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 - fi - dnl check in a few other locations - if test x"${ac_cv_c_tclconfig}" = x ; then - dnl find the top level Tcl source directory - for i in $dirlist; do - if test -n "`ls -dr $i/tcl* 2>/dev/null`" ; then - tclconfpath=$i - break - fi - done - - 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 - fi - - dnl Check to see if it's installed. We have to look in the $CC path - dnl to find it, cause our $prefix may not match the compilers. - if test x"${ac_cv_c_tclconfig}" = x ; then - dnl Get the path to the compiler - ccpath=`which ${CC} | sed -e 's:/bin/.*::'`/lib - if test -f $ccpath/tclConfig.sh; then - ac_cv_c_tclconfig=$ccpath - fi - fi - ]) dnl end of cache_val - - if test x"${ac_cv_c_tclconfig}" = x ; then - TCLCONFIG="" - AC_MSG_WARN(Can't find Tcl configuration definitions) - else - no_tcl="" - TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh - AC_MSG_RESULT(${TCLCONFIG}) - fi -fi -AC_SUBST(TCLCONFIG) -]) - -dnl Defined as a separate macro so we don't have to cache the values -dnl from PATH_TCLCONFIG (because this can also be cached). -AC_DEFUN(CYG_AC_LOAD_TCLCONFIG, [ - . $TCLCONFIG - -dnl AC_SUBST(TCL_VERSION) -dnl AC_SUBST(TCL_MAJOR_VERSION) -dnl AC_SUBST(TCL_MINOR_VERSION) -dnl AC_SUBST(TCL_CC) - AC_SUBST(TCL_DEFS) - -dnl not used, don't export to save symbols - AC_SUBST(TCL_LIB_FILE) - AC_SUBST(TCL_LIB_FULL_PATH) - AC_SUBST(TCL_LIBS) -dnl not used, don't export to save symbols -dnl AC_SUBST(TCL_PREFIX) - - AC_SUBST(TCL_CFLAGS) - -dnl not used, don't export to save symbols -dnl AC_SUBST(TCL_EXEC_PREFIX) - - AC_SUBST(TCL_SHLIB_CFLAGS) - AC_SUBST(TCL_SHLIB_LD) -dnl don't export, not used outside of configure -dnl AC_SUBST(TCL_SHLIB_LD_LIBS) -dnl AC_SUBST(TCL_SHLIB_SUFFIX) -dnl not used, don't export to save symbols -dnl AC_SUBST(TCL_DL_LIBS) - AC_SUBST(TCL_LD_FLAGS) - AC_SUBST(TCL_LD_SEARCH_FLAGS) -dnl don't export, not used outside of configure -dnl AC_SUBST(TCL_COMPAT_OBJS) - AC_SUBST(TCL_RANLIB) - AC_SUBST(TCL_BUILD_LIB_SPEC) - AC_SUBST(TCL_LIB_SPEC) - AC_SUBST(TCL_BIN_DIR) -dnl AC_SUBST(TCL_LIB_VERSIONS_OK) - -dnl not used, don't export to save symbols -dnl AC_SUBST(TCL_SHARED_LIB_SUFFIX) - -dnl not used, don't export to save symbols -dnl AC_SUBST(TCL_UNSHARED_LIB_SUFFIX) -]) - -dnl ==================================================================== -AC_DEFUN(CYG_AC_PATH_TK, [ - CYG_AC_PATH_TKH - CYG_AC_PATH_TKCONFIG - CYG_AC_LOAD_TKCONFIG -]) -AC_DEFUN(CYG_AC_PATH_TKH, [ -# -# Ok, lets find the tk source trees so we can use the headers -# If the directory (presumably symlink) named "tk" exists, use that one -# in preference to any others. Same logic is used when choosing library -# and again with Tcl. The search order is the best place to look first, then in -# decreasing significance. The loop breaks if the trigger file is found. -# Note the gross little conversion here of srcdir by cd'ing to the found -# directory. This converts the path from a relative to an absolute, so -# recursive cache variables for the path will work right. We check all -# the possible paths in one loop rather than many separate loops to speed -# things up. -# the alternative search directory is involked by --with-tkinclude -# -dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.." -no_tk=true -AC_MSG_CHECKING(for Tk headers in the source tree) -AC_ARG_WITH(tkinclude, [ --with-tkinclude directory where tk headers are], with_tkinclude=${withval}) -AC_CACHE_VAL(ac_cv_c_tkh,[ -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 -fi - -dnl next check if it came with Tk configuration file -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 -fi - -dnl next check in private source directory -dnl since ls returns lowest version numbers first, reverse its output -if test x"${ac_cv_c_tkh}" = x ; then - dnl find the top level Tk source directory - for i in $dirlist; do - if test -n "`ls -dr $srcdir/$i/tk* 2>/dev/null`" ; then - tkpath=$srcdir/$i - break - fi - done - - dnl find the exact Tk source 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 $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 -fi - -dnl see if one is installed -if test x"${ac_cv_c_tkh}" = x ; then - AC_MSG_RESULT(none) - dnl Get the path to the compiler. We do it this way instead of using - dnl AC_CHECK_HEADER, cause this doesn't depend in having X configured. - ccpath=`which ${CC} | sed -e 's:/bin/.*::'`/include - if test -f $ccpath/tk.h; then - ac_cv_c_tkh=$ccpath - fi -else - AC_MSG_RESULT(${ac_cv_c_tkh}) -fi -]) - TKHDIR="" -if test x"${ac_cv_c_tkh}" = x ; then - AC_MSG_ERROR([Can't find any Tk headers]) -fi -if test x"${ac_cv_c_tkh}" != x ; then - no_tk="" - if test x"${ac_cv_c_tkh}" != x"installed" ; then - if test x"${CC}" = xcl ; then - tmp="`cygpath --windows ${ac_cv_c_tkh}`" - ac_cv_c_tkh="`echo $tmp | sed -e s#\\\\\\\\#/#g`" - fi - AC_MSG_RESULT([found in ${ac_cv_c_tkh}]) - TKHDIR="-I${ac_cv_c_tkh}" - fi -fi - -AC_SUBST(TKHDIR) -]) - -AC_DEFUN(CYG_AC_PATH_TKCONFIG, [ -dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.." -dnl First, look for one uninstalled. -dnl the alternative search directory is invoked by --with-tkconfig -if test x"${no_tk}" = x ; then - dnl we reset no_tk in case something fails here - no_tk=true - AC_ARG_WITH(tkconfig, [ --with-tkconfig directory containing tk configuration (tkConfig.sh)], - with_tkconfig=${withval}) - AC_MSG_CHECKING([for Tk configuration script]) - AC_CACHE_VAL(ac_cv_c_tkconfig,[ - - 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 - fi - - 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 - fi - dnl check in a few other locations - if test x"${ac_cv_c_tkconfig}" = x ; then - dnl find the top level Tk source directory - for i in $dirlist; do - if test -n "`ls -dr $i/tk* 2>/dev/null`" ; then - tkconfpath=$i - break - fi - done - - 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 - fi - - dnl Check to see if it's installed. We have to look in the $CC path - dnl to find it, cause our $prefix may not match the compilers. - if test x"${ac_cv_c_tkconfig}" = x ; then - dnl Get the path to the compiler - ccpath=`which ${CC} | sed -e 's:/bin/.*::'`/lib - if test -f $ccpath/tkConfig.sh; then - ac_cv_c_tkconfig=$ccpath - fi - fi - ]) dnl end of cache_val - - if test x"${ac_cv_c_tkconfig}" = x ; then - TKCONFIG="" - AC_MSG_WARN(Can't find Tk configuration definitions) - else - no_tk="" - TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh - AC_MSG_RESULT(${TKCONFIG}) - fi -fi -AC_SUBST(TKCONFIG) -]) - -dnl Defined as a separate macro so we don't have to cache the values -dnl from PATH_TKCONFIG (because this can also be cached). -AC_DEFUN(CYG_AC_LOAD_TKCONFIG, [ - if test -f "$TKCONFIG" ; then - . $TKCONFIG - fi - - AC_SUBST(TK_VERSION) -dnl not actually used, don't export to save symbols -dnl AC_SUBST(TK_MAJOR_VERSION) -dnl AC_SUBST(TK_MINOR_VERSION) - AC_SUBST(TK_DEFS) - -dnl not used, don't export to save symbols - AC_SUBST(TK_LIB_FILE) - AC_SUBST(TK_LIB_FULL_PATH) - AC_SUBST(TK_LIBS) -dnl not used, don't export to save symbols -dnl AC_SUBST(TK_PREFIX) - -dnl not used, don't export to save symbols -dnl AC_SUBST(TK_EXEC_PREFIX) - AC_SUBST(TK_BUILD_INCLUDES) - AC_SUBST(TK_XINCLUDES) - AC_SUBST(TK_XLIBSW) - AC_SUBST(TK_BUILD_LIB_SPEC) - AC_SUBST(TK_LIB_SPEC) -]) - -dnl ==================================================================== -dnl Ok, lets find the itcl source trees so we can use the headers -dnl the alternative search directory is involked by --with-itclinclude -AC_DEFUN(CYG_AC_PATH_ITCL, [ - CYG_AC_PATH_ITCLH - CYG_AC_PATH_ITCLLIB - CYG_AC_PATH_ITCLSH - CYG_AC_PATH_ITCLMKIDX -]) -AC_DEFUN(CYG_AC_PATH_ITCLH, [ -dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.." -no_itcl=true -AC_MSG_CHECKING(for Itcl headers in the source tree) -AC_ARG_WITH(itclinclude, [ --with-itclinclude directory where itcl headers are], with_itclinclude=${withval}) -AC_CACHE_VAL(ac_cv_c_itclh,[ -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 -fi - -dnl next check if it came with Itcl configuration file -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 -fi - -dnl next check in private source directory -dnl since ls returns lowest version numbers first, reverse its output -if test x"${ac_cv_c_itclh}" = x ; then - dnl find the top level Itcl source directory - for i in $dirlist; do - if test -n "`ls -dr $srcdir/$i/itcl* 2>/dev/null`" ; then - itclpath=$srcdir/$i - break - fi - done - - dnl find the exact Itcl source dir. We do it this way, cause there - 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 -fi - -dnl see if one is installed -if test x"${ac_cv_c_itclh}" = x ; then - AC_MSG_RESULT(none) - AC_CHECK_HEADER(itcl.h, ac_cv_c_itclh=installed, ac_cv_c_itclh="") -else - AC_MSG_RESULT(${ac_cv_c_itclh}) -fi -]) - ITCLHDIR="" -if test x"${ac_cv_c_itclh}" = x ; then - AC_MSG_ERROR([Can't find any Itcl headers]) -fi -if test x"${ac_cv_c_itclh}" != x ; then - no_itcl="" - if test x"${ac_cv_c_itclh}" != x"installed" ; then - AC_MSG_RESULT(${ac_cv_c_itclh}) - ITCLHDIR="-I${ac_cv_c_itclh}" - fi -fi - -AC_SUBST(ITCLHDIR) -]) - -dnl Ok, lets find the itcl library -dnl First, look for one uninstalled. -dnl the alternative search directory is invoked by --with-itcllib -AC_DEFUN(CYG_AC_PATH_ITCLLIB, [ -dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.." -if test x"${no_itcl}" = x ; then - dnl we reset no_itcl incase something fails here - no_itcl=true - AC_ARG_WITH(itcllib, - [ --with-itcllib directory where the itcl library is], - with_itcllib=${withval}) - AC_MSG_CHECKING([for Itcl library]) - AC_CACHE_VAL(ac_cv_c_itcllib,[ - 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 - dnl then check for a Itcl library. Since these are uninstalled, - dnl use the simple lib name root. - if test x"${ac_cv_c_itcllib}" = x ; then - dnl find the top level Itcl build directory - for i in $dirlist; do - if test -n "`ls -dr $i/itcl* 2>/dev/null`" ; then - itclpath=$i/itcl - break - fi - 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 - if test x"${ac_cv_c_itcllib}" = x ; then - for i in ${dirlist}; do - if test -n "`ls -dr ${srcdir}/$i/itcl* 2>/dev/null`" ; then - itclpath=${srcdir}/$i - break - fi - done - 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 - fi - - dnl see if one is conveniently installed with the compiler - if test x"${ac_cv_c_itcllib}" = x ; then - dnl Get the path to the compiler - 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 - ]) - if test x"${ac_cv_c_itcllib}" = x ; then - ITCLLIB="" - AC_MSG_WARN(Can't find Itcl library) - else - ITCLLIB="-L${ac_cv_c_itcllib}" - AC_MSG_RESULT(${ac_cv_c_itcllib}) - no_itcl="" - fi -fi - -AC_PROVIDE([$0]) -AC_SUBST(ITCLLIB) -]) - - -dnl ==================================================================== -dnl Ok, lets find the itcl source trees so we can use the itcl_sh script -dnl the alternative search directory is involked by --with-itclinclude -AC_DEFUN(CYG_AC_PATH_ITCLSH, [ -dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.." -no_itcl=true -AC_MSG_CHECKING(for the itcl_sh script) -AC_ARG_WITH(itclinclude, [ --with-itclinclude directory where itcl headers are], with_itclinclude=${withval}) -AC_CACHE_VAL(ac_cv_c_itclsh,[ -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 -fi - -dnl next check in private source directory -dnl since ls returns lowest version numbers first, reverse its output -if test x"${ac_cv_c_itclsh}" = x ; then - dnl find the top level Itcl source directory - for i in $dirlist; do - if test -n "`ls -dr $srcdir/$i/itcl* 2>/dev/null`" ; then - itclpath=$srcdir/$i - break - fi - done - - dnl find the exact Itcl source dir. We do it this way, cause there - 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 -fi - -dnl see if one is installed -if test x"${ac_cv_c_itclsh}" = x ; then - AC_MSG_RESULT(none) - AC_PATH_PROG(ac_cv_c_itclsh, itcl_sh) -else - AC_MSG_RESULT(${ac_cv_c_itclsh}) -fi -]) - -if test x"${ac_cv_c_itclsh}" = x ; then - AC_MSG_ERROR([Can't find the itcl_sh script]) -fi -if test x"${ac_cv_c_itclsh}" != x ; then - no_itcl="" - AC_MSG_RESULT(${ac_cv_c_itclsh}) - ITCLSH="${ac_cv_c_itclsh}" -fi -AC_SUBST(ITCLSH) -]) - - -dnl ==================================================================== -dnl Ok, lets find the itcl source trees so we can use the itcl_sh script -dnl the alternative search directory is involked by --with-itclinclude -AC_DEFUN(CYG_AC_PATH_ITCLMKIDX, [ -dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.." -no_itcl=true -AC_MSG_CHECKING(for itcl_mkindex.tcl script) -AC_ARG_WITH(itclinclude, [ --with-itclinclude directory where itcl headers are], with_itclinclude=${withval}) -AC_CACHE_VAL(ac_cv_c_itclmkidx,[ -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 -fi - -dnl next check in private source directory -dnl since ls returns lowest version numbers first, reverse its output -if test x"${ac_cv_c_itclmkidx}" = x ; then - dnl find the top level Itcl source directory - for i in $dirlist; do - if test -n "`ls -dr $srcdir/$i/itcl* 2>/dev/null`" ; then - itclpath=$srcdir/$i - break - fi - done - - dnl find the exact Itcl source dir. We do it this way, cause there - 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 -fi -if test x"${ac_cv_c_itclmkidx}" = x ; then - dnl Get the path to the compiler - ccpath=`which ${CC} | sed -e 's:/bin/.*::'`/share - 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 -fi -]) - -if test x"${ac_cv_c_itclmkidx}" = x ; then - AC_MSG_ERROR([Can't find the itcl_mkindex.tcl script]) -fi -if test x"${ac_cv_c_itclmkidx}" != x ; then - no_itcl="" - AC_MSG_RESULT(${ac_cv_c_itclmkidx}) - ITCLMKIDX="${ac_cv_c_itclmkidx}" -else - AC_MSG_RESULT(none) -fi -AC_SUBST(ITCLMKIDX) -]) - -dnl ==================================================================== -dnl Ok, lets find the tix source trees so we can use the headers -dnl the alternative search directory is involked by --with-tixinclude -AC_DEFUN(CYG_AC_PATH_TIX, [ - CYG_AC_PATH_TIXH - CYG_AC_PATH_TIXLIB -]) -AC_DEFUN(CYG_AC_PATH_TIXH, [ -dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.." -no_tix=true -AC_MSG_CHECKING(for Tix headers in the source tree) -AC_ARG_WITH(tixinclude, [ --with-tixinclude directory where tix headers are], with_tixinclude=${withval}) -AC_CACHE_VAL(ac_cv_c_tixh,[ -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 -fi - -dnl next check if it came with Tix configuration file -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 -fi - -dnl next check in private source directory -dnl since ls returns lowest version numbers first, reverse its output -if test x"${ac_cv_c_tixh}" = x ; then - dnl find the top level Tix source directory - for i in $dirlist; do - if test -n "`ls -dr $srcdir/$i/tix* 2>/dev/null`" ; then - tixpath=$srcdir/$i - break - fi - done - - dnl find the exact Tix source dir. We do it this way, cause there - 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 -fi - -dnl see if one is installed -if test x"${ac_cv_c_tixh}" = x ; then - AC_MSG_RESULT(none) - dnl Get the path to the compiler - - dnl Get the path to the compiler. We do it this way instead of using - dnl AC_CHECK_HEADER, cause this doesn't depend in having X configured. - ccpath=`which ${CC} | sed -e 's:/bin/.*::'`/include - if test -f $ccpath/tix.h; then - ac_cv_c_tixh=installed - fi -else - AC_MSG_RESULT(${ac_cv_c_tixh}) -fi -]) -if test x"${ac_cv_c_tixh}" = x ; then - AC_MSG_ERROR([Can't find any Tix headers]) -fi -if test x"${ac_cv_c_tixh}" != x ; then - no_tix="" - AC_MSG_RESULT(${ac_cv_c_tixh}) - if test x"${ac_cv_c_tixh}" != x"installed" ; then - TIXHDIR="-I${ac_cv_c_tixh}" - fi -fi - -AC_SUBST(TIXHDIR) -]) - -AC_DEFUN(CYG_AC_PATH_TIXCONFIG, [ -# -# Ok, lets find the tix configuration -# First, look for one uninstalled. -# the alternative search directory is invoked by --with-tixconfig -# - -if test x"${no_tix}" = x ; then - # we reset no_tix in case something fails here - no_tix=true - AC_ARG_WITH(tixconfig, [ --with-tixconfig directory containing tix configuration (tixConfig.sh)], - with_tixconfig=${withval}) - AC_MSG_CHECKING([for Tix configuration]) - AC_CACHE_VAL(ac_cv_c_tixconfig,[ - - # 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 - fi - - # then check for a private Tix library - if test x"${ac_cv_c_tixconfig}" = x ; then - for i in \ - ../tix \ - `ls -dr ../tix[[4]]* 2>/dev/null` \ - ../../tix \ - `ls -dr ../../tix[[4]]* 2>/dev/null` \ - ../../../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 - fi - # check in a few common install locations - 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 - fi - # check in a few other private locations - if test x"${ac_cv_c_tixconfig}" = x ; then - for i in \ - ${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 - fi - ]) - if test x"${ac_cv_c_tixconfig}" = x ; then - TIXCONFIG="# no Tix configs found" - AC_MSG_WARN(Can't find Tix configuration definitions) - else - no_tix= - TIXCONFIG=${ac_cv_c_tixconfig}/tixConfig.sh - AC_MSG_RESULT(found $TIXCONFIG) - fi -fi - -]) - -# Defined as a separate macro so we don't have to cache the values -# from PATH_TIXCONFIG (because this can also be cached). -AC_DEFUN(CYG_AC_LOAD_TIXCONFIG, [ - if test -f "$TIXCONFIG" ; then - . $TIXCONFIG - fi - - AC_SUBST(TIX_BUILD_LIB_SPEC) - AC_SUBST(TIX_LIB_FULL_PATH) -]) - -AC_DEFUN(CYG_AC_PATH_ITCLCONFIG, [ -# -# Ok, lets find the itcl configuration -# First, look for one uninstalled. -# the alternative search directory is invoked by --with-itclconfig -# - -if test x"${no_itcl}" = x ; then - # we reset no_itcl in case something fails here - no_itcl=true - AC_ARG_WITH(itclconfig, [ --with-itclconfig directory containing itcl configuration (itclConfig.sh)], - with_itclconfig=${withval}) - AC_MSG_CHECKING([for Itcl configuration]) - AC_CACHE_VAL(ac_cv_c_itclconfig,[ - - # 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 - fi - - # then check for a private itcl library - if test x"${ac_cv_c_itclconfig}" = x ; then - for i in \ - ../itcl/itcl \ - `ls -dr ../itcl/itcl[[3]]* 2>/dev/null` \ - ../../itcl/itcl \ - `ls -dr ../../itcl/itcl[[3]]* 2>/dev/null` \ - ../../../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 - fi - # check in a few common install locations - 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 - fi - # check in a few other private locations - if test x"${ac_cv_c_itclconfig}" = x ; then - for i in \ - ${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 - fi - ]) - if test x"${ac_cv_c_itclconfig}" = x ; then - ITCLCONFIG="# no itcl configs found" - AC_MSG_WARN(Can't find itcl configuration definitions) - else - no_itcl= - ITCLCONFIG=${ac_cv_c_itclconfig}/itclConfig.sh - AC_MSG_RESULT(found $ITCLCONFIG) - fi -fi - -]) - -# Defined as a separate macro so we don't have to cache the values -# from PATH_ITCLCONFIG (because this can also be cached). -AC_DEFUN(CYG_AC_LOAD_ITCLCONFIG, [ - if test -f "$ITCLCONFIG" ; then - . $ITCLCONFIG - fi - - AC_SUBST(ITCL_BUILD_LIB_SPEC) - AC_SUBST(ITCL_SH) - AC_SUBST(ITCL_LIB_FILE) - AC_SUBST(ITCL_LIB_FULL_PATH) - -]) - - -AC_DEFUN(CYG_AC_PATH_ITKCONFIG, [ -# -# Ok, lets find the itk configuration -# First, look for one uninstalled. -# the alternative search directory is invoked by --with-itkconfig -# - -if test x"${no_itk}" = x ; then - # we reset no_itk in case something fails here - no_itk=true - AC_ARG_WITH(itkconfig, [ --with-itkconfig directory containing itk configuration (itkConfig.sh)], - with_itkconfig=${withval}) - AC_MSG_CHECKING([for Itk configuration]) - AC_CACHE_VAL(ac_cv_c_itkconfig,[ - - # 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 - fi - - # then check for a private itk library - if test x"${ac_cv_c_itkconfig}" = x ; then - for i in \ - ../itcl/itk \ - `ls -dr ../itcl/itk[[3]]* 2>/dev/null` \ - ../../itcl/itk \ - `ls -dr ../../itcl/itk[[3]]* 2>/dev/null` \ - ../../../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 - fi - # check in a few common install locations - 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 - fi - # check in a few other private locations - if test x"${ac_cv_c_itkconfig}" = x ; then - for i in \ - ${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 - fi - ]) - if test x"${ac_cv_c_itkconfig}" = x ; then - ITCLCONFIG="# no itk configs found" - AC_MSG_WARN(Can't find itk configuration definitions) - else - no_itk= - ITKCONFIG=${ac_cv_c_itkconfig}/itkConfig.sh - AC_MSG_RESULT(found $ITKCONFIG) - fi -fi - -]) - -# Defined as a separate macro so we don't have to cache the values -# from PATH_ITKCONFIG (because this can also be cached). -AC_DEFUN(CYG_AC_LOAD_ITKCONFIG, [ - if test -f "$ITKCONFIG" ; then - . $ITKCONFIG - fi - - AC_SUBST(ITK_BUILD_LIB_SPEC) - AC_SUBST(ITK_LIB_FILE) - AC_SUBST(ITK_LIB_FULL_PATH) -]) - - -dnl ==================================================================== -dnl Ok, lets find the libgui source trees so we can use the headers -dnl the alternative search directory is involked by --with-libguiinclude -AC_DEFUN(CYG_AC_PATH_LIBGUI, [ - CYG_AC_PATH_LIBGUIH - CYG_AC_PATH_LIBGUILIB -]) -AC_DEFUN(CYG_AC_PATH_LIBGUIH, [ -dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../..../../../../../../../../../../.." -no_libgui=true -AC_MSG_CHECKING(for Libgui headers in the source tree) -AC_ARG_WITH(libguiinclude, [ --with-libguiinclude directory where libgui headers are], with_libguiinclude=${withval}) -AC_CACHE_VAL(ac_cv_c_libguih,[ -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 -fi - -dnl next check if it came with Libgui configuration file -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 -fi - -dnl next check in private source directory -dnl since ls returns lowest version numbers first, reverse its output -if test x"${ac_cv_c_libguih}" = x ; then - dnl find the top level Libgui source directory - for i in $dirlist; do - if test -n "`ls -dr $srcdir/$i/libgui* 2>/dev/null`" ; then - libguipath=$srcdir/$i - break - fi - done - - dnl find the exact Libgui source dir. We do it this way, cause there - 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 -fi - -dnl see if one is installed -if test x"${ac_cv_c_libguih}" = x ; then - AC_MSG_RESULT(none) - AC_CHECK_HEADER(guitcl.h, ac_cv_c_libguih=installed, ac_cv_c_libguih="") -fi -]) -LIBGUIHDIR="" -if test x"${ac_cv_c_libguih}" = x ; then - AC_MSG_WARN([Can't find any Libgui headers]) -fi -if test x"${ac_cv_c_libguih}" != x ; then - no_libgui="" - if test x"${ac_cv_c_libguih}" != x"installed" ; then - LIBGUIHDIR="-I${ac_cv_c_libguih}" - fi -fi -AC_MSG_RESULT(${ac_cv_c_libguih}) -AC_SUBST(LIBGUIHDIR) -]) - -dnl ==================================================================== -dnl find the GUI library -AC_DEFUN(CYG_AC_PATH_LIBGUILIB, [ -AC_MSG_CHECKING(for GUI library in the build tree) -dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.." -dnl look for the library -AC_MSG_CHECKING(for GUI library) -AC_CACHE_VAL(ac_cv_c_libguilib,[ -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 -fi -]) -if test x"${ac_cv_c_libguilib}" != x ; then - GUILIB="${GUILIB} -L${ac_cv_c_libguilib}" - LIBGUILIB="-lgui" - AC_MSG_RESULT(${ac_cv_c_libguilib}) -else - AC_MSG_RESULT(none) -fi - -AC_SUBST(GUILIB) -AC_SUBST(LIBGUILIB) -]) diff --git a/contrib/gcc/config/mh-a68bsd b/contrib/gcc/config/mh-a68bsd deleted file mode 100644 index c991289..0000000 --- a/contrib/gcc/config/mh-a68bsd +++ /dev/null @@ -1,12 +0,0 @@ -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 diff --git a/contrib/gcc/config/mh-aix386 b/contrib/gcc/config/mh-aix386 deleted file mode 100644 index 4accd1c..0000000 --- a/contrib/gcc/config/mh-aix386 +++ /dev/null @@ -1 +0,0 @@ -RANLIB = @: diff --git a/contrib/gcc/config/mh-apollo68 b/contrib/gcc/config/mh-apollo68 deleted file mode 100644 index 4497ed9..0000000 --- a/contrib/gcc/config/mh-apollo68 +++ /dev/null @@ -1,3 +0,0 @@ -HDEFINES = -DUSG -RANLIB=true -CC= cc -A ansi -A runtype,any -A systype,any -U__STDC__ -DUSG diff --git a/contrib/gcc/config/mh-armpic b/contrib/gcc/config/mh-armpic deleted file mode 100644 index 35cf2c8..0000000 --- a/contrib/gcc/config/mh-armpic +++ /dev/null @@ -1 +0,0 @@ -PICFLAG=-fPIC diff --git a/contrib/gcc/config/mh-cxux b/contrib/gcc/config/mh-cxux deleted file mode 100644 index 54b2a16..0000000 --- a/contrib/gcc/config/mh-cxux +++ /dev/null @@ -1,14 +0,0 @@ -# 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 diff --git a/contrib/gcc/config/mh-cygwin b/contrib/gcc/config/mh-cygwin deleted file mode 100644 index 241027f..0000000 --- a/contrib/gcc/config/mh-cygwin +++ /dev/null @@ -1,6 +0,0 @@ -EXTRA_TARGET_HOST_ALL_MODULES=all-libtermcap -EXTRA_TARGET_HOST_INSTALL_MODULES=install-libtermcap - -all-gdb: all-libtermcap - -install-gdb: all-libtermcap diff --git a/contrib/gcc/config/mh-decstation b/contrib/gcc/config/mh-decstation deleted file mode 100644 index 3720192..0000000 --- a/contrib/gcc/config/mh-decstation +++ /dev/null @@ -1,5 +0,0 @@ -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" diff --git a/contrib/gcc/config/mh-delta88 b/contrib/gcc/config/mh-delta88 deleted file mode 100644 index bc9c453..0000000 --- a/contrib/gcc/config/mh-delta88 +++ /dev/null @@ -1,4 +0,0 @@ -RANLIB = true - - - diff --git a/contrib/gcc/config/mh-dgux b/contrib/gcc/config/mh-dgux deleted file mode 100644 index e7d85d6..0000000 --- a/contrib/gcc/config/mh-dgux +++ /dev/null @@ -1,4 +0,0 @@ -HDEFINES=-DHOST_SYS=DGUX_SYS -CC=gcc -Wall -ansi -D__using_DGUX -RANLIB=true - diff --git a/contrib/gcc/config/mh-dgux386 b/contrib/gcc/config/mh-dgux386 deleted file mode 100644 index 15885c3..0000000 --- a/contrib/gcc/config/mh-dgux386 +++ /dev/null @@ -1,22 +0,0 @@ -# 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 - diff --git a/contrib/gcc/config/mh-djgpp b/contrib/gcc/config/mh-djgpp deleted file mode 100644 index 88d250a..0000000 --- a/contrib/gcc/config/mh-djgpp +++ /dev/null @@ -1,14 +0,0 @@ -# Shorten the target alias so when it is used to set 'libsubdir' -# the name will work in both short and long filename environments. -ifeq ($(findstring -pc-msdosdjgpp,$(target_alias)),-pc-msdosdjgpp) -target_alias=djgpp -endif - -# The version string must be modified to contain just one dot -# because DOS filenames can only have one dot when long filenames -# are not available. -__version:=$(gcc_version) -__version:=$(subst ., ,$(__version)) -ifeq ($(words $(__version)),3) -gcc_version=$(word 1,$(__version)).$(word 2,$(__version))$(word 3,$(__version)) -endif diff --git a/contrib/gcc/config/mh-elfalphapic b/contrib/gcc/config/mh-elfalphapic deleted file mode 100644 index 35cf2c8..0000000 --- a/contrib/gcc/config/mh-elfalphapic +++ /dev/null @@ -1 +0,0 @@ -PICFLAG=-fPIC diff --git a/contrib/gcc/config/mh-hp300 b/contrib/gcc/config/mh-hp300 deleted file mode 100644 index 761724d..0000000 --- a/contrib/gcc/config/mh-hp300 +++ /dev/null @@ -1,13 +0,0 @@ -# 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 = diff --git a/contrib/gcc/config/mh-hpux b/contrib/gcc/config/mh-hpux deleted file mode 100644 index 4d71c9d..0000000 --- a/contrib/gcc/config/mh-hpux +++ /dev/null @@ -1,4 +0,0 @@ -# Define SYSV as -DSYSV if you are using a System V operating system. -CC = cc -Wp,-H256000 -SYSV = -DSYSV -RANLIB = true diff --git a/contrib/gcc/config/mh-hpux8 b/contrib/gcc/config/mh-hpux8 deleted file mode 100644 index 4d71c9d..0000000 --- a/contrib/gcc/config/mh-hpux8 +++ /dev/null @@ -1,4 +0,0 @@ -# Define SYSV as -DSYSV if you are using a System V operating system. -CC = cc -Wp,-H256000 -SYSV = -DSYSV -RANLIB = true diff --git a/contrib/gcc/config/mh-i370pic b/contrib/gcc/config/mh-i370pic deleted file mode 100644 index 35cf2c8..0000000 --- a/contrib/gcc/config/mh-i370pic +++ /dev/null @@ -1 +0,0 @@ -PICFLAG=-fPIC diff --git a/contrib/gcc/config/mh-ia64pic b/contrib/gcc/config/mh-ia64pic deleted file mode 100644 index 92e48d9..0000000 --- a/contrib/gcc/config/mh-ia64pic +++ /dev/null @@ -1 +0,0 @@ -PICFLAG=-fpic diff --git a/contrib/gcc/config/mh-interix b/contrib/gcc/config/mh-interix deleted file mode 100644 index 19b8ecf..0000000 --- a/contrib/gcc/config/mh-interix +++ /dev/null @@ -1,14 +0,0 @@ -# The shell may not be in /bin. -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 - -LIBGCC2_DEBUG_CFLAGS= diff --git a/contrib/gcc/config/mh-irix4 b/contrib/gcc/config/mh-irix4 deleted file mode 100644 index 6872145..0000000 --- a/contrib/gcc/config/mh-irix4 +++ /dev/null @@ -1,7 +0,0 @@ -# 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 diff --git a/contrib/gcc/config/mh-irix5 b/contrib/gcc/config/mh-irix5 deleted file mode 100644 index 8bd7c99..0000000 --- a/contrib/gcc/config/mh-irix5 +++ /dev/null @@ -1,3 +0,0 @@ -# Makefile changes for SGI's running IRIX-5.x. -SYSV = -DSYSV -RANLIB = true diff --git a/contrib/gcc/config/mh-irix6 b/contrib/gcc/config/mh-irix6 deleted file mode 100644 index e792678..0000000 --- a/contrib/gcc/config/mh-irix6 +++ /dev/null @@ -1,3 +0,0 @@ -# Makefile changes for SGI's running IRIX-6.x. -SYSV = -DSYSV -RANLIB = true diff --git a/contrib/gcc/config/mh-lynxos b/contrib/gcc/config/mh-lynxos deleted file mode 100644 index 9afcb79..0000000 --- a/contrib/gcc/config/mh-lynxos +++ /dev/null @@ -1,2 +0,0 @@ -# /bin/cc is less than useful for our purposes. Always use GCC -CC = /bin/gcc diff --git a/contrib/gcc/config/mh-lynxrs6k b/contrib/gcc/config/mh-lynxrs6k deleted file mode 100644 index b279399..0000000 --- a/contrib/gcc/config/mh-lynxrs6k +++ /dev/null @@ -1,8 +0,0 @@ -# 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 diff --git a/contrib/gcc/config/mh-m68kpic b/contrib/gcc/config/mh-m68kpic deleted file mode 100644 index 92e48d9..0000000 --- a/contrib/gcc/config/mh-m68kpic +++ /dev/null @@ -1 +0,0 @@ -PICFLAG=-fpic diff --git a/contrib/gcc/config/mh-mingw32 b/contrib/gcc/config/mh-mingw32 deleted file mode 100644 index 8c4839d..0000000 --- a/contrib/gcc/config/mh-mingw32 +++ /dev/null @@ -1,12 +0,0 @@ -# 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 - -LIBGCC2_DEBUG_CFLAGS= - -# custom installation rules for mingw32 (append .exe to binaries, etc.) -# INSTALL_DOSREL=install-dosrel diff --git a/contrib/gcc/config/mh-ncr3000 b/contrib/gcc/config/mh-ncr3000 deleted file mode 100644 index 5bbd803..0000000 --- a/contrib/gcc/config/mh-ncr3000 +++ /dev/null @@ -1,17 +0,0 @@ -# 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. -AR_FLAGS = cq diff --git a/contrib/gcc/config/mh-ncrsvr43 b/contrib/gcc/config/mh-ncrsvr43 deleted file mode 100644 index 43b0991..0000000 --- a/contrib/gcc/config/mh-ncrsvr43 +++ /dev/null @@ -1,9 +0,0 @@ -# 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 diff --git a/contrib/gcc/config/mh-necv4 b/contrib/gcc/config/mh-necv4 deleted file mode 100644 index e887736..0000000 --- a/contrib/gcc/config/mh-necv4 +++ /dev/null @@ -1,11 +0,0 @@ -# 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. -X11_EXTRA_LIBS = -lsocket -lnsl diff --git a/contrib/gcc/config/mh-openedition b/contrib/gcc/config/mh-openedition deleted file mode 100644 index e99ef15..0000000 --- a/contrib/gcc/config/mh-openedition +++ /dev/null @@ -1,2 +0,0 @@ -RANLIB = true -CC = c89 diff --git a/contrib/gcc/config/mh-papic b/contrib/gcc/config/mh-papic deleted file mode 100644 index 35cf2c8..0000000 --- a/contrib/gcc/config/mh-papic +++ /dev/null @@ -1 +0,0 @@ -PICFLAG=-fPIC diff --git a/contrib/gcc/config/mh-ppcpic b/contrib/gcc/config/mh-ppcpic deleted file mode 100644 index 35cf2c8..0000000 --- a/contrib/gcc/config/mh-ppcpic +++ /dev/null @@ -1 +0,0 @@ -PICFLAG=-fPIC diff --git a/contrib/gcc/config/mh-riscos b/contrib/gcc/config/mh-riscos deleted file mode 100644 index e586b30..0000000 --- a/contrib/gcc/config/mh-riscos +++ /dev/null @@ -1,15 +0,0 @@ -# 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 diff --git a/contrib/gcc/config/mh-sco b/contrib/gcc/config/mh-sco deleted file mode 100644 index cc337c9..0000000 --- a/contrib/gcc/config/mh-sco +++ /dev/null @@ -1,10 +0,0 @@ -# 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 diff --git a/contrib/gcc/config/mh-solaris b/contrib/gcc/config/mh-solaris deleted file mode 100644 index ddbea54..0000000 --- a/contrib/gcc/config/mh-solaris +++ /dev/null @@ -1,6 +0,0 @@ -# Makefile changes for Suns running Solaris 2 - -SYSV = -DSYSV -RANLIB = true - -X11_EXTRA_LIBS = -lnsl -lsocket diff --git a/contrib/gcc/config/mh-sparcpic b/contrib/gcc/config/mh-sparcpic deleted file mode 100644 index e218bb4..0000000 --- a/contrib/gcc/config/mh-sparcpic +++ /dev/null @@ -1 +0,0 @@ -PICFLAG=`case '${LIBCFLAGS} ${LIBCXXFLAGS}' in *-fpic* ) echo -fpic ;; * ) echo -fPIC ;; esac` diff --git a/contrib/gcc/config/mh-sun3 b/contrib/gcc/config/mh-sun3 deleted file mode 100644 index dcd5155..0000000 --- a/contrib/gcc/config/mh-sun3 +++ /dev/null @@ -1,3 +0,0 @@ -# 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 diff --git a/contrib/gcc/config/mh-sysv b/contrib/gcc/config/mh-sysv deleted file mode 100644 index 16b1187..0000000 --- a/contrib/gcc/config/mh-sysv +++ /dev/null @@ -1,3 +0,0 @@ -# Define SYSV as -DSYSV if you are using a System V operating system. -SYSV = -DSYSV -RANLIB = true diff --git a/contrib/gcc/config/mh-sysv4 b/contrib/gcc/config/mh-sysv4 deleted file mode 100644 index 8106651..0000000 --- a/contrib/gcc/config/mh-sysv4 +++ /dev/null @@ -1,11 +0,0 @@ -# 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 diff --git a/contrib/gcc/config/mh-sysv5 b/contrib/gcc/config/mh-sysv5 deleted file mode 100644 index 1fa38e5..0000000 --- a/contrib/gcc/config/mh-sysv5 +++ /dev/null @@ -1,8 +0,0 @@ -# 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. -AR_FLAGS = cr - -X11_EXTRA_LIBS = -lnsl diff --git a/contrib/gcc/config/mh-vaxult2 b/contrib/gcc/config/mh-vaxult2 deleted file mode 100644 index 3de2dc8..0000000 --- a/contrib/gcc/config/mh-vaxult2 +++ /dev/null @@ -1,2 +0,0 @@ -# The old BSD pcc isn't up to compiling parts of gdb so use gcc -CC = gcc diff --git a/contrib/gcc/config/mh-x86pic b/contrib/gcc/config/mh-x86pic deleted file mode 100644 index 92e48d9..0000000 --- a/contrib/gcc/config/mh-x86pic +++ /dev/null @@ -1 +0,0 @@ -PICFLAG=-fpic diff --git a/contrib/gcc/config/mpw-mh-mpw b/contrib/gcc/config/mpw-mh-mpw deleted file mode 100644 index 543ef4f..0000000 --- a/contrib/gcc/config/mpw-mh-mpw +++ /dev/null @@ -1,157 +0,0 @@ -# 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 - diff --git a/contrib/gcc/config/mpw/ChangeLog b/contrib/gcc/config/mpw/ChangeLog deleted file mode 100644 index 722b5a3..0000000 --- a/contrib/gcc/config/mpw/ChangeLog +++ /dev/null @@ -1,81 +0,0 @@ -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. diff --git a/contrib/gcc/config/mpw/MoveIfChange b/contrib/gcc/config/mpw/MoveIfChange deleted file mode 100644 index 0dbc125..0000000 --- a/contrib/gcc/config/mpw/MoveIfChange +++ /dev/null @@ -1,19 +0,0 @@ -# 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 diff --git a/contrib/gcc/config/mpw/README b/contrib/gcc/config/mpw/README deleted file mode 100644 index 554700a..0000000 --- a/contrib/gcc/config/mpw/README +++ /dev/null @@ -1,23 +0,0 @@ -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". diff --git a/contrib/gcc/config/mpw/forward-include b/contrib/gcc/config/mpw/forward-include deleted file mode 100644 index ddd6bd7..0000000 --- a/contrib/gcc/config/mpw/forward-include +++ /dev/null @@ -1,3 +0,0 @@ -Echo '#include' ¶""{1}"¶" >"{2}".tem -MoveIfChange "{2}".tem "{2}" - diff --git a/contrib/gcc/config/mpw/g-mpw-make.sed b/contrib/gcc/config/mpw/g-mpw-make.sed deleted file mode 100644 index e7d3c77..0000000 --- a/contrib/gcc/config/mpw/g-mpw-make.sed +++ /dev/null @@ -1,293 +0,0 @@ -# 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}" - diff --git a/contrib/gcc/config/mpw/mpw-touch b/contrib/gcc/config/mpw/mpw-touch deleted file mode 100644 index c743a51..0000000 --- a/contrib/gcc/config/mpw/mpw-touch +++ /dev/null @@ -1,7 +0,0 @@ -# "Touch" command. - -If "`Exists "{1}"`" != "" - SetFile -m . "{1}" -Else - Echo ' ' > "{1}" -End If diff --git a/contrib/gcc/config/mpw/mpw-true b/contrib/gcc/config/mpw/mpw-true deleted file mode 100644 index 0506530..0000000 --- a/contrib/gcc/config/mpw/mpw-true +++ /dev/null @@ -1 +0,0 @@ -Exit 0 diff --git a/contrib/gcc/config/mpw/null-command b/contrib/gcc/config/mpw/null-command deleted file mode 100644 index 4844c8e..0000000 --- a/contrib/gcc/config/mpw/null-command +++ /dev/null @@ -1 +0,0 @@ -# This command does nothing. diff --git a/contrib/gcc/config/mpw/open-brace b/contrib/gcc/config/mpw/open-brace deleted file mode 100644 index 58465dc..0000000 --- a/contrib/gcc/config/mpw/open-brace +++ /dev/null @@ -1,4 +0,0 @@ -# MPW makefiles seem not to have any way to get a literal open -# brace into a rule anywhere, so this does the job. - -Echo '{' diff --git a/contrib/gcc/config/mpw/tr-7to8-src b/contrib/gcc/config/mpw/tr-7to8-src deleted file mode 100644 index b20b649..0000000 --- a/contrib/gcc/config/mpw/tr-7to8-src +++ /dev/null @@ -1,9 +0,0 @@ -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}" diff --git a/contrib/gcc/config/mpw/true b/contrib/gcc/config/mpw/true deleted file mode 100644 index 0506530..0000000 --- a/contrib/gcc/config/mpw/true +++ /dev/null @@ -1 +0,0 @@ -Exit 0 diff --git a/contrib/gcc/config/mt-aix43 b/contrib/gcc/config/mt-aix43 deleted file mode 100644 index 0c6627f..0000000 --- a/contrib/gcc/config/mt-aix43 +++ /dev/null @@ -1,4 +0,0 @@ -# AIX 4.3 and above requires -X32_64 flag to all ar and nm commands -# to handle both 32-bit and 64-bit objects. -AR_FOR_TARGET=ar -X32_64 -NM_FOR_TARGET=nm -B -X32_64 diff --git a/contrib/gcc/config/mt-alphaieee b/contrib/gcc/config/mt-alphaieee deleted file mode 100644 index 9c20531..0000000 --- a/contrib/gcc/config/mt-alphaieee +++ /dev/null @@ -1,2 +0,0 @@ -CFLAGS_FOR_TARGET += -mieee -CXXFLAGS_FOR_TARGET += -mieee diff --git a/contrib/gcc/config/mt-armpic b/contrib/gcc/config/mt-armpic deleted file mode 100644 index 35b8c9e..0000000 --- a/contrib/gcc/config/mt-armpic +++ /dev/null @@ -1 +0,0 @@ -PICFLAG_FOR_TARGET=-fPIC diff --git a/contrib/gcc/config/mt-d30v b/contrib/gcc/config/mt-d30v deleted file mode 100644 index d34b774..0000000 --- a/contrib/gcc/config/mt-d30v +++ /dev/null @@ -1,4 +0,0 @@ -# Build libraries optimizing for space, not speed. -# Turn off warnings about symbols named the same as registers - CFLAGS_FOR_TARGET = -g -Os -Wa,-C - CXXFLAGS_FOR_TARGET = -g -Os -Wa,-C diff --git a/contrib/gcc/config/mt-elfalphapic b/contrib/gcc/config/mt-elfalphapic deleted file mode 100644 index 35b8c9e..0000000 --- a/contrib/gcc/config/mt-elfalphapic +++ /dev/null @@ -1 +0,0 @@ -PICFLAG_FOR_TARGET=-fPIC diff --git a/contrib/gcc/config/mt-i370pic b/contrib/gcc/config/mt-i370pic deleted file mode 100644 index 35b8c9e..0000000 --- a/contrib/gcc/config/mt-i370pic +++ /dev/null @@ -1 +0,0 @@ -PICFLAG_FOR_TARGET=-fPIC diff --git a/contrib/gcc/config/mt-ia64pic b/contrib/gcc/config/mt-ia64pic deleted file mode 100644 index ff98727..0000000 --- a/contrib/gcc/config/mt-ia64pic +++ /dev/null @@ -1 +0,0 @@ -PICFLAG_FOR_TARGET=-fpic diff --git a/contrib/gcc/config/mt-linux b/contrib/gcc/config/mt-linux deleted file mode 100644 index 15bf417..0000000 --- a/contrib/gcc/config/mt-linux +++ /dev/null @@ -1 +0,0 @@ -CXXFLAGS_FOR_TARGET = $(CXXFLAGS) -D_GNU_SOURCE diff --git a/contrib/gcc/config/mt-m68kpic b/contrib/gcc/config/mt-m68kpic deleted file mode 100644 index ff98727..0000000 --- a/contrib/gcc/config/mt-m68kpic +++ /dev/null @@ -1 +0,0 @@ -PICFLAG_FOR_TARGET=-fpic diff --git a/contrib/gcc/config/mt-netware b/contrib/gcc/config/mt-netware deleted file mode 100644 index 9482f9b..0000000 --- a/contrib/gcc/config/mt-netware +++ /dev/null @@ -1 +0,0 @@ -GDB_NLM_DEPS = all-gcc all-ld diff --git a/contrib/gcc/config/mt-ospace b/contrib/gcc/config/mt-ospace deleted file mode 100644 index 7f09104..0000000 --- a/contrib/gcc/config/mt-ospace +++ /dev/null @@ -1,3 +0,0 @@ -# Build libraries optimizing for space, not speed. - CFLAGS_FOR_TARGET = -g -Os - CXXFLAGS_FOR_TARGET = -g -Os diff --git a/contrib/gcc/config/mt-papic b/contrib/gcc/config/mt-papic deleted file mode 100644 index 35b8c9e..0000000 --- a/contrib/gcc/config/mt-papic +++ /dev/null @@ -1 +0,0 @@ -PICFLAG_FOR_TARGET=-fPIC diff --git a/contrib/gcc/config/mt-ppcpic b/contrib/gcc/config/mt-ppcpic deleted file mode 100644 index 35b8c9e..0000000 --- a/contrib/gcc/config/mt-ppcpic +++ /dev/null @@ -1 +0,0 @@ -PICFLAG_FOR_TARGET=-fPIC diff --git a/contrib/gcc/config/mt-sparcpic b/contrib/gcc/config/mt-sparcpic deleted file mode 100644 index a62b38b..0000000 --- a/contrib/gcc/config/mt-sparcpic +++ /dev/null @@ -1 +0,0 @@ -PICFLAG_FOR_TARGET=`case '${LIBCFLAGS} ${LIBCXXFLAGS}' in *-fpic* ) echo -fpic ;; * ) echo -fPIC ;; esac` diff --git a/contrib/gcc/config/mt-v810 b/contrib/gcc/config/mt-v810 deleted file mode 100644 index 97da6c2..0000000 --- a/contrib/gcc/config/mt-v810 +++ /dev/null @@ -1,4 +0,0 @@ -CC_FOR_TARGET = ca732 -ansi -AS_FOR_TARGET = as732 -AR_FOR_TARGET = ar732 -RANLIB_FOR_TARGET = true diff --git a/contrib/gcc/config/mt-wince b/contrib/gcc/config/mt-wince deleted file mode 100644 index cc7d67b..0000000 --- a/contrib/gcc/config/mt-wince +++ /dev/null @@ -1,10 +0,0 @@ -# For Windows CE, we need to build the program that converts, copies, -# and renames the platform SDK files into gcc directories. - -EXTRA_TARGET_HOST_ALL_MODULES:=$(EXTRA_TARGET_HOST_ALL_MODULES) all-utils -EXTRA_TARGET_HOST_INSTALL_MODULES:=$(EXTRA_TARGET_HOST_INSTALL_MODULES) install-utils - -all-utils : all-libiberty - -install-utils : all-libiberty - diff --git a/contrib/gcc/config/mt-x86pic b/contrib/gcc/config/mt-x86pic deleted file mode 100644 index ff98727..0000000 --- a/contrib/gcc/config/mt-x86pic +++ /dev/null @@ -1 +0,0 @@ -PICFLAG_FOR_TARGET=-fpic diff --git a/contrib/gcc/contrib/ChangeLog b/contrib/gcc/contrib/ChangeLog deleted file mode 100644 index 37b4b56..0000000 --- a/contrib/gcc/contrib/ChangeLog +++ /dev/null @@ -1,721 +0,0 @@ -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. - -2002-02-24 Christian Jönsson - - * test_summary: Additional to XPASS and FAIL, add UNRESOLVED, - WARNING and ERROR output from the *.sum files. - -2002-01-26 Gerald Pfeifer - - * gennews (files): Replace gcc-2.95/gcc-2.95.html, - gcc-2.95/gcc-2.95.1.html, gcc-2.95/gcc-2.95.2.html, - and gcc-2.95/gcc-2.95.3.html by gcc-2.95/index.html. - -2002-01-16 Gerald Pfeifer - - * gennews (files): Replace egcs-1.1/egcs-1.1.2.html, - egcs-1.1/egcs-1.1.1.html, and egcs-1.1/egcs-1.1.html by - egcs-1.1/index.html. - -2002-01-01 Kaveh R. Ghazi - - * warn_summary: Add -ada subdirectory flag. - -2001-12-12 Matthias Klose - - * texi2pod.pl: Merge changes from binutils' texi2pod.pl. Allows - generation of more than one man page from one source. - Add '-' to set of valid chars for an identifier. - Let -D option accept flags of the form =. - Use \s+ for whitespace detection in '@c man' lines. - Handle @set and @clear independent of $output. - Substitute all @value{}'s in a line. - -2001-11-14 Joseph S. Myers - - * texi2pod.pl: Handle @ifnottex, @iftex and @display. Handle @var - in verbatim blocks specially. Handle @unnumbered, @unnumberedsec - and @center. Allow [a-z] after @enumerate. Handle 0 and numbers - greater than 9 in enumerations. - -2001-11-07 Laurent Guerby - - * gcc_update (files_and_dependencies): Add Ada dependencies. - -2001-10-08 Joseph S. Myers - - * snapshot: Remove. - -2001-09-07 Richard Sandiford - - Revert: - * gcc_update: (files_and_dependencies) Add gcc/java/parse.c - gcc/java/parse-scan.c and gcc/java/keyword.h to list of files to - touch. - -2001-09-04 David.Billinghurst - - * gcc_update: (files_and_dependencies) Add gcc/java/parse.c - gcc/java/parse-scan.c and gcc/java/keyword.h to list of files to - touch. - -Mon Aug 13 02:29:08 CEST 2001 Jan Hubicka - - * analyze_brprob: Update for changes in gcc debug output. - -Sat Jul 28 22:37:49 CEST 2001 Jan Hubicka - - * analyze_brprob: Avoid more overflows. - -2001-07-27 Richard Henderson - - * test_summary: Copy LAST_UPDATED UTC time to head of summary. - -Fri Jul 27 18:01:21 CEST 2001 Jan Hubicka - - * analyze_brprob: Avoid overflows. - -2001-07-27 Richard Henderson - - * gcc_update: Dump timestamp in LAST_UPDATED. - -2001-07-26 Andreas Jaeger , - Hans-Peter Nilsson - - * analyze_brprob: Fix documentation. - -Mon Jul 23 15:47:19 CEST 2001 Jan Hubicka - - * analyze_brprob: Fix awk compatibility problems; update comment. - -2001-07-23 Andreas Jaeger - - * analyze_brprob: Fix more typos. - -2001-07-23 Andreas Jaeger - - * analyze_brprob: Fix typos. - -2001-07-03 Joseph S. Myers - - * texi2pod.pl: Handle @r inside @item. - -2001-07-02 Zack Weinberg - - * gcc_update: Remove entries for gcc.1, cpp.1, gcov.1. - -2001-07-01 Zoltan Felleg - - * warn_summary: Fix typo in a comment. - -2001-06-14 Albert Chin-A-Young - - * contrib/gcc_update: Fix timestamp on gcc/f/intdoc.texi. - -2001-06-13 Mark Mitchell - - * gennews: Set TERM to vt100 for Lynx. - -2001-06-13 Gerald Pfeifer - - * release: Remove. - -Tue Jun 12 12:21:40 CEST 2001 Jan Hubicka - - * analyze_brprob: New file. - -2001-06-11 Mark Mitchell - - * gcc_build: Output information about the commands used to - configure the compiler. - -2001-06-07 Joseph S. Myers - - * gennews: Update for GCC 3.0. - -2001-06-02 Joseph S. Myers - - * gcc_update: Update for move of documentation to gcc/doc. - -2001-05-28 Rainer Orth - - * contrib/test_summary (files): Sort before evaluating. - -2001-05-23 Gerald Pfeifer - - * gcc_update (UPDATE_OPTIONS): Add -d to the default settings. - -2001-05-21 Mark Mitchell - - * gcc_build: Use -d when invoking gcc_update. - -2001-05-18 Andreas Jaeger - - * gcc_update: Add rules for libf2c/libI77. - -2001-05-17 Alexandre Oliva - - * gcc_update (touch_files): Use simpler, yet as portable, syntax. - -2001-05-14 Loren J. Rittle - - * gcc_update (touch_files): Enhance make portability. - -2001-05-14 Alexandre Oliva - - * gcc_update (touch_files): Use a Makefile to touch files. - -2001-05-03 Joseph S. Myers - - * texi2pod.pl: Add copyright and GPL notices. - -2001-01-24 Joseph S. Myers - - * texi2pod.pl: Handle "\,". - -2001-01-15 Joseph S. Myers - - * texi2pod.pl: Fix regular expression for @r to avoid exponential - recursion. From Russ Allbery . Remove perl - version check. - -2001-01-15 Kaveh R. Ghazi - - * warn_summary (stageNfilter): Update for recent changes in - bootstrap logic. - -2001-01-14 Joseph S. Myers - - * texi2pod.pl: Require at least perl 5.6.0. - -2001-01-13 Joseph S. Myers - - * gcc_update: Add gcc/gcc.1 to generated files. - * texi2pod.pl: Handle @r and @gccoptlist. Handle @gol. Handle - discarding to end of sentence with @xref where the sentence has an - interior "." in markup, and handle discarding parentheses around - such a sentence. - -2001-01-11 Bernd Schmidt - - * gennews: Add gcc-2.95.3. - -2001-01-10 Joseph S. Myers - - * texi2pod.pl: Handle @gcctabopt and @env in tables. Handle - @command. Format URLs and email addresses in bold. - -2001-01-03 Joseph S. Myers - - * gcc_update: Add cpp.1 to the list of generated files. - - * texi2pod.pl: Handle @option and @env. - -2001-01-03 Mike Stump - - * snapshot: Update to account for java libraries. - -2000-12-28 Jeffrey Oldham - - * test_summary: Export filesuffix, not fileprefix. - -2000-12-22 Joseph S. Myers - - * release: Change some EGCS references to GCC. - -2000-12-14 Kaveh R. Ghazi - - * warn_summary: Fix subdirectory filtering. Add -intl and -fixinc - subdirectory flags. Add source directory prefix filtering. - Redirect diagnostic output to stderr. - -2000-12-07 Zack Weinberg - - * texi2pod.pl: If multiple @c man sections with the same tag - appear, concatenate them in the final output. When skipping, - ignore block commands that can't cause skipping, and honor - those that can. Ensure that verbatim blocks are separate - paragraphs. - -2000-12-07 Joseph S. Myers - - * gcc_update: Don't touch tradcif.c or java/parse.h. - -2000-12-05 Zack Weinberg - - * texi2pod.pl: Restructure for comprehensibility, add - comments. Merge handling of @ignore and @ifxxx. Handle a - whole bunch more Texinfo commands. Use consistent formatting - style. - -2000-12-04 Joseph S. Myers - - * gennews: New script. - -2000-11-22 Gerald Pfeifer - - * gcc_update: Update a comment as we now require bison for CVS users. - -2000-11-22 Joseph S. Myers - - * gcc_update: Add gcov.1 to the list of generated files. - -2000-11-21 Mark Mitchell - - * gcc_build: Remove code to put information in a log file. - -2000-11-19 Zack Weinberg - - * texi2pod.pl: - - Add real command line parsing. - - Support @ifset, @ifclear, @set, @value, -D switch. - - Support @sc. Improve handling of @ref and friends. - - Discard @subsection, @need, @node lines. - - Un-nest font changes to match texinfo semantics. - - Handle @{ and @}. Oops. - - Don't emit E<> directives inside verbatim blocks. - -2000-11-12 Bruce Korb - - * release: generalize the release script a bit. - -Sat Nov 11 17:29:03 2000 Mark P Mitchell - - * gcc_build: Add -o option for setting the objdir to use. - -2000-11-11 Jeff Law , - - * release: New file. - -2000-11-08 Jeff Law , - Gerald Pfeifer - - * snapshot: New file. - -2000-11-08 Jeffrey Oldham - - * gcc_build (bootstrap_gcc): New function. - (configure_gcc): Likewise. - (build_gcc): Rewritten to use configure and bootstrap. - (MAKE_BOOTSTRAP_OPTIONS): Replaced MAKE_OPTIONS. - -2000-10-31 Mark Mitchell - - * gcc_build (MAKE): New variable. - (build_gcc): Use it. Fix logging of errors. - (install_gcc): Likewise. - -2000-10-29 Mark Mitchell - - * gcc_build: Save the output from CVS into the logfile as well. - -2000-10-25 Mark Mitchell - - * gcc_build: Fix typos. - -2000-10-14 Joseph S. Myers - - * gperf-2.7-19981006.pat: Remove. - -2000-10-08 Joseph S. Myers - - * test_installed: Change EGCS references to refer to GCC. - -2000-09-28 Gerald Pfeifer - - * gcc_update (touch_files): Add some informative output. - -2000-09-16 Andreas Jaeger - - * gcc_update: Remove gcc/c-parse.gperf. - -2000-08-30 Gerald Pfeifer , - Alexandre Oliva - - * gcc_update: Execute touch_files_reexec even if `cvs update` - failed. - -2000-08-09 Alexandre Oliva - - * test_summary: AWK breaks with filenames containing `='. - -Sun Jul 16 12:04:33 2000 Mark P Mitchell - - * gcc_build: New script. - -2000-07-13 Mark Mitchell - - * gcc_update (files_and_dependencies): Remove generated YACC files. - -2000-07-12 Mark Mitchell - - * gcc_update (files_and_dependencies): Remove generated YACC files. - -2000-06-04 Mark Mitchell - - * newcvsroot: Handle filenames that contain spaces. - -2000-06-03 Zack Weinberg - - * test_summary: In generated script, use cat <<'EOF' not cat <<\EOF. - Elide --with-gcc-version-trigger and --norecursion from - configure flags. Remove code to report status of haifa scheduler. - -2000-05-18 Alexandre Oliva - - * gcc_update (self): Set to `$0'. - (touch_files_reexec): Use `$self' instead of `$0'. - -2000-05-12 Alexandre Oliva - - * gcc_update (touch_files_reexec): New function, run after the - tree is modified. - -2000-05-08 Richard Hendeson - - * gcc_update: Remove references to inclhack.tpl. - -2000-04-28 Jason Merrill - - * index-prop: Use a single pattern. Also support *** cdiffs. - -2000-04-28 Pavel Roskin - - * index-prop: Don't change /dev/null. - -2000-04-27 Gerald Pfeifer - - * gcc_update: Refer to GCC and gcc_update instead of egcs and - egcs_update. - -2000-04-26 Jonathan Larmour - - * index-prop: Fix occasional problem when using cvs diff -p. - -2000-04-18 Zack Weinberg - - * gcc_update: Remove references to cexp.c/cexp.y. - -1999-12-18 Gerald Pfeifer - - * newcvsroot: Add check on the number of command-line arguments. - Add usage. - -Sun Nov 28 00:41:44 1999 William Bader (william@nscs.fast.net) - - * gcc_update: Allow patches compressed by bzip2. - -1999-10-11 Martin v. Löwis - - * newcvsroot: New file. - -1999-09-11 Craig Burley - - * convert_to_f2c, convert_to_g2c, download_f2c: New file. - -1999-08-16 Gerald Pfeifer - - * gcc_update: New file. - * egcs_update: Renamed to gcc_update. - -1999-08-09 Robert Lipe - - * test_summary: Quote curly braces in 1999-07-03 change. - -1999-07-28 Alexandre Oliva - - * egcs_update (files_and_dependencies): Fixed typo in - gcc/cstamp-h.in. Added gcc/config.in. - -1999-07-27 Alexandre Oliva - - * egcs_update (files_and_dependencies): New function, with - complete list of files to be updated, as well as their - dependencies. - (touch_files): Check the timestamp of each generated file against - its dependencies'. - (main): New flags --touch, --list and --help. Remove the - pre-update step. - -1999-07-17 Alexandre Oliva - - * test_summary: Replace egcs with gcc. Update e-mail address. - -1999-07-05 Gerald Pfeifer - Jerry Quinn - - * egcs_update (touch_files, apply_patch): New functions. - Use them. New command-line option --patch. Split test of local - tree into two parts. Add comments. - -1999-07-03 Alexandre Oliva - - * test_summary: If Target is `unix{*}', append the Target variants - to Host. - -1999-06-12 Alexandre Oliva - - * test_summary: Set default mail-address and version for egcs - instead of relying on unpredictable pathnames. - Reported by Andreas Jaeger - -Fri Apr 2 16:09:02 1999 Jeffrey A Law (law@cygnus.com) - - * fixinc/*: Delete obsolete files. - -1999-02-04 Robert Lipe - - * egcs_update: Test return values of 'cvs update'. Propogate - to caller as exit values. - -1999-01-25 Gerald Pfeifer - - * egcs_update: Use "if" instead of "&&". Touch generated files - only after the corresponding *.y files. - -1999-01-19 Gerald Pfeifer - - * egcs_update: Do not use xargs, but a backquote construct. - -1999-01-07 Alexandre Oliva - - * test_summary (version): Remove carriage return that gawk inserts - in the version string for some reason. - -1998-11-30 Gerald Pfeifer - - * egcs_update: Only touch files that already exist. - -1998-11-29 Alexandre Oliva - - * test_summary (EOF): Remove double backslash. - Reported by Franz Sirl - -1998-11-28 Alexandre Oliva - - * test_summary (address): Set to egcs-testresults mailing list. - -1998-11-27 Alexandre Oliva - - * test_summary (address): Added Marc Lehmann's testsuite-results - to the default e-mail address. - -1998-11-25 Alexandre Oliva - - * test_summary (-p, prepend_logs): Add these before the summary. - (Compiler, Platform): Print these just before configflags. - -Sat Oct 31 10:53:40 1998 Kaveh R. Ghazi - - * warn_summary (longLineFilter): New shell function to encapsulate - this functionality. It is off by default, only active if -llf - flag is specified. - (subdirectoryFilter): Fix bug in filtering which made some - subdirectory warnings erroneously appear in the toplevel set. - (stageNfilter): Renamed from `stageNwarns'. Updated to collect - warnings from stage1 as well as stage0, which means warnings from - outside the bootstrap directory. Eg, the libraries, etc. - (warningFilter): New shell function to encapsulate this - functionality. - (keywordFilter): New shell function to encapsulate this - functionality. - - Store data in a temp file rather than calculating it 3x. Arrange - to remove it on exit and signals. - - Add -pass/-wpass flags to do "pass through" (i.e. manual - inspection) of bootstrap output from a particular stageN as well - as language subdirs. - - Add better comments/documentation. - -Sat Oct 31 16:39:31 1998 Gerald Pfeifer - - * egcs_update: Add comment about keeping the FAQ synchronized. - -Fri Oct 30 00:39:27 1998 Jeffrey A Law (law@cygnus.com) - - * egcs_update: Do touch java/parse.c and java/parse-scan.c. They're - in the repo again. - -Fri Oct 16 07:35:00 1998 Bruce Korb - - * egcs_update: Added gcc/fixinc/* generated files to touch list. - -Tue Oct 13 23:28:33 1998 Jeffrey A Law (law@cygnus.com) - - * egcs_update: Remove gcc/java/parse.c from list of files to - touch. - -Wed Oct 7 13:00:40 1998 Kaveh R. Ghazi - - * gperf-2.7-19981006.pat: New file, patch for egcs-local gperf. - -Mon Oct 5 14:19:48 1998 Kaveh R. Ghazi - - * warn_summary (subdirectoryFilter): New shell function to - optionally filter in/out gcc subdirectories when summarizing - warnings. Add new flags to support subdirectory filtering. - - Also, ensure the bootstrap stage is a number. Add some more C - keywords that are preserved in the "warning type" summary and - tighten up the "arg ???" regexp. - -Tue Sep 22 07:30 Bruce Korb - - * fixinc/inclhack.def: Not all C++ comments in C headers - were treated alike. They are now. Also fixed syntax - of sed expression in "systypes" fix. - - * fixinc/inclhack.def: Removed SVR4.2-ism from shell invocation - - * egcs_update: Added fixinc/* generated files to touch list. - -Wed Sep 16 16:06:51 1998 Kaveh R. Ghazi - - * egcs_update: Additionally touch gcc/java/parse.[ch]. - -Thu Sep 9 16:48 Bruce Korb - - * fixinc/inclhack.def: Added two files required by - SCO's Open Server 5's avoid_bool fix. - Regenerated fixinc.x and inclhack.sh to incorporate - the update. - -Thu Sep 3 10:11:32 1998 Robert Lipe - - * egcs_update: Do the pass 1 CVS update only for files that - may reasonably be under CVS control. - -1998-08-14 Alexandre Oliva - - * test_installed: New script for testing already-installed - gcc/g++/g77. - -Wed Aug 12 19:59:36 1998 Gerald Pfeifer - - * egcs_update: Assigned copyright to FSF. - -Tue Aug 11 17:55:53 1998 Gerald Pfeifer - Alexandre Oliva - - * egcs_update: New switch --nostdflags and documentation - enhancements. - -Tue Aug 11 17:33:19 1998 Gerald Pfeifer - - * egcs_update: New script. - -1998-08-05 Bruce Korb - - * fixinc/Makefile - Added define for target machine so machine-specific tests - can be selected for or against. - - * fixinc/fixincl.c - Added an array of string pointers to machines to select - or avoid, depending on a FD_MACH_IFNOT bit flag. - Used a shell script to match the defined TARGET_MACHINE - with any of the given match patterns. - - * fixinc/fixincl.tpl - Generate the array of strings and bit flag, as needed, - depending on "mach" and "not_machine" attributes for a fix. - - * fixinc/mkfixinc.sh - Invoke the make with TARGET assigned the value of the - machine name argument. - -Mon Jul 27 22:08:12 1998 Mike Stump (mrs@wrs.com) - - * compare_tests: New script. - -1998-07-28 Alexandre Oliva - - * test_summary: Assigned copyright to FSF. - -Mon Jul 27 20:33:02 1998 Gerald Pfeifer - - * test_summary: Corrected script name in comments providing - documentation. Added linebreaks for lines with > 80 characters. - -Fri Jun 19 02:36:59 1998 Alexandre Oliva - - * test_summary: New switch, -i, and environment variable, - append_logs, for including files in the report. - -1998-06-01 Manfred Hollstein - - * warn_summary: Update to Kaveh's latest version allowing to - specify the last stage built. - -1998-05-29 Bruce Korb - - * fixinc/mkfixinc.sh - Changes to make it easier to invoke on platforms that - normally do not invoke fixincludes. - - * fixinc/inclhack.def - Applied fixes from egcs/gcc/fixincludes from the past several - months. - -1998-05-28 Bruce Korb - - * fixinc/*: Updated most everything for a first real - try at getting "fast_fixincludes" working. - -1998-05-28 Jason Merrill - - * index-prop: New file. - -Sat May 23 23:38:49 1998 Matthias Klose - - * test_summary: find good awk (copied from warn_summary). - -Sat May 23 23:38:33 1998 Jeffrey A Law (law@cygnus.com) - - * test_summary, warn_summary: New files diff --git a/contrib/gcc/contrib/analyze_brprob b/contrib/gcc/contrib/analyze_brprob deleted file mode 100755 index 3650e60..0000000 --- a/contrib/gcc/contrib/analyze_brprob +++ /dev/null @@ -1,146 +0,0 @@ -#!/usr/bin/awk -f -# Script to analyze experimental results of our branch prediction heuristics -# Contributed by Jan Hubicka, SuSE Inc. -# 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. -# -# -# This script is used to calculate two basic properties of the branch prediction -# heuristics - coverage and hitrate. Coverage is number of executions of a given -# branch matched by the heuristics and hitrate is probability that once branch is -# predicted as taken it is really taken. -# -# These values are useful to determine the quality of given heuristics. Hitrate -# may be directly used in predict.c. -# -# Usage: -# Step 1: Compile and profile your program. You need to use -fprofile-arcs -# flag to get the profiles -# Step 2: Generate log files. The information about given heuristics are -# saved into *.life dumps. You need to pass the -df switch to the compiler as well -# as -fbranch-probabilities to get the results of profiling noted in the dumps. -# Ensure that there are no "Arc profiling: some edge counts were bad." warnings. -# Step 3: Run this script to concatenate all *.life files: -# analyze_brprob `find . -name *.life` -# the information is collected and print once all files are parsed. This -# may take a while. -# Note that the script does use bc to perform long arithmetic. -# Step 4: Read the results. Basically the following table is printed: -# (this is just an example from a very early stage of branch prediction pass -# development, so please don't take these numbers seriously) -# -#HEURISTICS BRANCHES (REL) HITRATE COVERAGE (REL) -#opcode 2889 83.7% 94.96%/ 97.62% 7516383 75.3% -#pointer 246 7.1% 99.69%/ 99.86% 118791 1.2% -#loop header 449 13.0% 98.32%/ 99.07% 43553 0.4% -#first match 3450 100.0% 89.92%/ 97.27% 9979782 100.0% -#loop exit 924 26.8% 88.95%/ 95.58% 9026266 90.4% -#error return 150 4.3% 64.48%/ 86.81% 453542 4.5% -#call 803 23.3% 51.66%/ 98.61% 3614037 36.2% -#loop branch 51 1.5% 99.26%/ 99.27% 26854 0.3% -#noreturn call 951 27.6% 100.00%/100.00% 1759809 17.6% -# -# The heuristic called "first match" is a heuristic used by GCC branch -# prediction pass and it predicts 89.92% branches correctly. -# -# The quality of heuristics can be rated using both, coverage and hitrate -# parameters. For example "loop branch" heuristics (predicting loopback edge -# as taken) have both very high hitrate and coverage, so it is very useful. -# On the other hand, "exit block" heuristics (predicting exit edges as not -# taken) have good hitrate, but poor coverage, so only 3 branches have been -# predicted. The "loop header" heuristic has problems, since it tends to -# misspredict. -# -# The implementation of this script is somewhat brute force. My awk skills -# are limited. - -function longeval(e) -{ - e = "echo \"scale = 2 ;"e"\" | bc" - e | getline res - close (e) - return res -} - -BEGIN {nnames = 0} - -/^ .* heuristics: .*.$/ { - name=$0 - sub (/^ /,"",name) - sub (/ heuristics: .*.$/,"",name) - if (!(name in branches)) - { - names[nnames] = name - branches[name]=0 - counts[name]=0 - hits[name]=0 - phits[name]=0 - nnames++ - } - branches[name]+=1 - } - -/^ .* heuristics: .*. exec [0-9]* hit [0-9]* (.*.)$/ { - name=$0 - sub (/^ /,"",name) - sub (/ heuristics: .*. exec [0-9]* hit [0-9]* (.*.)$/,"",name) - pred=$0 - sub (/^ .* heuristics: /,"",pred) - sub (/. exec [0-9]* hit [0-9]* (.*.)$/,"",pred) - count=$0 - sub (/^ .* heuristics: .*. exec /,"",count) - sub (/ hit [0-9]* (.*.)$/,"",count) - hit=$0 - sub (/^ .* heuristics: .*. exec [0-9]* hit /,"",hit) - sub (/ (.*.)$/,"",hit) - - if (int(pred) < 50.0) - { - hit = count"-"hit; - } - counts[name]=counts[name] "+" count - hits[name]=hits[name] "+" hit - phits[name]=phits[name] "+(("hit")<"count"/2)*("count"-("hit"))+(("hit")>="count"/2)*("hit")" - - #BC crashes on long strings. Irritating. - if (length(counts[name]) > 2000) - counts[name] = longeval(counts[name]) - if (length(hits[name]) > 2000) - hits[name] = longeval(hits[name]) - if (length(phits[name]) > 2000) - phits[name] = longeval(phits[name]) - } -END { - # Heuristics called combined predicts just everything. - maxcounts = longeval(counts["combined"]) - maxbranches = branches["combined"] - max = names["combined"] - printf("HEURISTICS BRANCHES (REL) HITRATE COVERAGE (REL)\n") - for (i = 0; i < nnames ; i++) - { - name = names[i] - counts[name] = longeval(counts[name]) - printf ("%-27s %8i %5.1f%% %6s%%/%6s%% %12s %5.1f%%\n", - name, - branches[name], branches[name] * 100 / maxbranches, - longeval("("hits[name]") * 100 /(" counts[name]"-0.00001)"), - longeval("("phits[name]") * 100 /(" counts[name]"-0.00001)"), - counts[name], longeval(counts[name]" * 100 / ("maxcounts"-0.00001)")) - } -} diff --git a/contrib/gcc/contrib/compare_tests b/contrib/gcc/contrib/compare_tests deleted file mode 100755 index 7a1d76c..0000000 --- a/contrib/gcc/contrib/compare_tests +++ /dev/null @@ -1,98 +0,0 @@ -#!/bin/sh -# This script automatically test the given tool with the tool's test cases, -# reporting anything of interest. - -# exits with 1 if there is nothing of interest -# exits with 0 if there is something interesting -# exits with 2 if an error occurred - -# Give two .sum files to compare them - -# Written by Mike Stump - -tmp1=/tmp/$tool-testing.$$a -tmp2=/tmp/$tool-testing.$$b -now_s=/tmp/$tool-testing.$$d -before_s=/tmp/$tool-testing.$$e - -if [ "$2" = "" ]; then - echo "Usage: $0 previous current" >&2 - exit 2 -fi - -sed 's/^XFAIL/FAIL/; s/^XPASS/PASS/' < "$1" >$tmp1 -sed 's/^XFAIL/FAIL/; s/^XPASS/PASS/' < "$2" >$tmp2 - -before=$tmp1 -now=$tmp2 - -trap "rm -f $tmp1 $tmp2 $now_s $before_s" 0 1 2 3 5 9 13 15 - -sort +0.4 "$now" > "$now_s" -sort +0.4 "$before" > "$before_s" - -grep '^FAIL' "$now_s" | sed 's/^....: //' >$tmp1 -grep '^PASS' "$before_s" | sed 's/^....: //' | comm -12 $tmp1 - >$tmp2 - -grep -s . $tmp2 >/dev/null -if [ $? = 0 ]; then - echo "Tests that now fail, but worked before:" - echo - cat $tmp2 - echo -fi - -grep '^PASS' "$now_s" | sed 's/^....: //' >$tmp1 -grep '^FAIL' "$before_s" | sed 's/^....: //' | comm -12 $tmp1 - >$tmp2 - -grep -s . $tmp2 >/dev/null -if [ $? = 0 ]; then - echo "Tests that now work, but didn't before:" - echo - cat $tmp2 - echo -fi - -grep '^FAIL' "$now_s" | sed 's/^....: //' >$tmp1 -grep '^[PF]A[SI][SL]' "$before_s" | sed 's/^....: //' | comm -23 $tmp1 - >$tmp2 - -grep -s . $tmp2 >/dev/null -if [ $? = 0 ]; then - echo "New tests that FAIL:" - echo - cat $tmp2 - echo -fi - -grep '^PASS' "$now_s" | sed 's/^....: //' >$tmp1 -grep '^[PF]A[SI][SL]' "$before_s" | sed 's/^....: //' | comm -23 $tmp1 - >$tmp2 - -grep -s . $tmp2 >/dev/null -if [ $? = 0 ]; then - echo "New tests that PASS:" - echo - cat $tmp2 - echo -fi - -grep '^[PF]A[SI][SL]' "$now_s" | sed 's/^....: //' >$tmp1 -grep '^PASS' "$before_s" | sed 's/^....: //' | comm -13 $tmp1 - >$tmp2 - -grep -s . $tmp2 >/dev/null -if [ $? = 0 ]; then - echo "Old tests that passed, that have disappeared: (Eeek!)" - echo - cat $tmp2 - echo -fi - -grep '^[PF]A[SI][SL]' "$now_s" | sed 's/^....: //' >$tmp1 -grep '^FAIL' "$before_s" | sed 's/^....: //' | comm -13 $tmp1 - >$tmp2 - -grep -s . $tmp2 >/dev/null -if [ $? = 0 ]; then - echo "Old tests that failed, that have disappeared: (Eeek!)" - echo - cat $tmp2 - echo -fi diff --git a/contrib/gcc/contrib/convert_to_f2c b/contrib/gcc/contrib/convert_to_f2c deleted file mode 100755 index 9a499fc..0000000 --- a/contrib/gcc/contrib/convert_to_f2c +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/sh -# -# convert_to_f2c [g2c-dir] -# -# Renames certain files in a g2c (libg2c) directory so they no longer have the -# `.netlib' suffix, a la netlib's f2c distribution. If `g2c-dir' is not -# specified, `g2c-YYYYMMDD' is the default, where YYYYMMDD is the current -# date. The directory is renamed such that the first `g' becomes an `f', -# usually `g2c-YYYYMMDD' -> `f2c-YYYYMMDD'. -# -# (C) 1999 Free Software Foundation -# Originally by James Craig Burley , September 1999. -# -# This script is Free Software, and it can be copied, distributed and -# modified as defined in the GNU General Public License. A copy of -# its license can be downloaded from http://www.gnu.org/copyleft/gpl.html - -set -e - -if [ x$1 = x ] -then - dir=g2c-`date +%Y%m%d` -else - dir=$1 -fi - -newdir=`echo $dir | sed -e "s:g:f:"` - -cd $dir - -set +e - -mv -i changes.netlib changes -mv -i disclaimer.netlib disclaimer -mv -i g2c.hin f2c.h -mv -i permission.netlib permission -mv -i readme.netlib readme -cd libF77 -mv -i README.netlib README -mv -i makefile.netlib makefile -cd ../libI77 -mv -i README.netlib README -mv -i makefile.netlib makefile -cd .. - -cd .. - -mv -iv $dir $newdir diff --git a/contrib/gcc/contrib/convert_to_g2c b/contrib/gcc/contrib/convert_to_g2c deleted file mode 100755 index 5d05f84..0000000 --- a/contrib/gcc/contrib/convert_to_g2c +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/sh -# -# convert_to_g2c [f2c-dir] -# -# Renames certain files in a netlib f2c directory so they have the `.netlib' -# suffix, a la g77's version of f2c (libg2c). If `f2c-dir' is not specified, -# `f2c-YYYYMMDD' is the default, where YYYYMMDD is the current date. -# The directory is renamed such that the first `f' becomes a `g', -# usually `f2c-YYYYMMDD' -> `g2c-YYYYMMDD'. -# -# (C) 1999 Free Software Foundation -# Originally by James Craig Burley , September 1999. -# -# This script is Free Software, and it can be copied, distributed and -# modified as defined in the GNU General Public License. A copy of -# its license can be downloaded from http://www.gnu.org/copyleft/gpl.html - -set -e - -if [ x$1 = x ] -then - dir=f2c-`date +%Y%m%d` -else - dir=$1 -fi - -newdir=`echo $dir | sed -e "s:f:g:"` - -cd $dir - -set +e - -mv -i changes changes.netlib -mv -i disclaimer disclaimer.netlib -mv -i f2c.h g2c.hin -mv -i permission permission.netlib -mv -i readme readme.netlib -cd libF77 -mv -i README README.netlib -mv -i makefile makefile.netlib -cd ../libI77 -mv -i README README.netlib -mv -i makefile makefile.netlib -cd .. - -cd .. - -mv -iv $dir $newdir diff --git a/contrib/gcc/contrib/download_f2c b/contrib/gcc/contrib/download_f2c deleted file mode 100755 index 159c52e..0000000 --- a/contrib/gcc/contrib/download_f2c +++ /dev/null @@ -1,77 +0,0 @@ -#!/bin/sh -# -# download_f2c -# -# Unpacks a directory full of f2c stuff obtained from netlib, naming -# the directory f2c-YYYYMMDD (YYYYMMDD being the current date), -# leaving it in current working directory. -# -# This shell script downloads the tarball from netlib, unpacks everything, -# and strips off the redundant files, leaving a bare-bones (but fully -# reproducible) f2c source directory. (You must have yacc/bison to rebuild -# gram.c, by the way.) -# -# (C) 1999 Free Software Foundation -# Originally by James Craig Burley , September 1999. -# -# This script is Free Software, and it can be copied, distributed and -# modified as defined in the GNU General Public License. A copy of -# its license can be downloaded from http://www.gnu.org/copyleft/gpl.html -# -# FIXME: Replace WHOAMI with whatever is the canonical way to -# obtain the user's email address these days. - -dir=f2c-`date +%Y%m%d` -if [ ! -d $dir ] -then - mkdir $dir -fi -cd $dir - -echo Preparing $dir... - -if [ ! -d tmp ] -then - mkdir tmp -fi - -if [ ! -f tmp/f2c.tar ] -then - cd tmp - echo Downloading f2c.tar via ftp... - ftp -n netlib.bell-labs.com < /dev/null && rm libf77 -rm -f libF77/xsum0.out libF77/libF77.xsum -sh libi77 > /dev/null && rm libi77 -rm -f libI77/xsum0.out libI77/libI77.xsum -rm -f src/xsum0.out -touch src/xsum.out -cmp f2c.h src/f2c.h && rm -fv src/f2c.h -cmp src/readme src/README && rm -fv src/readme - -echo Deleting f2c.tar... -rm tmp/f2c.tar -rmdir tmp - -cd .. - -echo Latest f2c now in $dir. diff --git a/contrib/gcc/contrib/gcc_build b/contrib/gcc/contrib/gcc_build deleted file mode 100755 index 4d0eea3..0000000 --- a/contrib/gcc/contrib/gcc_build +++ /dev/null @@ -1,316 +0,0 @@ -#! /bin/sh - -######################################################################## -# -# File: gcc_build -# Author: Mark Mitchell -# Date: 07/10/2000 -# -# Contents: -# Script to automatically download and build GCC. -# -# Copyright (c) 2000, 2001 Free Software Foundation. -# -# 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. -# -######################################################################## - -######################################################################## -# Notes -######################################################################## - -# If you are using password-based CVS, you must manually log in, and -# not log out from, the CVS server before running this script. - -# You can set the following variables in the environment. They -# have no corresponding command-line options because they should -# only be needed infrequently: -# -# MAKE The path to `make'. - -######################################################################## -# Functions -######################################################################## - -# Issue the error message given by $1 and exit with a non-zero -# exit code. - -error() { - echo "gcc_build: error: $1" - exit 1 -} - -# Issue a usage message explaining how to use this script. - -usage() { -cat <, August 1998. -# -# This script is Free Software, and it can be copied, distributed and -# modified as defined in the GNU General Public License. A copy of -# its license can be downloaded from http://www.gnu.org/copyleft/gpl.html - - -# Default options used when updating via CVS. -UPDATE_OPTIONS=-Pd -# Use -P to prune empty directories. -# Use -d to create any directories that exist in the repository but not -# locally. -# Use -A to reset any sticky tags, dates, or `-k' options. - -######## Anything below shouldn't be changed by regular users. - -# Arrange for the value of $0 to be available for functions -self=$0 - -# This function prints a list of all generated files, along with their -# dependencies. Note that only one target is supported per line: the -# colon is stripped from the output. -files_and_dependencies () { - sed -e 's/ *#.*//' -e '/^$/d' -e 's/://' <<\EOF -# All automake dependencies within texinfo -# In fact, not all, since we do not care about sub-directories that -# we do not build. In particular, *.po and *.gmo are not touched. -texinfo/aclocal.m4: texinfo/configure.in texinfo/acinclude.m4 -texinfo/Makefile.in: texinfo/Makefile.am texinfo/configure.in texinfo/aclocal.m4 -texinfo/configure: texinfo/configure.in texinfo/aclocal.m4 -texinfo/stamp-h.in: texinfo/configure.in texinfo/aclocal.m4 texinfo/acconfig.h -texinfo/lib/Makefile.in: texinfo/lib/Makefile.am texinfo/configure.in texinfo/aclocal.m4 -texinfo/makeinfo/Makefile.in: texinfo/makeinfo/Makefile.am texinfo/configure.in texinfo/aclocal.m4 -texinfo/util/Makefile.in: texinfo/util/Makefile.am texinfo/configure.in texinfo/aclocal.m4 -# Now, proceed to gcc automatically generated files -gcc/configure: gcc/configure.in -gcc/cstamp-h.in: gcc/configure.in gcc/acconfig.h -gcc/config.in: gcc/cstamp-h.in -gcc/fixinc/fixincl.x: gcc/fixinc/fixincl.tpl gcc/fixinc/inclhack.def -# And then, language-specific files -gcc/f/intdoc.texi: gcc/f/intdoc.in gcc/f/intdoc.c gcc/f/intrin.h gcc/f/intrin.def -gcc/ada/treeprs.ads: gcc/ada/treeprs.adt gcc/ada/sinfo.ads gcc/ada/xtreeprs.adb -gcc/ada/einfo.h: gcc/ada/einfo.ads gcc/ada/einfo.adb gcc/ada/xeinfo.adb -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 -# And libraries, at last -libchill/configure: libchill/configure.in -libf2c/configure: libf2c/configure.in -libf2c/libF77/configure: libf2c/libF77/configure.in -libf2c/libI77/configure: libf2c/libI77/configure.in -libf2c/libI77/stamp-h.in: libf2c/libI77/configure.in -libf2c/libI77/config.h.in: libf2c/libI77/configure.in libf2c/libI77/stamp-h.in -libf2c/libU77/configure: libf2c/libU77/configure.in -libf2c/libU77/stamp-h.in: libf2c/libU77/configure.in libf2c/libU77/acconfig.h -libobjc/configure: libobjc/configure.in -# fastjar -fastjar/aclocal.m4: fastjar/configure.in -fastjar/Makefile.in: fastjar/Makefile.am fastjar/configure.in fastjar/aclocal.m4 -fastjar/configure: fastjar/configure.in fastjar/aclocal.m4 -fastjar/stamp-h.in: fastjar/configure.in fastjar/aclocal.m4 -boehm-gc/aclocal.m4: boehm-gc/configure.in boehm-gc/acinclude.m4 -boehm-gc/Makefile.in: boehm-gc/Makefile.am boehm-gc/configure.in boehm-gc/aclocal.m4 -boehm-gc/configure: boehm-gc/configure.in boehm-gc/aclocal.m4 -libjava/aclocal.m4: libjava/configure.in libjava/acinclude.m4 -libjava/Makefile.in: libjava/Makefile.am libjava/configure.in libjava/aclocal.m4 -libjava/configure: libjava/configure.in libjava/aclocal.m4 -libjava/libltdl/aclocal.m4: libjava/libltdl/configure.in libjava/libltdl/acinclude.m4 -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 -EOF -} - - -# This function touches generated files such that the ``end'' user does -# not have to rebuild them. -touch_files () { - rm -f Makefile.$$ - echo 'all: \' > Makefile.$$ - files_and_dependencies | sed 's, .*, \\,' >> Makefile.$$ - echo '; @true' >> Makefile.$$ - 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.$$ -} - - -# Whenever we update the tree or install a patch, we may be modifying -# this script. By re-execing it, we ensure that the appropriate -# dependencies and rules will be used. -touch_files_reexec () { - echo "Adjusting file timestamps" - exec ${CONFIG_SHELL-/bin/sh} $self --touch -} - -# This functions applies a patch to an existing tree. -apply_patch () { - if [ -f $1 ]; then - echo "Applying patch file $1" - case "$1" in - *gz) - gzip -d -c $1 | patch -p1 ;; - *bz2) - bzip2 -d -c $1 | patch -p1 ;; - *) - cat $1 | patch -p1 ;; - esac - fi - touch_files_reexec -} - -# Check whether this indeed looks like a local tree. -if [ ! -f gcc/version.c ]; then - echo "This does not seem to be a GCC tree!" - exit -fi - -case "$1" in -# First of all, check whether we are going to process a patch. ---patch) - if test "$#" != 2; then - echo "$1" expects only one argument >&2 - exit 1 - fi - apply_patch "${2}" - exit $? - ;; - ---touch) - if test "$#" != 1; then - echo "$1" does not expect any argument >&2 - exit 1 - fi - touch_files - exit $? - ;; - ---list) - if test "$#" != 1; then - echo "$1" does not expect any argument >&2 - exit 1 - fi - files_and_dependencies | sed 's/ /: /' - exit $? - ;; - ---help) - sed -e '1,2d' -e '/^UPDATE_OPTIONS=/{i\ -\ - -p -}' \ - -e '/^$/,$d' -e 's/#//' -e 's/^ //' < $0 - exit $? - ;; - -esac - -# Check whether this indeed looks like a local CVS tree. -if [ ! -d CVS ]; then - echo "This does not seem to be a GCC CVS tree!" - exit -fi - -# Check command-line options -if [ x"${1}"x = x"--nostdflags"x ]; then - shift -else - set -- $UPDATE_OPTIONS ${1+"$@"} -fi - -echo "Updating CVS tree" -cvs -q update ${1+"$@"} -if [ $? -ne 0 ]; then - (touch_files_reexec) - echo "CVS update of full tree failed." >&2 - exit 1 -fi - -{ - date - TZ=UTC date -} > LAST_UPDATED -touch_files_reexec diff --git a/contrib/gcc/contrib/gccbug.el b/contrib/gcc/contrib/gccbug.el deleted file mode 100644 index 55821e5..0000000 --- a/contrib/gcc/contrib/gccbug.el +++ /dev/null @@ -1,84 +0,0 @@ -;;; gccbug.el --- forward bug reports to gnats -;; (C) 2000 Free Software Foundation -;; Written by Martin v. Löwis -;; Usage: -;; In rmail, bind a key to rmail-gccbug-reply, e.g. -;; (require 'rmail) -;; (require 'gccbug) -;; (define-key rmail-mode-map "R" 'rmail-gccbug-reply) -;; Then, when reviewing a report, type R to create a gnats-formatted -;; message. - -(provide 'gccbug) - -(defun gccbug-reply () - (interactive) - (let ((orig-yank-prefix mail-yank-prefix)) - (insert ">Submitter-Id: net\n") - (insert ">Originator: \n") - (insert ">Confidential: no\n") - (insert ">Synopsis: ") - (save-excursion - (mail-subject) - (let ((stop (point))) - (re-search-backward "Re: ") - (copy-region-as-kill (match-end 0) stop))) - (yank) - (insert "\n") - (insert ">Severity: serious\n") - (insert ">Priority: medium\n") - (insert ">Category: \n") - (insert ">Class: \n") - ;(insert ">State: analyzed\n") - (insert ">Release: 2.95.2\n") - (insert ">Environment:\n") - (insert ">Description:\n") - (set 'mail-yank-prefix nil) - (set 'mail-yank-ignored-headers - "^via:\\|^mail-from:\\|^origin:\\|^status:\\|^remailed\\|^received:\\|^summary-line:\\|^to:\\|^subject:\\|^in-reply-to:\\|^return-path:\\|^X-.*:\\|^User-Agent:\\|^MIME-Version:\\|^Content-.*:\\|^List-.*:\\|C[Cc]:\\|^Precedence:\\|^Sender:\\|^Mailing-List:\\|^Delivered-To:\\|^>From") - (mail-yank-original t) - (set 'mail-yank-prefix orig-yank-prefix) - ; Copy From: field to Originator: - (re-search-backward "From: ") - (let ((beg (match-end 0))) - (end-of-line) - (kill-region beg (point))) - (re-search-backward ">Originator: ") - (goto-char (match-end 0)) - (yank) - ; Kill From: line - (re-search-forward "From:") - (beginning-of-line) - (kill-line 1) - ; Replace Message-ID: with Original-Message-ID - (beginning-of-buffer) - (re-search-forward "Message-ID: .*") - (replace-match "Original-\\&") - ; Replace To: line, adding recipient to Notify list - (mail-to) - (re-search-backward "To: ") - (replace-match "To: gcc-gnats@gcc.gnu.org\nX-GNATS-Notify: ") - ; add additional fields - (end-of-buffer) - (insert ">How-To-Repeat: \n>Fix: \n") - ; See whether an Organization: is present - (let ((org (re-search-backward "Organization:.*" nil t))) - (if org - (progn - (kill-region (point) (match-end 0)) - (re-search-backward ">Confidential") - (insert ">") - (yank) - (insert "\n")))) -; This kills CC: lines, but rmail-reply below won't create any -; (mail-cc) -; (beginning-of-line) -; (kill-line 1) - )) - -(defun rmail-gccbug-reply () - (interactive) - (rmail-toggle-header 0) - (rmail-reply t) - (gccbug-reply)) - diff --git a/contrib/gcc/contrib/gennews b/contrib/gcc/contrib/gennews deleted file mode 100755 index 3db519d..0000000 --- a/contrib/gcc/contrib/gennews +++ /dev/null @@ -1,56 +0,0 @@ -#! /bin/sh -# -# Script to generate the NEWS file from online release notes. -# Contributed by Joseph Myers . -# -# 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. - -website=http://gcc.gnu.org/ -files="gcc-3.2/index.html gcc-3.2/changes.html - gcc-3.1/index.html gcc-3.1/changes.html - gcc-3.0/gcc-3.0.html gcc-3.0/features.html gcc-3.0/caveats.html - gcc-2.95/index.html gcc-2.95/features.html gcc-2.95/caveats.html - egcs-1.1/index.html egcs-1.1/features.html egcs-1.1/caveats.html - egcs-1.0/egcs-1.0.3.html egcs-1.0/egcs-1.0.2.html egcs-1.0/egcs-1.0.1.html - egcs-1.0/egcs-1.0.html egcs-1.0/features.html egcs-1.0/caveats.html" - -set -e - -cat < - -while (<>) -{ - if (/^Index: (.*)/) - { - $full = $1; - print; - for (1..7) - { - $_ = <>; - s/^([-+*]{3}) [^\t]+\t/$1 $full\t/ - unless m{ /dev/null\t}; - print; - } - } - else - { - print; - } -} diff --git a/contrib/gcc/contrib/newcvsroot b/contrib/gcc/contrib/newcvsroot deleted file mode 100755 index 43e8e07..0000000 --- a/contrib/gcc/contrib/newcvsroot +++ /dev/null @@ -1,34 +0,0 @@ -#! /usr/bin/env bash -# Written by Roland McGrath - -# Replaces all CVS/Root and CVS/Repository files in a checked-out CVS -# tree. Requires shell with # and % variable substitution (e.g. bash). - -# Usage: newcvsroot - -if [ $# != 3 ]; then - echo "usage: `basename $0` " - exit 1 -fi - -root=$1; shift -module=$1; shift -topdir=$1; shift - -rep=${root##*:} - -case "$topdir" in -/*|./*|../*) echo >&2 "$0 wants relative path from top of checkout"; exit 1;; -esac - -find $topdir \( -name Repository -o -name Root \) -print | while read f; do - -case "$f" in -*/CVS/Root) echo $root > "$f" ;; -*/CVS/Repository) - r=${module}${f#${topdir}} - echo > "$f" $rep/${r%/CVS/Repository} - ;; -esac - -done diff --git a/contrib/gcc/contrib/regression/ChangeLog b/contrib/gcc/contrib/regression/ChangeLog deleted file mode 100644 index 196a593..0000000 --- a/contrib/gcc/contrib/regression/ChangeLog +++ /dev/null @@ -1,37 +0,0 @@ -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 - - * btest-gcc.sh: New file. - * objs-gcc.sh: New file. - * site.exp: New file. - * ChangeLog: New file. - * README: New file. - - diff --git a/contrib/gcc/contrib/regression/README b/contrib/gcc/contrib/regression/README deleted file mode 100644 index 7e0e657..0000000 --- a/contrib/gcc/contrib/regression/README +++ /dev/null @@ -1,18 +0,0 @@ -This directory contains scripts that are used by the regression -tester, . - -The primary script is 'btest-gcc.sh'. This is the script that is run -to actually test the compiler. - -'objs-gcc.sh' takes a combined tree and builds (but does not test) the -tools required for 'btest-gcc.sh'. It is run periodically to update -the tools. This script is followed by running 'btest-gcc.sh' using -the newly-build tools to check that they will not cause regressions. - -'site.exp' is what $DEJAGNU points to when the regression tester runs -these scripts. - -Note that any changes made here need to be approved by the regression -tester's maintainer (see MAINTAINERS). The changes will be used on -the tester's next run, so `experimental' changes are very strongly -discouraged :-). diff --git a/contrib/gcc/contrib/regression/btest-gcc.sh b/contrib/gcc/contrib/regression/btest-gcc.sh deleted file mode 100755 index 1bd7e8c..0000000 --- a/contrib/gcc/contrib/regression/btest-gcc.sh +++ /dev/null @@ -1,172 +0,0 @@ -#!/bin/sh - -# Test GCC. -# Copyright (C) 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 -# the Free Software Foundation; either version 2 of the License, 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 - -# 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 - -# PREFIX is the directory for the --prefix option to configure. -# For cross compilers, it needs to contain header files, -# libraries, and binutils. PATH should probably include -# $PREFIX/bin. -PREFIX=$3 -# This script also needs to include the GDB testsuite in -# $PREFIX/share/gdb-testsuite. -GDB_TESTSUITE=$PREFIX/share/gdb-testsuite - -# STATE is where the tester maintains its internal state, -# described below. -STATE=$4 - -# BUILD is a temporary directory that this script will -# delete and recreate, containing the build tree. -BUILD=$5 - -# you also probably need to set these variables: -# PATH: should contain a native gcc, and a cross gdb. -# DEJAGNU: should point to a site.exp suitable for testing -# the compiler and debugger. - - -# OUTPUT: in $RESULT, one of the following keywords: -# error the script failed due to -# a misconfiguration or resource limitation -# build the build failed -# regress- the build succeeded, but there were -# testsuite regressions, listed in $REGRESS -# pass build succeeded and there were no regressions -RESULT=$STATE/RESULT -# in BUILD_LOG, the output of the build -BUILD_LOG=$STATE/build_log -# in FAILED, a list of failing testcases -FAILED=$STATE/failed -# in PASSES, the list of testcases we expect to pass -PASSES=$STATE/passes -# in REGRESS, a list of testcases we expected to pass but that failed -REGRESS=$STATE/regress - -# Make sure various files exist. -[ -d $STATE ] || mkdir $STATE -[ -f $PASSES ] || touch $PASSES - -# These lines should stay in this order, because -# that way if something is badly wrong and $RESULT can't -# be modified then cron will mail the error message. -# The reverse order could lead to the testsuite claiming that -# everything always passes, without running any tests. -echo error > $RESULT || exit 1 -exec > $BUILD_LOG 2>&1 || exit 1 - -set -x - -# Nuke $BUILD and recreate it. -rm -rf $BUILD $REGRESS $FAILED -mkdir $BUILD || exit 1 -cd $BUILD || exit 1 - -H_BUILD=`$SOURCE/config.guess || exit 1` -H_HOST=$H_BUILD -if [ $TARGET = native ] ; then - H_TARGET=$H_HOST -else - H_TARGET=$TARGET -fi -H_REAL_TARGET=`$SOURCE/config.sub $H_TARGET || exit 1` - -# TESTLOGS is the list of dejagnu .sum files that the tester should -# look at. -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 - -# Test GCC against its internal testsuite. -make -k check-gcc - -# Test libstd++-v3 -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 -for LOG in $TESTLOGS ; do - if ! grep ^PASS: $LOG > /dev/null ; then - echo build > $RESULT - exit 1 - fi -done - -# Work out what failed -for LOG in $TESTLOGS ; do - L=`basename $LOG` - awk '/^FAIL: / { print "'$L'",$2; }' $LOG || exit 1 -done | sort | uniq > $FAILED || exit 1 -comm -12 $FAILED $PASSES >> $REGRESS || exit 1 -NUMREGRESS=`wc -l < $REGRESS | tr -d ' '` -if [ $NUMREGRESS -ne 0 ] ; then - echo regress-$NUMREGRESS > $RESULT - exit 1 -fi - -# It passed. Update the state. -for LOG in $TESTLOGS ; do - L=`basename $LOG` - awk '/^PASS: / { print "'$L'",$2; }' $LOG || exit 1 -done | sort | uniq | comm -23 - $FAILED > ${PASSES}~ || exit 1 -[ -s ${PASSES}~ ] || exit 1 -mv ${PASSES}~ ${PASSES} || exit 1 -echo pass > $RESULT -exit 0 diff --git a/contrib/gcc/contrib/regression/objs-gcc.sh b/contrib/gcc/contrib/regression/objs-gcc.sh deleted file mode 100755 index 839fcff..0000000 --- a/contrib/gcc/contrib/regression/objs-gcc.sh +++ /dev/null @@ -1,121 +0,0 @@ -#!/bin/sh - -# Build tools for testing GCC. -# Copyright (C) 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 -# the Free Software Foundation; either version 2 of the License, 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 - -# 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 - -# PREFIX is the directory for the --prefix option to configure. -PREFIX=$3 - -# STATE is where the tester maintains its internal state, -# described below. -STATE=$4 - -# BUILD is a temporary directory that this script will -# delete and recreate, containing the build tree. -BUILD=$5 - -# you also probably need to set these variables: -# DEJAGNU: should point to a site.exp suitable for testing -# the compiler and debugger. - -# OUTPUT: in $RESULT, one of the following keywords: -# error the script failed due to -# a misconfiguration or resource limitation -# build the build failed -# regress- the build succeeded, but there were -# testsuite regressions, listed in $REGRESS -# pass build succeeded and there were no regressions -RESULT=$STATE/RESULT -# in BUILD_LOG, the output of the build -BUILD_LOG=$STATE/build_log -# in FAILED, a list of failing testcases -FAILED=$STATE/failed -# in PASSES, the list of testcases we expect to pass -PASSES=$STATE/passes -# in REGRESS, a list of testcases we expected to pass but that failed -REGRESS=$STATE/regress - -# Make sure various files exist. -[ -d $STATE ] || mkdir $STATE -[ -f $PASSES ] || touch $PASSES - -# These lines should stay in this order, because -# that way if something is badly wrong and $RESULT can't -# be modified then cron will mail the error message. -# The reverse order could lead to the testsuite claiming that -# everything always passes, without running any tests. -echo error > $RESULT || exit 1 -exec > $BUILD_LOG 2>&1 || exit 1 - -set -x - -# TESTLOGS is the list of dejagnu .sum files that the tester should -# look at. -TESTLOGS="test/gcc/gcc.sum -test/g++/g++.sum" - -# Nuke $BUILD and recreate it. -rm -rf $BUILD $REGRESS $FAILED -mkdir $BUILD $BUILD/build $BUILD/objs || exit 1 -cd $BUILD || exit 1 - -# This script used to use config.guess, but that is not how releng -# determines hostnames. -H_BUILD=`$SOURCE/config.guess || exit 1` -H_HOST=$H_BUILD -if [ $TARGET = native ] ; then - H_TARGET=$H_HOST -else - H_TARGET=$TARGET -fi -H_REAL_TARGET=`$SOURCE/config.sub $H_TARGET || exit 1` -H_REAL_BUILD=`$SOURCE/config.sub $H_BUILD || exit 1` -H_REAL_HOST=`$SOURCE/config.sub $H_HOST || exit 1` - -# Build. -echo build > $RESULT - -cd $BUILD/build || exit 1 -TMP_PREFIX=$BUILD/install -$SOURCE/configure --prefix=$PREFIX --target=$H_TARGET || exit 1 -if [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-gnu ] - 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 diff --git a/contrib/gcc/contrib/regression/site.exp b/contrib/gcc/contrib/regression/site.exp deleted file mode 100644 index fa50920..0000000 --- a/contrib/gcc/contrib/regression/site.exp +++ /dev/null @@ -1,18 +0,0 @@ -global target_list - -case "$target_triplet" in { - { "powerpc*-*eabi*" } { -# if { [info exists tool] && $tool == "gcc" } { -# set target_list { "powerpc-sim{,-fpic}" } -# } else { - set target_list { "powerpc-sim" } -# } - } - { "mips-elf" } { - set target_list { "mips-sim" } - } - - default { - set target_list { "unix" } - } -} diff --git a/contrib/gcc/contrib/test_installed b/contrib/gcc/contrib/test_installed deleted file mode 100755 index 1ef27bf..0000000 --- a/contrib/gcc/contrib/test_installed +++ /dev/null @@ -1,114 +0,0 @@ -#! /bin/sh - -# (C) 1998, 2000 Free Software Foundation -# Originally by Alexandre Oliva - -# This script is Free Software, and it can be copied, distributed and -# modified as defined in the GNU General Public License. A copy of -# its license can be downloaded from http://www.gnu.org/copyleft/gpl.html - -# This scripts assumes it lives in the contrib directory of the GCC -# source tree, so it will find the testsuite tree from its location. -# If you move it elsewhere, or want to use another testsuite tree, you -# can override the defaults with --srcdir=/some/dir/GCC or -# --testsuite=/some/dir/GCC/gcc/testsuite. If you specify -# --testsuite, --srcdir will be ignored; otherwise, `/gcc/testsuite' -# will be appended to the srcdir. - -# You may specify where the binaries to be tested should be picked up -# from. If you specify --prefix=/some/dir, gcc, g++ and g77 will be -# looked for at /some/dir/bin. Each one may be overridden by -# specifying --with-gcc=/pathname/to/gcc, --with-g++=/pathname/to/g++ -# and --with-g77=/pathname/to/g77. If you specify --without-gcc, -# --without-g++ or --without-g77, the test for the specified program -# will be skipped. By default, gcc, g++ and g77 will be searched in -# the PATH. - -# An additional argument may specify --tmpdir=/some/dir; by default, -# temporaries will be stored in the current directory, where the log -# files will be stored. - -# The script will interpret arguments until it finds one it does not -# understand. The remaining ones will be passed to `runtest'. A -# double-dash can be used to explicitly separate the arguments to -# `test_installed' from the ones to `runtest'. - -# This script should be run in an empty directory; it will refuse to -# run if it finds a file named site.exp in the current directory. - - -if test -f site.exp; then - echo site.exp already exists >&2 - exit 1 -fi - -while true; do - case "$1" in - --with-testsuite=*) testsuite=`echo "$1" | sed 's/[^=]*=//'`; shift;; - --srcdir=*) srcdir=`echo "$1" | sed 's/[^=]*=//'`; shift;; - - --prefix=*) prefix=`echo "$1" | sed 's/[^=]*=//'`; shift;; - --with-gcc=*) GCC_UNDER_TEST=`echo "$1" | sed 's/[^=]*=//'`; shift;; - --with-g++=*) GXX_UNDER_TEST=`echo "$1" | sed 's/[^=]*=//'`; shift;; - --with-g77=*) G77_UNDER_TEST=`echo "$1" | sed 's/[^=]*=//'`; shift;; - --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: - ---help prints this page - ---with-testsuite=/some/dir/gcc/testsuite specify the testsuite directory ---srcdir=/some/dir same as --with-testsuite=/some/dir/gcc/testsuite - [deduced from shell-script pathname] - ---prefix=/some/dir use gcc, g++ and g77 from /some/dir/bin [PATH] ---with-gcc=/some/dir/bin/gcc use specified gcc program [gcc] ---with-g++=/some/dir/bin/g++ use specified g++ program [g++] ---with-g77=/some/dir/bin/g77 use specified g77 program [g77] ---without-gcc do not run gcc testsuite ---without-g++ do not run g++ testsuite ---without-g77 do not run g77 testsuite - ---tmpdir=/some/dir create temporaries and leave failed programs - at specified directory [.] - --- end of argument list; following arguments are passed to runtest -EOF - exit - ;; - - --) shift; break;; - *) break;; - esac -done - -if test x"${testsuite+set}" != x"set" && test x"${srcdir+set}" != x"set"; then - file=$0 - 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 < - -# This script is Free Software, and it can be copied, distributed and -# modified as defined in the GNU General Public License. A copy of -# its license can be downloaded from http://www.gnu.org/copyleft/gpl.html - -# This script processes *.{sum,log} files, producing a shell-script -# that sends e-mail to the appropriate lists and renames files to -# *.sent. It currently handles only gcc, but it should be quite easy -# to modify it to handle other packages and its mailing lists. - -# The scripts assumes it is run in the root directory of the build -# tree, and it will include all .sum files it finds in the mail -# report. - -# configure flags are extracted from ./config.status - -# if the BOOT_CFLAGS environment variable is set, it will be included -# in the mail report too. - -# The usage pattern of this script is as follows: - -# test_summary | more # so as to observe what should be done - -# test_summary | sh # so as to actually send e-mail and move log files - -# It accepts a few command line arguments. For example: -# -o: re-reads logs that have been mailed already (.sum.sent) -# -t: prevents logs from being renamed -# -p: prepend specified file (or list of files: -p "a b") to the report -# -i: append specified file (or list of files: -i "a b") to the report -# -m: specify the e-mail address to send notes to. An appropriate default -# should be selected from the log files. -# -f: force reports to be mailed; if omitted, only reports that differ -# from the sent.* version are sent. - -# Find a good awk. -if test -z "$AWK" ; then - for AWK in gawk nawk awk ; do - if type $AWK 2>&1 | grep 'not found' > /dev/null 2>&1 ; then - : - else - break - fi - done -fi - -: ${filesuffix=}; export filesuffix -: ${move=true}; export move -: ${forcemail=false}; export forcemail -while true; do - case "$1" in - -o) filesuffix=.sent; move=false; : ${mailto=nobody}; shift;; - -t) move=false; shift;; - -p) prepend_logs=${prepend_logs+"$prepend_logs "}"$2"; shift 2;; - -i) append_logs=${append_logs+"$append_logs "}"$2"; shift 2;; - -m) mailto=$2; forcemail=true; shift 2;; - -f) unset mailto; forcemail=true; shift;; - *) break;; - esac -done -: ${mailto="\" address \""}; export mailto -files=`find . -name \*.sum$filesuffix -print | sort` -anyfile=false anychange=$forcemail && -for file in $files; do - [ -f $file ] && - anyfile=true && - { $anychange || - anychange=`diff -u $file.sent $file 2>/dev/null | - if test ! -f $file.sent || - egrep '^[-+](XPASS|FAIL)' >/dev/null; then - echo true - else - echo false - fi - ` - } - true -done && -$anyfile && -if $forcemail || $anychange; then :; else mailto=nobody; fi && -# We use cat instead of listing the files as arguments to AWK because -# GNU awk 3.0.0 would break if any of the filenames contained `=' and -# was preceded by an invalid ``variable'' name. -cat ./config.status $files | -$AWK ' -BEGIN { - lang=""; - address="gcc-testresults@gcc.gnu.org"; - version="gcc"; - print "cat <<'"'"'EOF'"'"' |"; -'${prepend_logs+" system(\"cat $prepend_logs\"); "}' -} -$1 ~ /\/configure$/ { - srcdir = $1; - gsub(/\/configure$/, "", srcdir); - printf "LAST_UPDATED: "; - system("tail -1 " srcdir "/LAST_UPDATED"); - print ""; - - $1 = "configure flags:"; configflags = $0; - gsub(/--with-gcc-version-trigger=[^ ]* /, "", configflags); - gsub(/ --norecursion/, "", configflags) -} -/^Running target / { print ""; print; } -/^Target / { if (host != "") next; else host = $3; } -/^Host / && host ~ /^unix\{.*\}$/ { host = $3 " " substr(host, 5); } -/^Native / { if (host != "") next; else host = $4; } -/^[ ]*=== [^ ]+ tests ===/ { - if (lang == "") lang = " "$2" "; else lang = " "; -} -$2 == "version" { save = $0; $1 = ""; $2 = ""; version = $0; gsub(/^ */, "", version); gsub(/\r$/, "", version); $0 = save; } -/\===.*Summary/ { print ""; print; blanks=1; } -/tests ===/ || /^(Target|Host|Native)/ || $2 == "version" { print; blanks=1; } -/^(XPASS|FAIL|UNRESOLVED|WARNING|ERROR|# of )/ { print; } -# dumpall != 0 && /^X?(PASS|FAIL|UNTESTED)|^testcase/ { dumpall=0; } -# dumpall != 0 { print; } -# /^FAIL/ { dumpall=1; } -/^$/ && blanks>0 { print; --blanks; } -END { if (lang != "") { - print ""; - print "Compiler version: " prefix version lang; - print "Platform: " host; - print configflags; - '${BOOT_CFLAGS+'print "BOOT_CFLAGS='"${BOOT_CFLAGS}"'";'}' - if (boot_cflags != 0) print boot_cflags; -'${append_logs+" system(\"cat $append_logs\"); "}' - print "EOF"; - print "Mail -s \"Results for " prefix version lang "testsuite on " host "\" '"${mailto}"' &&"; -}} -{ next; } -' | 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 -exit 0 diff --git a/contrib/gcc/contrib/texi2pod.pl b/contrib/gcc/contrib/texi2pod.pl deleted file mode 100755 index 4fb8892..0000000 --- a/contrib/gcc/contrib/texi2pod.pl +++ /dev/null @@ -1,427 +0,0 @@ -#! /usr/bin/perl -w - -# Copyright (C) 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. - -# This does trivial (and I mean _trivial_) conversion of Texinfo -# markup to Perl POD format. It's intended to be used to extract -# something suitable for a manpage from a Texinfo document. - -$output = 0; -$skipping = 0; -%sects = (); -$section = ""; -@icstack = (); -@endwstack = (); -@skstack = (); -@instack = (); -$shift = ""; -%defs = (); -$fnno = 1; -$inf = ""; -$ibase = ""; - -while ($_ = shift) { - if (/^-D(.*)$/) { - if ($1 ne "") { - $flag = $1; - } else { - $flag = shift; - } - $value = ""; - ($flag, $value) = ($flag =~ /^([^=]+)(?:=(.+))?/); - die "no flag specified for -D\n" - unless $flag ne ""; - die "flags may only contain letters, digits, hyphens, dashes and underscores\n" - unless $flag =~ /^[a-zA-Z0-9_-]+$/; - $defs{$flag} = $value; - } elsif (/^-/) { - usage(); - } else { - $in = $_, next unless defined $in; - $out = $_, next unless defined $out; - usage(); - } -} - -if (defined $in) { - $inf = gensym(); - open($inf, "<$in") or die "opening \"$in\": $!\n"; - $ibase = $1 if $in =~ m|^(.+)/[^/]+$|; -} else { - $inf = \*STDIN; -} - -if (defined $out) { - open(STDOUT, ">$out") or die "opening \"$out\": $!\n"; -} - -while(defined $inf) { -while(<$inf>) { - # Certain commands are discarded without further processing. - /^\@(?: - [a-z]+index # @*index: useful only in complete manual - |need # @need: useful only in printed manual - |(?:end\s+)?group # @group .. @end group: ditto - |page # @page: ditto - |node # @node: useful only in .info file - |(?:end\s+)?ifnottex # @ifnottex .. @end ifnottex: use contents - )\b/x and next; - - chomp; - - # Look for filename and title markers. - /^\@setfilename\s+([^.]+)/ and $fn = $1, next; - /^\@settitle\s+([^.]+)/ and $tl = postprocess($1), next; - - # Identify a man title but keep only the one we are interested in. - /^\@c\s+man\s+title\s+([A-Za-z0-9-]+)\s+(.+)/ and do { - if (exists $defs{$1}) { - $fn = $1; - $tl = postprocess($2); - } - next; - }; - - # Look for blocks surrounded by @c man begin SECTION ... @c man end. - # This really oughta be @ifman ... @end ifman and the like, but such - # would require rev'ing all other Texinfo translators. - /^\@c\s+man\s+begin\s+([A-Z]+)\s+([A-Za-z0-9-]+)/ and do { - $output = 1 if exists $defs{$2}; - $sect = $1; - next; - }; - /^\@c\s+man\s+begin\s+([A-Z]+)/ and $sect = $1, $output = 1, next; - /^\@c\s+man\s+end/ and do { - $sects{$sect} = "" unless exists $sects{$sect}; - $sects{$sect} .= postprocess($section); - $section = ""; - $output = 0; - next; - }; - - # handle variables - /^\@set\s+([a-zA-Z0-9_-]+)\s*(.*)$/ and do { - $defs{$1} = $2; - next; - }; - /^\@clear\s+([a-zA-Z0-9_-]+)/ and do { - delete $defs{$1}; - next; - }; - - next unless $output; - - # Discard comments. (Can't do it above, because then we'd never see - # @c man lines.) - /^\@c\b/ and next; - - # End-block handler goes up here because it needs to operate even - # if we are skipping. - /^\@end\s+([a-z]+)/ and do { - # 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; - - $endw = pop @endwstack; - - if ($ended =~ /^(?:ifset|ifclear|ignore|menu|iftex)$/) { - $skipping = pop @skstack; - next; - } elsif ($ended =~ /^(?:example|smallexample|display)$/) { - $shift = ""; - $_ = ""; # need a paragraph break - } elsif ($ended =~ /^(?:itemize|enumerate|[fv]?table)$/) { - $_ = "\n=back\n"; - $ic = pop @icstack; - } else { - die "unknown command \@end $ended at line $.\n"; - } - }; - - # We must handle commands which can cause skipping even while we - # are skipping, otherwise we will not process nested conditionals - # correctly. - /^\@ifset\s+([a-zA-Z0-9_-]+)/ and do { - push @endwstack, $endw; - push @skstack, $skipping; - $endw = "ifset"; - $skipping = 1 unless exists $defs{$1}; - next; - }; - - /^\@ifclear\s+([a-zA-Z0-9_-]+)/ and do { - push @endwstack, $endw; - push @skstack, $skipping; - $endw = "ifclear"; - $skipping = 1 if exists $defs{$1}; - next; - }; - - /^\@(ignore|menu|iftex)\b/ and do { - push @endwstack, $endw; - push @skstack, $skipping; - $endw = $1; - $skipping = 1; - next; - }; - - next if $skipping; - - # Character entities. First the ones that can be replaced by raw text - # or discarded outright: - s/\@copyright\{\}/(c)/g; - s/\@dots\{\}/.../g; - s/\@enddots\{\}/..../g; - s/\@([.!? ])/$1/g; - s/\@[:-]//g; - s/\@bullet(?:\{\})?/*/g; - s/\@TeX\{\}/TeX/g; - s/\@pounds\{\}/\#/g; - s/\@minus(?:\{\})?/-/g; - s/\\,/,/g; - - # Now the ones that have to be replaced by special escapes - # (which will be turned back into text by unmunge()) - s/&/&/g; - s/\@\{/{/g; - s/\@\}/}/g; - s/\@\@/&at;/g; - - # Inside a verbatim block, handle @var specially. - if ($shift ne "") { - s/\@var\{([^\}]*)\}/<$1>/g; - } - - # POD doesn't interpret E<> inside a verbatim block. - if ($shift eq "") { - s//>/g; - } else { - s//>/g; - } - - # Single line command handlers. - - /^\@include\s+(.+)$/ and do { - push @instack, $inf; - $inf = gensym(); - - # Try cwd and $ibase. - open($inf, "<" . $1) - or open($inf, "<" . $ibase . "/" . $1) - or die "cannot open $1 or $ibase/$1: $!\n"; - next; - }; - - /^\@(?:section|unnumbered|unnumberedsec|center)\s+(.+)$/ - and $_ = "\n=head2 $1\n"; - /^\@subsection\s+(.+)$/ - and $_ = "\n=head3 $1\n"; - - # Block command handlers: - /^\@itemize\s+(\@[a-z]+|\*|-)/ and do { - push @endwstack, $endw; - push @icstack, $ic; - $ic = $1; - $_ = "\n=over 4\n"; - $endw = "itemize"; - }; - - /^\@enumerate(?:\s+([a-zA-Z0-9]+))?/ and do { - push @endwstack, $endw; - push @icstack, $ic; - if (defined $1) { - $ic = $1 . "."; - } else { - $ic = "1."; - } - $_ = "\n=over 4\n"; - $endw = "enumerate"; - }; - - /^\@([fv]?table)\s+(\@[a-z]+)/ and do { - push @endwstack, $endw; - push @icstack, $ic; - $endw = $1; - $ic = $2; - $ic =~ s/\@(?:samp|strong|key|gcctabopt|env)/B/; - $ic =~ s/\@(?:code|kbd)/C/; - $ic =~ s/\@(?:dfn|var|emph|cite|i)/I/; - $ic =~ s/\@(?:file)/F/; - $_ = "\n=over 4\n"; - }; - - /^\@((?:small)?example|display)/ and do { - push @endwstack, $endw; - $endw = $1; - $shift = "\t"; - $_ = ""; # need a paragraph break - }; - - /^\@itemx?\s*(.+)?$/ and do { - if (defined $1) { - # Entity escapes prevent munging by the <> processing below. - $_ = "\n=item $ic\<$1\>\n"; - } else { - $_ = "\n=item $ic\n"; - $ic =~ y/A-Ya-y/B-Zb-z/; - $ic =~ s/(\d+)/$1 + 1/eg; - } - }; - - $section .= $shift.$_."\n"; -} -# End of current file. -close($inf); -$inf = pop @instack; -} - -die "No filename or title\n" unless defined $fn && defined $tl; - -$sects{NAME} = "$fn \- $tl\n"; -$sects{FOOTNOTES} .= "=back\n" if exists $sects{FOOTNOTES}; - -for $sect (qw(NAME SYNOPSIS DESCRIPTION OPTIONS ENVIRONMENT FILES - BUGS NOTES FOOTNOTES SEEALSO AUTHOR COPYRIGHT)) { - if(exists $sects{$sect}) { - $head = $sect; - $head =~ s/SEEALSO/SEE ALSO/; - print "=head1 $head\n\n"; - print scalar unmunge ($sects{$sect}); - print "\n"; - } -} - -sub usage -{ - die "usage: $0 [-D toggle...] [infile [outfile]]\n"; -} - -sub postprocess -{ - local $_ = $_[0]; - - # @value{foo} is replaced by whatever 'foo' is defined as. - while (m/(\@value\{([a-zA-Z0-9_-]+)\})/g) { - if (! exists $defs{$2}) { - print STDERR "Option $2 not defined\n"; - s/\Q$1\E//; - } else { - $value = $defs{$2}; - s/\Q$1\E/$value/; - } - } - - # Formatting commands. - # Temporary escape for @r. - s/\@r\{([^\}]*)\}/R<$1>/g; - s/\@(?:dfn|var|emph|cite|i)\{([^\}]*)\}/I<$1>/g; - s/\@(?:code|kbd)\{([^\}]*)\}/C<$1>/g; - s/\@(?:gccoptlist|samp|strong|key|option|env|command|b)\{([^\}]*)\}/B<$1>/g; - s/\@sc\{([^\}]*)\}/\U$1/g; - s/\@file\{([^\}]*)\}/F<$1>/g; - s/\@w\{([^\}]*)\}/S<$1>/g; - s/\@(?:dmn|math)\{([^\}]*)\}/$1/g; - - # Cross references are thrown away, as are @noindent and @refill. - # (@noindent is impossible in .pod, and @refill is unnecessary.) - # @* is also impossible in .pod; we discard it and any newline that - # follows it. Similarly, our macro @gol must be discarded. - - s/\(?\@xref\{(?:[^\}]*)\}(?:[^.<]|(?:<[^<>]*>))*\.\)?//g; - s/\s+\(\@pxref\{(?:[^\}]*)\}\)//g; - s/;\s+\@pxref\{(?:[^\}]*)\}//g; - s/\@noindent\s*//g; - s/\@refill//g; - s/\@gol//g; - s/\@\*\s*\n?//g; - - # @uref can take one, two, or three arguments, with different - # semantics each time. @url and @email are just like @uref with - # one argument, for our purposes. - s/\@(?:uref|url|email)\{([^\},]*)\}/<B<$1>>/g; - 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; - - # Extract footnotes. This has to be done after all other - # processing because otherwise the regexp will choke on formatting - # inside @footnote. - while (/\@footnote/g) { - s/\@footnote\{([^\}]+)\}/[$fnno]/; - add_footnote($1, $fnno); - $fnno++; - } - - return $_; -} - -sub unmunge -{ - # Replace escaped symbols with their equivalents. - local $_ = $_[0]; - - s/</E/g; - s/>/E/g; - s/{/\{/g; - s/}/\}/g; - s/&at;/\@/g; - s/&/&/g; - return $_; -} - -sub add_footnote -{ - unless (exists $sects{FOOTNOTES}) { - $sects{FOOTNOTES} = "\n=over 4\n\n"; - } - - $sects{FOOTNOTES} .= "=item $fnno.\n\n"; $fnno++; - $sects{FOOTNOTES} .= $_[0]; - $sects{FOOTNOTES} .= "\n\n"; -} - -# stolen from Symbol.pm -{ - my $genseq = 0; - sub gensym - { - my $name = "GEN" . $genseq++; - my $ref = \*{$name}; - delete $::{$name}; - return $ref; - } -} diff --git a/contrib/gcc/contrib/warn_summary b/contrib/gcc/contrib/warn_summary deleted file mode 100755 index 10b4c0d..0000000 --- a/contrib/gcc/contrib/warn_summary +++ /dev/null @@ -1,210 +0,0 @@ -#!/bin/sh -# -# This script parses the output of a gcc bootstrap when using warning -# flags and determines various statistics. -# -# usage: warn_summary [-llf] [-s stage] [-nosub|-ch|-cp|-f|-java|-ada|-intl|-fixinc] -# [-pass|-wpass] [file(s)] -# -# -llf -# Filter out long lines from the bootstrap output before any other -# action. This is useful for systems with broken awks/greps which choke -# on long lines. It is not done by default as it sometimes slows things -# down. -# -# -s number -# Take warnings from stage "Number". Stage 0 means show warnings from -# before and after the gcc bootstrap directory. E.g. libraries, etc. -# This presupposes using "gcc -W*" for the stage1 compiler. -# -# -nosub -# Only show warnings from the gcc top level directory. -# -ch|-cp|-f|-java|-ada|-intl|-fixinc -# Only show warnings from the specified language subdirectory. -# These override each other so only the last one passed takes effect. -# -# -pass -# Pass through the bootstrap output after filtering stage and subdir -# (useful for manual inspection.) This is all lines, not just warnings. -# -wpass -# Pass through only warnings from the bootstrap output after filtering -# stage and subdir. -# -# By Kaveh Ghazi (ghazi@caip.rutgers.edu) 12/13/97. - - -# Some awks choke on long lines, sed seems to do a better job. -# Truncate lines > 255 characters. RE '.\{255,\}' doesn't seem to work. :-( -# Only do this if -llf was specified, because it can really slow things down. -longLineFilter() -{ - if test -z "$llf" ; then - cat - else - sed 's/^\(...............................................................................................................................................................................................................................................................\).*/\1/' - fi -} - -# This function does one of three things. It either passes through -# all warning data, or passes through gcc toplevel warnings, or passes -# through a particular subdirectory set of warnings. -subdirectoryFilter() -{ - longLineFilter | ( - if test -z "$filter" ; then - # Pass through all lines. - cat - else - if test "$filter" = nosub ; then - # Omit all subdirectories. - egrep -v '/gcc/(ch|cp|f|java|intl|fixinc)/' - else - # Pass through only subdir $filter. - grep "/gcc/$filter/" - fi - fi ) -} - -# This function displays all lines from stageN of the bootstrap. If -# stage==0, then show lines prior to stage1 and lines from after the last -# stage. I.e. utilities, libraries, etc. -stageNfilter() -{ - if test "$stageN" -lt 1 ; then - # stage "0" means check everything *but* gcc. - $AWK "BEGIN{t=1} ; /^Bootstrapping the compiler/{t=0} ; /^Building runtime libraries/{t=1} ; {if(t==1)print}" - else - if test "$stageN" -eq 1 ; then - $AWK "/^Bootstrapping the compiler|^Building the C and C\+\+ compiler/{t=1} ; /stage$stageN/{t=0} ; {if(t==1)print}" - else - stageNminus1=`expr $stageN - 1` - $AWK "/stage${stageNminus1}\//{t=1} ; /stage$stageN/{t=0} ; {if(t==1)print}" - fi - fi -} - -# This function displays lines containing warnings. -warningFilter() -{ - grep ' warning: ' -} - -# This function replaces `xxx' with `???', where xxx is usually some -# variable or function name. This allows similar warnings to be -# counted together when summarizing. However it avoids replacing -# certain C keywords which are known appear in various messages. - -keywordFilter() { - sed 's/.*warning: //; - s/`\(int\)'"'"'/"\1"/g; - s/`\(long\)'"'"'/"\1"/g; - s/`\(char\)'"'"'/"\1"/g; - s/`\(inline\)'"'"'/"\1"/g; - s/`\(else\)'"'"'/"\1"/g; - s/`\(return\)'"'"'/"\1"/g; - s/`\(static\)'"'"'/"\1"/g; - s/`\(extern\)'"'"'/"\1"/g; - s/`\(const\)'"'"'/"\1"/g; - s/`\(noreturn\)'"'"'/"\1"/g; - s/`\(longjmp\)'"'"' or `\(vfork\)'"'"'/"\1" or "\2"/g; - s/`'"[^']*'/"'`???'"'/g;"' - s/.*format, .* arg (arg [0-9][0-9]*)/??? format, ??? arg (arg ???)/; - s/\([( ]\)arg [0-9][0-9]*\([) ]\)/\1arg ???\2/; - s/"\([^"]*\)"/`\1'"'"'/g' -} - -# This function strips out relative pathnames for source files printed -# by the warningFilter function. This is done so that as the snapshot -# directory name changes every week, the output of this program can be -# compared to previous runs without spurious diffs caused by source -# directory name changes. - -srcdirFilter() -{ - sed ' -s%^[^ ]*/\(gcc/\)%\1%; -s%^[^ ]*/\(include/\)%\1%; -s%^[^ ]*/\(texinfo/\)%\1%; -s%^[^ ]*/\(fastjar/\)%\1%; -s%^[^ ]*/\(zlib/\)%\1%; -s%^[^ ]*/\(lib[a-z23+-]*/\)%\1%;' -} - -# Start the main section. - -usage="usage: `basename $0` [-llf] [-s stage] [-nosub|-ch|-cp|-f|-java|-ada|-intl|-fixinc] [-pass|-wpass] [file(s)]" -stageN=3 -tmpfile=/tmp/tmp-warn.$$ - -# Remove $tmpfile on exit and various signals. -trap "rm -f $tmpfile" 0 -trap "rm -f $tmpfile ; exit 1" 1 2 3 5 9 13 15 - -# Find a good awk. -if test -z "$AWK" ; then - for AWK in gawk nawk awk ; do - if type $AWK 2>&1 | grep 'not found' > /dev/null 2>&1 ; then - : - else - break - fi - done -fi - -# Parse command line arguments. -while test -n "$1" ; do - case "$1" in - -llf) llf=1 ; shift ;; - -s) if test -z "$2"; then echo $usage 1>&2; exit 1; fi - stageN="$2"; shift 2 ;; - -s*) stageN="`expr $1 : '-s\(.*\)'`" ; shift ;; - -nosub|-ch|-cp|-f|-java|-ada|-intl|-fixinc) filter="`expr $1 : '-\(.*\)'`" ; shift ;; - -pass) pass=1 ; shift ;; - -wpass) pass=w ; shift ;; - -*) echo $usage 1>&2 ; exit 1 ;; - *) break ;; - esac -done - -# Check for a valid value of $stageN. -case "$stageN" in - [0-9]) ;; - *) echo "Stage <$stageN> must be in the range [0..9]." 1>&2 ; exit 1 ;; -esac - -for file in "$@" ; do - - stageNfilter < $file | subdirectoryFilter > $tmpfile - - # (Just) show me the warnings. - if test "$pass" != '' ; then - if test "$pass" = w ; then - warningFilter < $tmpfile - else - cat $tmpfile - fi - continue - fi - - if test -z "$filter" ; then - echo "Counting all warnings," - else - if test "$filter" = nosub ; then - echo "Counting non-subdirectory warnings," - else - echo "Counting warnings in the gcc/$filter subdirectory," - fi - fi - count=`warningFilter < $tmpfile | wc -l` - echo there are $count warnings in stage$stageN of this bootstrap. - - echo - echo Number of warnings per file: - warningFilter < $tmpfile | srcdirFilter | $AWK -F: '{print$1}' | sort | \ - uniq -c | sort -nr - - echo - echo Number of warning types: - warningFilter < $tmpfile | keywordFilter | sort | uniq -c | sort -nr - -done diff --git a/contrib/gcc/faq.html b/contrib/gcc/faq.html deleted file mode 100644 index 9170647..0000000 --- a/contrib/gcc/faq.html +++ /dev/null @@ -1,698 +0,0 @@ - - - -GCC Frequently Asked Questions - - - - -

GCC Frequently Asked Questions

- -

The latest version of this document is always available at -http://www.gnu.org/software/gcc/faq.html.

- -

This FAQ tries to answer specific questions concerning GCC. For -general information regarding C, C++, resp. Fortran please check the -comp.lang.c FAQ, -comp.std.c++ -FAQ, -and the Fortran -Information page.

- -

Other GCC-related FAQs: - - libstdc++-v3, and - GCJ.

- -
-

Questions

-
    -
  1. General information -
      -
    1. What is the relationship between GCC and EGCS?
    2. -
    3. What is the relationship between GCC and Cygnus / Red Hat?
    4. -
    5. What is an open development model?
    6. -
    7. How do I report a bug?
    8. -
    9. How do I get a bug fixed or a feature added?
    10. -
    11. Does GCC work on my platform?
    12. -
  2. - -
  3. Installation -
      -
    1. How to install multiple versions of GCC
    2. -
    3. Dynamic linker is unable to find GCC libraries
    4. -
    5. libstdc++/libio tests fail badly with --enable-shared
    6. -
    7. GCC can not find GNU as/GNU ld
    8. -
    9. cpp: Usage:... Error
    10. -
    11. Optimizing the compiler itself
    12. -
  4. - -
  5. Testsuite problems -
      -
    1. Unable to run the testsuite
    2. -
    3. How do I pass flags like - -fnew-abi to the testsuite?
    4. -
    5. How can I run the test suite with multiple options?
    6. -
  6. - -
  7. Older versions of GCC -
      -
    1. Is there a stringstream / sstream for GCC 2.95.2?
    2. -
  8. - -
  9. Miscellaneous -
      -
    1. Virtual memory exhausted
    2. -
    3. Friend Templates
    4. -
    5. dynamic_cast, throw, typeid don't work with shared libraries
    6. -
    7. Why do I need autoconf, bison, xgettext, automake, etc?
    8. -
    9. Why can't I build a shared library?
    10. -
    11. How to work around too long C++ symbol names? - (-fsquangle)
    12. -
    13. When building C++, the linker says my constructors, destructors or virtual tables are undefined, but I defined them
    14. -
    15. Will GCC someday include an incremental linker?
    16. -
  10. -
- - -
- -

General information

- -

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 -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 -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 -[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 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.
  • -
- -
- -

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 latest version -is always available at the GCC web site. -Reports of successful builds -for several versions of GCC are also available at the web site.

- -
- -

Installation

- -

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, 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 <other configure options> -
-

This should result in GCC being installed as -/usr/local/bin/gcc-2.95.2 instead of -/usr/local/bin/gcc.

- -
-

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 asembler 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 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.

- -

Also note '::' in these paths will also cause similar problems.

- - -
-

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 - - 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" <other options>
-
-

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 multiple options?

- -

If you invoke runtest directly, you can use the ---target_board option, e.g:

-
-  runtest --target_board "unix{-fPIC,-fpic,}" <other options>
-
-

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.

- -
- -

Older versions of GCC and EGCS

- -

Is there a stringstream / sstream for GCC 2.95.2?

- -

Yes, it's at: - - http://gcc.gnu.org/ml/libstdc++/2000-q2/msg00700/sstream.

- -
- -

Miscellaneous

- - - -

Virtual memory exhausted error

- -

This error means your system ran out of memory; this can happen for large -files, particularly when optimizing. If you're getting this error you should -consider trying to simplify your files or reducing the optimization level.

- -

Note that using -pedantic or -Wreturn-type can cause an explosion in the -amount of memory needed for template-heavy C++ code, such as code that uses -STL. Also note that -Wall includes -Wreturn-type, so if you use -Wall you -will need to specify -Wno-return-type to turn it off.

- - -
-

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 <typename T> class foo {
-  friend void bar(foo<T>);
-}
-
-

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<int>) { /* ... */ }
-void bar(foo<void>) { /* ... */ }
-
-

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 <typename T>
-class foo;
-
-template <typename T>
-void bar(foo<T>);
-
-template <typename T>
-class foo {
-  friend void bar<>(foo<T>);
-};
-
-template <typename T>
-void bar(foo<T>) { /* ... */ }
-
-

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 with shared libraries

- -

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 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 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 - -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
-
- - -
-

How to work around too long C++ symbol names -(-fsquangle)

- -

This question does not apply to GCC 3.0 or later versions, which -have a new C++ ABI with much shorter mangled names.

- -

If the standard assembler of your platform can't cope with the -large symbol names that the default g++ name mangling mechanism -produces, your best bet is to use GNU as, from the GNU binutils -package.

- -

Unfortunately, GNU as does not support all platforms supported by -GCC, so you may have to use an experimental work-around: the --fsquangle option, that enables compression of symbol names.

- -

Note that this option is still under development, and subject to -change. Since it modifies the name mangling mechanism, you'll need to -build libstdc++ and any other C++ libraries with this option enabled. -Furthermore, if this option changes its behavior in the future, you'll -have to rebuild them all again. :-(

- -

This option can be enabled by default by initializing -`flag_do_squangling' with `1' in `gcc/cp/decl2.c' (it is not -initialized by default), then rebuilding GCC and any C++ libraries.

- - -
-

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)).

- - - - diff --git a/contrib/gcc/gnats.html b/contrib/gcc/gnats.html deleted file mode 100644 index 2a42024..0000000 --- a/contrib/gcc/gnats.html +++ /dev/null @@ -1,170 +0,0 @@ - - - -Submitting Bug Reports using GNATS - - -

Submitting Bug Reports using GNATS

- - -

gnatsweb and gccbug

- -

GNATS, the GNU bug tracking system, is used to track GCC bug reports. -Before submitting a bug report, please read the general instructions.

- -

The preferred way to submit a bug report is by means of the -gnatsweb -interface. Make sure you include an e-mail address, so we can inform -you when the status of your report changes.

- -

Another way is to use the gccbug program that is -automatically installed with current versions of GCC, which submits the bug -report by e-mail.

- -

Both techniques use the same GNATS bug database.

- -

Filling out a report

- -

The bug report form provides a number of fields; you'll need to -fill-out most of those (as indicated below) to provide a complete -report. The fields have the following purpose:

- -
-
Originator
-
Your name.
- -
Organization
-
Your organization. You can leave this field blank.
- -
Confidential
-
This field is unused and set to 'no'. All bug reports, including -sample code, are publicly accessible.
- -
Synopsis
-
A one-line description of the problem; something like "GCC 2.95 -does not foo", "objc crashes when doing bar".
- -
Severity
-
Can be one of -
-
critical
-
GCC is completely not operational; no work-around known.
-
serious
-
GCC is not working properly; a work-around is possible.
-
non-critical
-
Report indicates minor problem.
-
-
- -
Priority
-
Can be one of -
-
high
-
A solution is necessary as soon as possible. This is reserved to - GCC maintainers.
-
medium
-
The problem should be solved in the next release.
-
low
-
The problem should be solved in a future release.
-
-
- -
Category
-
This indicates the GCC subproject which is affected by the problem. - Currently, it can be one of -
-
ada
-
A problem with the Ada compiler, libraries or tools.
-
bootstrap
-
GCC fails to bootstrap. This should be filed only if a - bootstrap failure prevails for an extended period of time (at least - one week) on any platform (and possibly not-so-common conditions like - a read-only srcdir), or non-mainstream platforms.
-
c++
-
A problem with the C++ compiler.
-
c
-
A problem with the C compiler.
-
debug
-
A problem with generating debugging information.
-
fortran
-
A problem with the Fortran compiler.
-
java
-
A problem with the Java compiler.
-
libf2c
-
A problem in the Fortran runtime library.
-
libgcj
-
A problem in the Java runtime library.
-
libobjc
-
A problem in the Objective C runtime library.
-
libstdc++
-
A problem in the Standard C++ runtime library.
-
middle-end
-
A problem in the internal compiler passes.
-
objc
-
A problem with the Objective C compiler.
-
optimization
-
A problem only occurring under optimization.
-
preprocessor
-
A problem with the C preprocessor.
-
target
-
The problem depends on the specific target architecture.
-
web
-
There is an error or omission on the Web pages.
-
other
-
The problem is in none of these categories.
-
-
- -
Class
-
A classification of the problem; one of -
-
doc-bug
-
The documentation is incorrect.
-
accepts-illegal
-
GCC fails to reject erroneous code.
-
rejects-legal
-
GCC gives an error message for correct code.
-
wrong-code
-
The machine code generated by GCC is incorrect.
-
ice-on-legal-code
-
GCC gives an Internal Compiler Error (ICE) for correct code.
-
ice-on-illegal-code
-
GCC gives an ICE instead of reporting an error.
-
pessimizes-code
-
GCC misses an important optimization opportunity.
-
sw-bug
-
Software bug of some other class than above.
-
change-request
-
A feature in GCC is missing.
-
support
-
I need help with GCC.
-
-
- -
Release
-
GCC version, as obtained from 'gcc -v' (one line).
- -
Environment
-
Information about your operating system version, hardware architecture, - and environment settings that affect GCC.
- -
Description
-
Precise description of the problem. You should put the error messages - printed by GCC here; source code should go into the next section.
- -
How-To-Repeat
- -
Please put the complete source code to reproduce the problem here. - The gccbug script currently does not support file - attachments. Instead, if you have multiple files, include them - uuencoded (compressing them before if they are large). If you use - gnatsweb, you can use the file attachments button instead.
- -
Fix
-
How to correct or work around the problem, if known (multiple lines).
- -
- - - diff --git a/contrib/gcc/include/COPYING b/contrib/gcc/include/COPYING deleted file mode 100644 index d60c31a..0000000 --- a/contrib/gcc/include/COPYING +++ /dev/null @@ -1,340 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 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. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program 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. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public 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. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - 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 of the License, 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 - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. diff --git a/contrib/gcc/include/ChangeLog b/contrib/gcc/include/ChangeLog deleted file mode 100644 index 03e12be..0000000 --- a/contrib/gcc/include/ChangeLog +++ /dev/null @@ -1,1960 +0,0 @@ -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-11-03 Roger Sayle - DJ Delorie - - * getopt.h: Avoid prototyping getopt with no arguments in C++. - -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-04-16 David S. Miller - - * xregex2.h (__restrict_arr): Define to __restrict on GCC - 3.1 and later. Do not redefine. - -2002-04-01 Phil Edwards - - * dyn-string.h: Also allow IN_GLIBCPP_V3 to redefine names. - -2002-02-22 Jim Blandy - - Allow the user to specify functions for allocating memory for - splay tree roots and nodes. - * splay-tree.h (splay_tree_allocate_fn, splay_tree_deallocate_fn): - New types. - (splay_tree): New fields: `allocate', `deallocate', and - `allocate_data'. - (splay_tree_new_with_allocator): New function declaration. - -2002-02-05 Jason Merrill - - * demangle.h (cplus_demangle_v3): Add "options" parm. - (cplus_demangle_v3_type): Remove prototype. - (DMGL_VERBOSE): New macro. - (DMGL_TYPES): New macro. - -2002-02-02 H.J. Lu (hjl@gnu.org) - - * demangle.h (cplus_demangle_v3_type): New prototype. - -2002-01-28 Kaveh R. Ghazi - - * libiberty.h (C_alloca): Add ATTRIBUTE_MALLOC. - -2001-12-06 Richard Henderson - - * demangle.h (no_demangling): New. - (NO_DEMANGLING_STYLE_STRING): New. - -2001-10-24 Neil Booth - - * safe-ctype.h (_sch_isbasic, IS_ISOBASIC): New. - -2001-10-22 Kaveh R. Ghazi - - * libiberty.h (hex_init): Revert delete. - - * libiberty.h (_hex_value): Const-ify. - (hex_init): Delete. - -2001-10-07 Kaveh R. Ghazi - - * demangle.h (demangler_engine): Const-ify. - * libiberty.h (buildargv): Likewise. - -2001-09-24 Kaveh R. Ghazi - - * libiberty.h (reconcat): New function. - -2001-09-18 Kaveh R. Ghazi - - * libiberty.h (concat, concat_length, concat_copy, concat_copy2, - ACONCAT): Improve comments. - -2001-09-18 Alan Modra - - * objalloc.h (OBJALLOC_ALIGN): Define using offsetof. - -2001-09-17 Kaveh R. Ghazi - - * libiberty.h (concat_length, concat_copy, concat_copy2, - libiberty_concat_ptr, ACONCAT): New. - - * libiberty.h (ASTRDUP): New macro. - libiberty_optr, libiberty_nptr, libiberty_len): Declare. - -2001-08-29 Kaveh R. Ghazi - - * ansidecl.h: Update comments reflecting previous change. - -2001-08-27 Kaveh R. Ghazi - - * ansidecl.h (VA_OPEN, VA_CLOSE): Allow multiple uses. - -2001-08-23 Lars Brinkhoff - - * dyn-string.h, fibheap.h, partition.h, sort.h, splay-tree.h: - replace "GNU CC" with "GCC". - -2001-08-21 Richard Henderson - - * fibheap.h: Tidy formatting. - (fibnode_t): Limit degree to 31 bits to avoid warning. - -2001-08-20 Andrew Cagney - - * floatformat.h (floatformat_arm_ext): Document as deprecated. - (floatformat_arm_ext_big, floatformat_arm_ext_littlebyte_bigword) - (floatformat_ia64_spill_little, floatformat_ia64_quad_little) - (floatformat_ia64_spill_big, floatformat_ia64_quad_big) - (floatformat_m88110_harris_ext): Declare. - -2001-08-20 Daniel Berlin - - * fibheap.h: New file. Fibonacci heap. - -2001-08-18 Zack Weinberg - - * ansidecl.h: Reorganize for readability, remove documentation - of obsolete macros, document PARAMS and VPARAMS. Add new - macros VA_OPEN, VA_CLOSE, and VA_FIXEDARG for nicer variadic - function implementation. - -2001-08-16 Richard Henderson - - * hashtab.h (htab_hash_string): Declare. - -2001-08-10 Andrew Cagney - - * libiberty.h (lbasename): Change function declaration to return a - const char pointer. - -2001-08-02 Mark Kettenis - - * xregex.h (_REGEX_RE_COMP): Define. - (re_comp): Define to xre_comp. - (re_exec): Define to xre_exec. - -2001-07-18 Andreas Jaeger - - * xregex2.h: Place under LGPL version 2.1. - -2001-07-10 Jeff Johnston - - * xregex.h: New file to support libiberty regex. - * xregex2.h: Ditto. - -2001-05-16 Matt Kraai - - * partition.h: Fix misspelling of `implementation'. - -2001-05-10 Kaveh R. Ghazi - - * ansidecl.h (NULL_PTR): Delete. - -2001-05-07 Zack Weinberg - - * demangle.h: Use PARAMS for all prototypes. - * ternary.h: Use PARAMS for all prototypes. Use PTR, not void *. - Make arguments constant where possible. - -2001-05-07 Mark Mitchell - - * splay-tree.h (splay_tree_max): New function. - (splay_tree_min): Likewise. - -2001-04-15 Daniel Berlin - - * ternary.h: New file - Ternary search tree header. - -2001-04-03 Zack Weinberg - - * ansidecl.h: All logic from gcc/gansidecl.h moved here. - -2001-03-31 Kaveh R. Ghazi - - * libiberty.h (alloca): Handle setting C_ALLOCA. - -2001-03-20 Jim Blandy - - * demangle.h (enum gnu_v3_constructor_kinds, - is_gnu_v3_mangled_ctor, enum gnu_v3_destructor_kinds, - is_gnu_v3_mangled_dtor): New declarations. - -2001-03-14 Nick Clifton - - * ansidecl.h: Fix copyright dates. - * demangle.h: Fix copyright dates. - * floatformat.h: Fix copyright dates. - * fnmatch.h: Fix copyright dates. - * getopt.h: Fix copyright dates. - * libiberty.h: Add FSF copyright notice. - * md5.h: Fix copyright dates. - * obstack.h: Fix copyright dates. - * splay-tree.h: Fix copyright dates. - -2001-03-10 Neil Booth - John David Anglin - - * libiberty.h: Add lbasename. - -2001-03-06 Zack Weinberg - - * libiberty.h: Prototype C_alloca; define alloca to either - __builtin_alloca or C_alloca as appropriate. - -2001-03-01 John David Anglin - - * safe-ctype.h (_sch_test): Cast enum bit to unsigned short int for pcc - compatibility. - -2000-12-18 Joseph S. Myers - - * COPYING: Update to current - ftp://ftp.gnu.org/pub/gnu/Licenses/COPYING-2.0 (fixes references - to 19yy as example year in copyright notice). - -2000-12-16 Herman A.J. ten Brugge - - * safe-ctype.h: Make code work on all targets and not just on - targets where a char is 8 bits. - -2000-12-07 Zack Weinberg - - * safe-ctype.h: New file. - -2000-12-06 Rodney Brown - - * getopt.h obstack.h: Standarize copyright statement. - -2000-12-04 Richard Henderson - - * demangle.h: Change "new_abi" to "v3" everywhere. - -2000-11-22 Zack Weinberg - - * libiberty.h: Move #includes to top. Prototype xmalloc_failed. - -2000-11-15 Kenneth Block - - * demangle.h: Add gnat and java demangle styles. - -2000-11-04 Hans-Peter Nilsson - - * hashtab.h (struct htab): Add member return_allocation_failure. - (htab_try_create): New prototype. Mention which functions may - return NULL when this is used. - -2000-11-03 Hans-Peter Nilsson - - * hashtab.h: Change void * to PTR where necessary. - -2000-09-10 Mark Mitchell - - * splay-tree.h (splay_tree_predecessor): Declare. - -2000-09-05 John David Anglin - - * md5.h (md5_uint32): Choose via INT_MAX instead of UINT_MAX. - -2000-09-04 Alex Samuel - - * dyn-string.h: Adjust formatting. - (dyn_string_insert_char): New macro. New declaration. - -2000-08-28 Jason Merrill - - * md5.h: New file. - -2000-08-24 Greg McGary - - * libiberty.h (ARRAY_SIZE): New macro. - -2000-06-21 Alex Samuel - - * dyn-string.h (dyn_string_init, dyn_string_new, - dyn_string_delete, dyn_string_release, dyn_string_resize, - dyn_string_clear, dyn_string_copy, dyn_string_copy_cstr, - dyn_string_prepend, dyn_string_prepend_cstr, dyn_string_insert, - dyn_string_insert_cstr, dyn_string_append, dyn_string_append_cstr, - dyn_string_append_char, dyn_string_substring_dyn_string_eq): - Define as same name with __cxa_ prepended, if IN_LIBGCC2. - (dyn_string_init, dyn_string_copy, dyn_string_copy_cstr, - dyn_string_prepend, dyn_string_prepend_cstr, dyn_string_insert, - dyn_string_insert_cstr, dyn_string_append, dyn_string_append_cstr, - dyn_string_append_char, dyn_string_substring): Change return type - to int. - -2000-06-07 Kaveh R. Ghazi - - * demangle.h (demangling_styles): Remove trailing comma in enum. - - * dyn-string.h (dyn_string_append_char): Change parameter from - char to int. - -2000-06-04 Alex Samuel - - * dyn-string.h: Move here from gcc/dyn-string.h. Add new functions. - - * demangle.h (DMGL_GNU_NEW_ABI): New macro. - (DMGL_STYLE_MASK): Or in DMGL_GNU_NEW_ABI. - (current_demangling_style): Add gnu_new_abi_demangling. - (GNU_NEW_ABI_DEMANGLING_STYLE_STRING): New macro. - (GNU_NEW_ABI_DEMANGLING): Likewise. - (cplus_demangle_new_abi): New declaration. - -Tue May 30 16:53:34 2000 Andrew Cagney - - * floatformat.h (struct floatformat): Add field name. - -2000-05-23 Kaveh R. Ghazi - - * getopt.h (getopt): Also check HAVE_DECL_* when prototyping. - - * libiberty.h (basename): Likewise. - -2000-05-06 Zack Weinberg - - * ansidecl.h: #define __extension__ to nothing if - GCC_VERSION < 2008. - -2000-05-04 Kaveh R. Ghazi - - * demangle.h (demangler_engine): Constify. - -Thu May 4 17:15:26 2000 Philippe De Muyter - - * sort.h (sys/types.h): File included unconditionnaly. - (stddef.h): File include only #ifdef __STDC__. - -2000-05-03 Zack Weinberg - - * symcat.h: Remove #endif label. - -2000-04-28 Kenneth Block - Jason Merrill - - * demangle.h (libiberty_demanglers): new table for different styles. - (cplus_demangle_set_style): New function for setting style. - (cplus_demangle_name_to_style): New function to translate name. - -2000-04-24 Mark Mitchell - - * hashtab.h (hash_pointer): Declare. - (eq_pointer): Likewise. - -2000-04-23 Mark Mitchell - - * sort.h: New file. - -Tue Apr 18 16:22:30 2000 Richard Kenner - - * hashtab.h (enum insert_option): New type. - (htab_find_slot, htab_find_slot_with_hash): Use it. - -2000-04-17 Kaveh R. Ghazi - - * symcat.h: Honor autoconf macro HAVE_STRINGIZE. Add - comments/caveats with regard to traditional C behavior. - -2000-04-05 Richard Henderson - - * splay-tree.h (splay_tree_remove): Declare. - -2000-03-30 Mark Mitchell - - * hashtab.h (hashval_t): New type. - (htab_find_with_hash): Use it as an argument. - (htab_find_slot_with_hash): Likewise. - -2000-03-14 Bernd Schmidt - - * hashtab.h (htab_trav): Modify type so that first arg is of type - void **. - (htab_find_with_hash, htab_find_slot_with_hash): Declare new - functions. - -2000-03-09 Alex Samuel - - * partition.h: New file. - -2000-03-09 Zack Weinberg - - * hashtab.h (struct htab): Add del_f. - (htab_del): New type. - (htab_create): Add fourth argument. - -2000-03-08 Zack Weinberg - - * hashtab.h (hash_table_t): Rename to htab_t. - (struct hash_table): Rename to struct htab. Shorten element - names. Reorder elements by size. - (htab_hash, htab_eq, htab_trav): New typedefs for the callback - function pointers. - (hash_table_entry_t): Discard; just use void * for element - type. - -Sat Jan 1 19:06:52 2000 Hans-Peter Nilsson - - * symcat.h (STRINGX) [!__STDC__ || ALMOST_STDC]: Change "?" to "s" - to stringify argument s. - -1999-12-05 Mark Mitchell - - * splay-tree.h (struct splay_tree_node): Rename to ... - (struct splay_tree_node_s): ... this. - (struct splay_tree): Rename to ... - (struct splay_tree_s): ... this. - -1999-11-30 Kaveh R. Ghazi - - * ansidecl.h (ATTRIBUTE_MALLOC): New macro. - - * libiberty.h (buildargv, dupargv, concat, choose_temp_base, - make_temp_file, xmalloc, xcalloc, xstrdup, xmemdup): Add - ATTRIBUTE_MALLOC. - (xatexit): Remove __GNUC__ check, add ATTRIBUTE_NORETURN. - -1999-11-28 Kaveh R. Ghazi - - * libiberty.h: Include stdarg.h when ANSI_PROTOTYPES is defined. - (asprintf, vasprintf): Provide declarations. - -Wed Nov 10 12:43:21 1999 Philippe De Muyter - Kaveh R. Ghazi - - * ansidecl.h: Define and test `GCC_VERSION', not `HAVE_GCC_VERSION'. - -1999-10-23 08:51 -0700 Zack Weinberg - - * hashtab.h: Give hash_table_t a struct tag. Add prototypes - for clear_hash_table_slot and traverse_hash_table. Correct - prototype of all_hash_table_collisions. - -Fri Oct 15 01:47:51 1999 Vladimir Makarov - - * hashtab.h: New file. - -1999-10-10 Kaveh R. Ghazi - - * ansidecl.h (HAVE_GCC_VERSION): New macro. Use it instead of - explicitly testing __GNUC__ and __GNUC_MINOR__. - - (ATTRIBUTE_PRINTF): Use `__format__', not `format'. - -1999-09-25 Kaveh R. Ghazi - - * libiberty.h (make_temp_file): Add a prototype. - -Tue Sep 14 00:35:02 1999 Marc Espie - - * libiberty.h (basename): OpenBSD has a correct prototype. - (xrealloc): Remove outdated comment. - -1999-09-07 Jeff Garzik - - * libiberty.h (xmemdup): Add prototype for new function. - -1999-09-01 Kaveh R. Ghazi - - * obstack.h (obstack_grow, obstack_grow0): Move (char*) casts - in calls to `_obstack_memcpy' from here ... - - (_obstack_memcpy): ... to here, except in the __STDC__ case which - doesn't need it. - -1999-08-30 Kaveh R. Ghazi - - * libiberty.h (getpwd): Prototype. - -1999-08-01 Mark Mitchell - - * splay-tree.h (splay_tree_insert): Return the new node. - -1999-07-11 Ian Lance Taylor - - * ansidecl.h: Copy attribute support macros from egcs. - -1999-04-02 Mark Mitchell - - * splay-tree.h (splay_tree_compare_pointers): Declare. - -1999-03-30 Mark Mitchell - - * splay-tree.h (splay_tree_compare_ints): Declare. - -Wed Mar 24 12:46:29 1999 Andrew Cagney - - * libiberty.h (basename): Cygwin{,32} should have the prototype. - -Mon Dec 14 09:53:31 1998 Kaveh R. Ghazi - - * demangle.h: Don't check IN_GCC anymore. - * splay-tree.h: Likewise. - -Tue Dec 8 00:30:31 1998 Elena Zannoni - - * demangle.h: (DMGL_EDG): new macro for Kuck and Associates - (DMGL_STYLE_MASK): modify to include Kuck and Assoc style - (demangling_styles): add new edg_demangling style - (EDG_DEMANGLING_STYLE_STRING): new macro - (EDG_DEMANGLING): new macro - (DMGL_HP): new macro, for HP/aCC compiler. - (DMGL_STYLE_MASK): modify to include new HP's style. - (demangling_styles): add new hp_demangling value. - (HP_DEMANGLING_STYLE_STRING): new macro. - (ARM_DEMANGLING): coerce to int. - (HP_DEMANGLING): new macro. - -Fri Nov 20 13:14:00 1998 Andrew Cagney - - * libiberty.h (basename): Add prototype for FreeBSD. - -Fri Nov 13 19:19:11 1998 Kaveh R. Ghazi - - * libiberty.h: Prototype xcalloc. - -Sun Nov 8 17:42:25 1998 Kaveh R. Ghazi - - * ansidecl.h: Wrap problematic macros with !IN_GCC. - - * demangle.h: Never define PARAMS(). - * splay-tree.h: Likewise. - -Sat Nov 7 16:04:03 1998 Kaveh R. Ghazi - - * demangle.h: Don't include gansidecl.h. - * splay-tree.h: Likewise. - -Thu Oct 22 19:58:00 1998 Kaveh R. Ghazi - - * splay-tree.h: Wrap function pointer parameter declarations in - PARAMS() macro. - -1998-10-21 Mark Mitchell - - * splay-tree.h: New file. - -Fri Oct 9 00:02:03 1998 Jeffrey A Law (law@cygnus.com) - - * Merge devo and egcs include directories. - -Sat Sep 5 12:16:33 1998 Jeffrey A Law (law@cygnus.com) - - * getopt.h, obstack.h: Updated from gcc. - -1998-08-03 Jason Molenda (jsm@bugshack.cygnus.com) - - * libiberty.h (xexit): Change decl to use modern GCC attribute - to indicate exit does not return. - -Mon Jun 1 13:48:32 1998 Jason Molenda (crash@bugshack.cygnus.com) - - * obstack.h: Update to latest FSF version. - -Tue Feb 24 13:05:02 1998 Doug Evans - - * dis-asm.h (disassemble_info): Member `symbol' renamed to `symbols' - and made an "asymbol **". New member num_symbols. - (INIT_DISASSEMBLE_INFO_NO_ARCH): Update. - -Tue Feb 17 12:32:18 1998 Andrew Cagney - - * remote-sim.h (sim_fetch_register, sim_store_register): Add - register length parameter. Functions return actual length of - register. - -Thu Feb 12 16:29:01 1998 Ian Lance Taylor - - * getopt.h: Update to latest FSF version. - -Wed Feb 11 16:56:06 1998 Doug Evans - - * symcat.h: New file. - -Mon Feb 2 17:13:31 1998 Steve Haworth - - * dis-asm.h (print_insn_tic30): Declare. - -Thu Jan 22 16:23:59 1998 Fred Fish - - * dis-asm.h: Add flag INSN_HAS_RELOC to tell disassembly - function there is a reloc on this line. - -Mon Dec 8 11:22:23 1997 Nick Clifton - - * dis-asm.h: Remove prototype of disasm_symaddr() as this function - no longer exists. - -Tue Dec 2 10:20:53 1997 Nick Clifton - - * dis-asm.h (disasm_symaddr): New prototype. - -Mon Dec 1 20:24:18 1997 J"orn Rennecke - - * coff/sh.h (R_SH_SWITCH8): New. - -Mon Dec 1 11:29:35 1997 Doug Evans - - * callback.h (CB_SYSCALL): Comment out arg names in prototypes. - -Wed Nov 26 16:47:58 1997 Michael Meissner - - * callback.h (CB_SYSCALL): Consistantly use names for prototype - arguments. - -Wed Nov 26 11:39:30 1997 Doug Evans - - * callback.h (CB_SYSCALL): Change byte count arguments to - {read,write}_mem to `int'. New member `magic'. - (CB_SYSCALL_MAGIC,CB_SYSCALL_INIT): New macros. - -Tue Nov 25 01:35:52 1997 Doug Evans - - * callback.h (struct stat): Move forward decl up. - (host_callback): Pass stat struct pointer to stat,fstat. - (CB_SYS_nnn): Reorganize. - (CB_SYSCALL): New members p1,p2. - (cb_host_to_target_stat): Delete fourth arg. - -Sat Nov 22 23:34:15 1997 Andrew Cagney - - * remote-sim.h (sim_stop_reason): Clarify sim_signalled SIGRC - argument. - -Mon Nov 17 14:00:51 1997 Doug Evans - - * callback.h (CB_TARGET_DEFS_MAP): Renamed from target_defs_map. - (host_callback): Add stat, fstat, syscall_map, errno_map, open_map, - signal_map, stat_map. - (errn_map,open_map): Renamed to cb_init_foo_map. - (cb_host_to_target_errno,cb_target_to_host_open): Renamed from - host_to_target_errno,target_to_host_open. - (cb_read_target_syscall_maps): Add prototype. - (cb_target_to_host_syscall): Likewise. - (cb_host_to_target_stat): Likewise. - (cb_syscall): Likewise. - (CB_SYS_{exit,open,close,read,write,lseek,unlink,getpid,kill,fstat, - argvlen,argv,chdir,stat,chmod,utime,time}): Define. - (CB_SYSCALL): New type. - (CB_RC): New enum. - -Fri Nov 7 10:34:09 1997 Rob Savoye - - * libiberty.h: Add extern "C" { so it can be used with C++ - programs. - * remote-sim.h: Add extern "C" { so it can be used with C++ - programs. - -Tue Oct 14 16:07:51 1997 Nick Clifton - - * dis-asm.h (struct disassemble_info): New field - 'symbol_at_address_func'. - (INIT_DISASSEMBLE_INFO_NO_ARCH): Initialise new field with - generic_symbol_at_address. - -Mon Oct 13 10:17:15 1997 Andrew Cagney - - * remote-sim.h: Clarify sim_read, sim_write MEM argument. - -Wed Sep 24 18:03:10 1997 Stu Grossman - - * remote-sim.h (SIM_RC): Add a bunch of new return codes for - breakpoint stuff. - * Add functions to tell the simulator to set/clear/enable/disable - intrinsic breakpoints. - -Thu Aug 28 19:41:42 1997 Andrew Cagney - - * libiberty.h (dupargv): Add prototype. - -Tue Aug 26 12:25:49 1997 Andrew Cagney - - * remote-sim.h (sim_create_inferior): Add ABFD arg. Document. - -Mon Aug 25 10:50:51 1997 Andrew Cagney - - * remote-sim.h (sim_open): Add ABFD arg. Document. - -Fri Aug 8 16:43:56 1997 Doug Evans - - * dis-asm.h (arc_get_disassembler): Declare. - -Wed Jul 30 11:39:50 1997 Per Bothner - - * demangle.h (DMGL_JAVA): New option to request Java demangling. - -Tue Jul 22 17:59:54 1997 Ian Lance Taylor - - * libiberty.h (PEXECUTE_*): Define. - (pexecute, pwait): Declare. - -Fri Jun 6 13:02:33 1997 Andrew Cagney - - * remote-sim.h (sim_kill): Mark as depreciated. - -Fri May 23 13:43:41 1997 Fred Fish - - * bfdlink.h (struct bfd_link_info): Add task_link member. - -Thu May 22 11:32:49 1997 Andrew Cagney - - * remote-sim.h: Review documentation. Clarify restrictions on - when functions can be called. - -Wed May 21 16:47:53 1997 Andrew Cagney - - * remote-sim.h (sim_set_profile_size): Add prototype, document as - depreciated. - -Tue May 20 09:32:22 1997 Andrew Cagney - - * remote-sim.h (sim_open): Add callback struct. - (sim_set_callbacks): Drop SIM_DESC argument. Document. - (sim_size): Remove recently added SIM_DESC argument. Document. - -Mon May 19 19:14:44 1997 Andrew Cagney - - * remote-sim.h: Pass SD into sim_size. - -Thu May 15 01:24:16 1997 Mark Alexander - - * obstack.h (obstack_specify_allocation_with_arg, obstack_chunkfun, - obstack_freefun): Eliminate compile warnings in gdb. - -Tue May 13 10:21:14 1997 Nick Clifton - - * coff/arm.h (constants): Added new flag bits F_APCS_26 and - F_APCS_SET for the f_flags field of the filehdr structure. Added new - flags: F_APCS26, F_ARM_2, F_ARM_3, F_ARM_7, F_ARM_7T to store - information in the flags field of the internal_f structure used by BFD - routines. - -Tue Apr 22 10:24:34 1997 Fred Fish - - * floatformat.h (floatformat_byteorders): Add comments for previous - formats and add floatformat_littlebyte_bigword, primarily for ARM. - Add declaration for floatformat_ieee_double_littlebyte_bigword. - -Fri Apr 18 13:04:49 1997 Andrew Cagney - - * remote-sim.h (sim_stop): New interface - asynchronous - notification of a request to stop / suspend the running - simulation. - - * remote-sim.h (enum sim_stop): Add sim_running and sim_polling as - states for use internal to simulators. - - * callback.h (struct host_callback_strut): Put a magic number at - the end of the struct to allow basic checking. - (struct host_callback_struct ): Add poll_quit - so - that the console etc can be polled at regular intervals. - -Thu Apr 17 02:17:12 1997 Doug Evans - - * remote-sim.h (struct _bfd): Declare. - (sim_load): Return SIM_RC. New arg `abfd'. - (sim_create_inferior): Return SIM_RC. Delete arg `start_address'. - -Wed Apr 2 17:09:12 1997 Andrew Cagney - - * remote-sim.h (sim_trace, sim_size): Make these global. They - will go away shortly. - -Wed Apr 2 15:23:49 1997 Doug Evans - - * remote-sim.h (SIM_OPEN_KIND, SIM_RC): New enums. - (sim_open): New argument `kind'. - -Wed Apr 2 14:45:51 1997 Ian Lance Taylor - - * COPYING: Update FSF address. - -Fri Mar 28 15:29:54 1997 Mike Meissner - - * callback.h (top level): Include stdarg.h or varargs.h if - va_start is not defined. - (host_callback_struct): Make {,e}vprintf_filtered take a va_list - instead of void *, since va_list might be an array or structure - type. - -Fri Mar 28 15:44:41 1997 H.J. Lu - - * libiberty.h (basename): Add prototype for glibc and linux. - -Mon Mar 17 19:22:12 1997 Ian Lance Taylor - - * objalloc.h: New file. - -Mon Mar 17 14:57:55 1997 Andrew Cagney - - * remote-sim.h: New file, copied in from gdb/remote-sim.h. One - day this will be placed in a directory of its own. - -Sat Mar 15 19:00:14 1997 Ian Lance Taylor - - * obstack.h: Update to current FSF version. - -Thu Mar 6 15:46:59 1997 Andrew Cagney - - * callback.h (struct host_callback_struct): Add callbacks - - flush_stdout, write_stderr, flush_stderr, vprintf_filtered, - evprintf_filtered. Delete redundant callbacks - printf_filtered. - -Thu Feb 27 23:18:27 1997 Ian Lance Taylor - - * bfdlink.h (struct bfd_link_info): Remove lprefix and lprefix_len - fields. - -Tue Feb 25 00:10:49 1997 Ian Lance Taylor - - * dis-asm.h (INIT_DISASSEMBLE_INFO_NO_ARCH): Initialize - bytes_per_chunk and display_endian. - -Mon Feb 24 17:47:02 1997 Ian Lance Taylor - - From Eric Youngdale : - * bfdlink.h (struct bfd_elf_version_expr): Define. - (struct bfd_elf_version_deps): Define. - (struct bfd_elf_version_tree): Define. - -Thu Feb 6 14:20:01 1997 Martin M. Hunt - - * dis-asm.h: (disassemble_info): Add new fields - bytes_per_chunk and display_endian to control the - display of raw instructions. - -Sun Dec 8 17:11:12 1996 Doug Evans - - * callback.h (host_callback): New member `error'. - -Wed Nov 20 00:40:23 1996 Doug Evans - - * callback.h: New file, moved here from gdb. - -Mon Nov 18 16:34:00 1996 Dawn Perchik - - * libiberty.h: Checkin again; last checkin failed due to sticky tag. - -Wed Nov 13 08:22:00 1996 Dawn Perchik - - * libiberty.h: Revert last commit due to conflicts with hpux - system headers. - -Tue Nov 12 16:31:00 1996 Dawn Perchik - - * libiberty.h: Move prototypes from argv.c here. - -Thu Oct 31 14:56:18 1996 Doug Evans - - * ansidecl.h (VPARAMS,VA_START): Define. - -Fri Oct 25 12:08:04 1996 Ian Lance Taylor - - * dis-asm.h (disassemble_info): Add bytes_per_line field. - (INIT_DISASSEMBLE_INFO_NO_ARCH): Initialize bytes_per_line field. - -Thu Oct 24 17:10:01 1996 Ian Lance Taylor - - * dis-asm.h (disassemble_info): Add symbol field. - (INIT_DISASSEMBLE_INFO_NO_ARCH): Initialize symbol field. - -Thu Oct 17 11:17:40 1996 Doug Evans - - * dis-asm.h (print_insn_m32r): Declare. - -Mon Oct 14 23:56:52 1996 Ian Lance Taylor - - * libiberty.h: Declare parameter types for xmalloc and xrealloc. - -Thu Oct 3 13:45:27 1996 Ian Lance Taylor - - * fnmatch.h: New file. - -Thu Oct 3 10:33:14 1996 Jeffrey A Law (law@cygnus.com) - - * dis-asm.h (print_insn_mn10x00): Delete declaration. - (print_insn_mn10200, print_insn_mn10300): Declare. - -Wed Oct 2 21:24:43 1996 Jeffrey A Law (law@cygnus.com) - - * dis-asm.h (print_insn_mn10x00): Declare. - -Mon Sep 30 13:56:11 1996 Fred Fish - - * libiberty.h: Remove #ifndef PRIVATE_XMALLOC. - -Sat Aug 31 13:27:06 1996 Jeffrey A Law (law@cygnus.com) - - * dis-asm.h (print_insn_v850): Declare. - -Tue Aug 13 16:10:30 1996 Stu Grossman (grossman@critters.cygnus.com) - - * obstack.h: Change bcopy to memcpy. Works better on Posix - systems, which generally lack bcopy. - -Mon Aug 12 17:03:18 1996 Stu Grossman (grossman@critters.cygnus.com) - - * ansidecl.h: Change WIN32 to _WIN32. - -Fri Jul 26 13:58:18 1996 Ian Lance Taylor - - * dis-asm.h: Add flavour field. - (print_insn_alpha): Declare. - (print_insn_alpha_osf, print_insn_alpha_vms): Don't declare. - (INIT_DISASSEMBLE_INFO): Initialize flavour field. - -Tue Jul 23 17:37:58 1996 Fred Fish - - * libiberty.h (PRIVATE_XMALLOC): Enclose xmalloc/xrealloc - definitions inside #ifndef so that programs that want to - can define PRIVATE_XMALLOC and then define xmalloc and - xrealloc anyway they want. - (basename): Document in source that we can't declare the - parameter type because it is declared inconsistently across - different systems. - -Mon Jul 22 13:16:13 1996 Richard Henderson - - * dis-asm.h (print_insn_alpha): Don't declare. - (print_insn_alpha_osf, print_insn_alpha_vms): Declare. - -Wed Jul 17 14:45:12 1996 Martin M. Hunt - - * dis-asm.h: (print_insn_d10v): Declare. - -Mon Jul 15 16:55:38 1996 Stu Grossman (grossman@critters.cygnus.com) - - * dis-asm.h: Get rid of decls for print_insn_i8086, - print_insn_sparc64 and print_insn_sparclite. - * (INIT_DISASSEMBLE_INFO): Split into two pieces. One, - INIT_DISASSEMBLE_INFO_NO_ARCH inits everything except for endian, - mach, and arch. - -Fri Jul 12 10:19:27 1996 Stu Grossman (grossman@critters.cygnus.com) - - * dis-asm.h (print_insn_i8086): Declare. - -Wed Jul 3 16:02:39 1996 Stu Grossman (grossman@critters.cygnus.com) - - * dis-asm.h (print_insn_sparclite): Declare. - -Tue Jun 18 16:02:46 1996 Jeffrey A. Law - - * dis-asm.h (print_insn_h8300s): Declare. - -Tue Jun 18 15:11:33 1996 Klaus Kaempf - - * fopen-vms.h: New file. - -Tue Jun 4 18:58:16 1996 Ian Lance Taylor - - * bfdlink.h (struct bfd_link_info): Add notice_all field. - -Fri Apr 26 10:33:12 1996 Doug Evans - - * demangle.h (#ifdef IN_GCC): #include "gansidecl.h". - (PROTO,PTR,const): Delete. - -Mon Apr 22 17:27:42 1996 Ian Lance Taylor - - * bfdlink.h (struct bfd_link_info): Add traditional_format field. - -Mon Apr 15 15:16:56 1996 Doug Evans - - * libiberty.h (choose_temp_base): Add prototype. - -Tue Mar 12 17:29:46 1996 Ian Lance Taylor - - * bfdlink.h (bfd_wrapped_link_hash_lookup): Declare. - (struct bfd_link_info): Add wrap_hash field. - -Wed Feb 14 16:49:17 1996 Martin Anantharaman - - * ieee.h (ieee_record_enum_type): Define - ieee_external_reference_info_enum. - -Fri Feb 2 17:09:25 1996 Doug Evans - - * dis-asm.h (DISASM_RAW_INSN): Delete. - -Tue Jan 23 09:21:47 1996 Doug Evans - - * dis-asm.h (INIT_DISASSEMBLE_INFO): Set endian to BFD_ENDIAN_UNKNOWN. - New argument FPRINTF_FUNC. - -Mon Jan 22 16:37:59 1996 Doug Evans - - * dis-asm.h (disassemble_info): New members arch, mach, endian. - (INIT_DISASSEMBLE_INFO): Initialize them. - (DISASM_RAW_INSN{,FLAG}): Define. - -Thu Jan 18 11:32:38 1996 Ian Lance Taylor - - * demangle.h (cplus_demangle_opname): Change opname parameter to - const char *. - (cplus_mangle_opname): Change return type and opname parameter to - const char *. - -Fri Jan 5 00:01:22 1996 Ian Lance Taylor - - * ieee.h (enum ieee_record): Add ieee_asn_record_enum, - ieee_at_record_enum, ieee_ty_record_enum, ieee_atn_record_enum, - ieee_bb_record_enum, and ieee_be_record_enum. - -Wed Jan 3 13:12:09 1996 Fred Fish - - * obstack.h: Update copyright to 1996. - (_obstack_memory_used): Declare. - (obstack_memory_used): Define macro. - -Thu Dec 28 11:42:12 1995 Ian Lance Taylor - - * libiberty.h (xstrdup): Declare. - -Thu Dec 21 14:47:17 1995 Michael Meissner - - * wait.h: Protect all macros with #ifndef. - -Tue Oct 24 21:45:40 1995 Ian Lance Taylor - - * bfdlink.h (struct bfd_link_info): Add static_link field. - -Tue Sep 12 16:28:04 1995 Ian Lance Taylor - - * bfdlink.h (struct bfd_link_callbacks): Add symbol parameter to - warning callback. - -Fri Sep 1 13:11:51 1995 Ian Lance Taylor - - * bfdlink.h (struct bfd_link_callbacks): Change warning callback - to take BFD, section, and address arguments. - -Thu Aug 31 16:45:12 1995 steve chamberlain - - * bfdlink.h (struct bfd_link_info): Remove PE stuff. - -Tue Aug 22 03:18:23 1995 Ken Raeburn - - * libiberty.h: Declare xstrerror. From Pat Rankin. - -Mon Aug 21 18:11:36 1995 steve chamberlain - - * bfdlink.h (struct bfd_link_info): Remove PE stuff. - -Wed Aug 2 08:14:12 1995 Doug Evans - - * dis-asm.h (print_insn_sparc64): Declare. - -Mon Jul 10 13:26:49 1995 Eric Youngdale - - * bfdlink.h (struct bfd_link_info): Add new field symbolic. - -Sun Jul 2 17:48:40 1995 Ian Lance Taylor - - * bfdlink.h (struct bfd_link_info): Change type of base_file to - PTR. - -Thu Jun 29 00:02:45 1995 Steve Chamberlain - - * bfdlink.h (struct bfd_link_info): Added base_file member. - -Tue Jun 20 16:40:04 1995 Steve Chamberlain - - * ansidecl.h: win32s is ANSI enough. - -Thu May 18 04:25:50 1995 Ken Raeburn - - Wed May 10 14:28:16 1995 Richard Earnshaw (rearnsha@armltd.co.uk) - - * dis-asm.h (print_insn_arm): Delete declaration. - (print_insn_{little,big}_arm): New declarations. - - * floatformat.h (floatformat_arm_ext): Declare. - -Sat May 13 10:14:08 1995 Steve Chamberlain - - * coff/pe.h: New file. - * bfdlink.h (subsytem, stack_heap_parameters): New. - * coff/i386.h (NT_SECTION_ALIGNMENT, NT_FILE_ALIGNMENT, - NT_DEF_RESERVE, NT_DEF_COMMIT): New. - * coff/internal.h (internal_filehdr): New fields for PE. - (IMAGE_DATA_DIRECTORY): New. - (internal_aouthdr): New fields for PE. - -Thu May 4 14:36:42 1995 Jason Merrill - - * demangle.h: Don't include ansidecl.h if IN_GCC. - -Tue Feb 21 00:37:28 1995 Jeff Law (law@snake.cs.utah.edu) - - * hp-symtab.h: Don't use bitfield enumerations, the HP C compiler - does not handle them correctly. - -Thu Feb 9 14:20:27 1995 Ian Lance Taylor - - * libiberty.h (basename): Don't declare parameter type; some - systems have this in their header files. - -Wed Feb 8 17:35:38 1995 Ian Lance Taylor - - * bfdlink.h (struct bfd_link_hash_entry): Change format of common - symbol information, to remove restrictions on maximum size and - alignment power, by using a pointer to a structure instead. - -Mon Feb 6 14:55:32 1995 Ian Lance Taylor - - * bfdlink.h (enum bfd_link_hash_type): Rename bfd_link_hash_weak - to bfd_link_hash_undefweak. Add bfd_link_hash_defweak. - -Mon Jan 16 21:00:23 1995 Stan Shebs - - * dis-asm.h (GDB_INIT_DISASSEMBLE_INFO, etc): Remove all - GDB-specific definitions. - -Sun Jan 15 18:39:35 1995 Steve Chamberlain - - * dis-asm.h (print_insn_w65): Declare. - -Thu Jan 12 17:51:17 1995 Ken Raeburn - - * libiberty.h (hex_p): Fix sense of test. - -Wed Jan 11 22:36:40 1995 Ken Raeburn - - * libiberty.h (_hex_array_size, _hex_bad, _hex_value, hex_init, - hex_p, hex_value): New macros and declarations, for hex.c. - -Fri Jan 6 17:44:14 1995 Ian Lance Taylor - - * dis-asm.h: Make idempotent. - -Wed Dec 14 13:08:43 1994 Stan Shebs - - * progress.h: New file, empty definitions for progress macros. - -Fri Nov 25 00:14:05 1994 Jeff Law (law@snake.cs.utah.edu) - - * hp-symtab.h: New file describing the debug symbols emitted - by the HP C compilers. - -Fri Nov 11 15:48:37 1994 Ian Lance Taylor - - * bfdlink.h (struct bfd_link_hash_entry): Change u.c.size from 24 - to 26 bits, and change u.c.alignment_power from 8 to 6 bits. 6 - bit in the alignment power is enough for a 64 bit address space. - -Mon Oct 31 13:02:51 1994 Stan Shebs (shebs@andros.cygnus.com) - - * demangle.h (cplus_mangle_opname): Declare. - -Tue Oct 25 11:38:02 1994 Ian Lance Taylor - - * bfdlink.h (struct bfd_link_callbacks): Fix comments for - multiple_common field. - -Sun Sep 04 17:58:10 1994 Richard Earnshaw (rwe@pegasus.esprit.ec.org) - - * aout/aout64.h: Only define QMAGIC if it isn't already defined. - - * dis-asm.h: Add support for the ARM. - -Wed Aug 10 12:51:41 1994 Doug Evans (dje@canuck.cygnus.com) - - * libiberty.h (strsignal): Document its existence even if we - can't declare it. - -Tue Aug 2 14:40:03 1994 Jim Kingdon (kingdon@lioth.cygnus.com) - - * os9k.h: Remove u_int16, u_int32, and owner_id typedefs and - expand their uses. Those names conflict with Mach headers. - -Fri Jul 22 14:17:12 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) - - * bfdlink.h (struct bfd_link_hash_entry): Change u.c.size into a - bitfield. Add field u.c.alignment_power. - -Sun Jul 10 00:26:39 1994 Ian Dall (dall@hfrd.dsto.gov.au) - - * dis-asm.h: Add print_insn_ns32k declaration. - -Mon Jun 20 17:13:29 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) - - * bfdlink.h (bfd_link_hash_table): Make creator a const pointer. - -Sat Jun 18 16:09:32 1994 Stan Shebs (shebs@andros.cygnus.com) - - * demangle.h (cplus_demangle_opname): Declare. - -Thu Jun 16 15:19:03 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * bfdlink.h (struct bfd_link_info): Add new field shared. - -Mon Jun 6 14:39:44 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * bfdlink.h (struct bfd_link_hash_entry): Remove written field: - not needed for all backends. - -Thu Apr 28 19:06:50 1994 Ken Raeburn (raeburn@cujo.cygnus.com) - - * dis-asm.h (disassembler): Declare. - -Fri Apr 1 00:38:17 1994 Jim Wilson (wilson@mole.gnu.ai.mit.edu) - - * obstack.h: Delete use of IN_GCC to control whether - stddef.h or gstddef.h is included. - -Tue Mar 22 13:06:02 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * bfdlink.h (enum bfd_link_order_type): Add bfd_data_link_order. - (struct bfd_link_order): Add data field to union. - -Mon Mar 21 18:45:26 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * bfdlink.h (struct bfd_link_callbacks): Change bitsize argument - to add_to_set to reloc. Remove bitsize argument from constructor. - Comment that reloc_overflow, reloc_dangerous and unattached_reloc - must handle NULL pointers for reloc location. - (enum bfd_link_order_type): Add bfd_section_reloc_link_order and - bfd_symbol_reloc_link_order. - (struct bfd_link_order): Add reloc field to union. - (struct bfd_link_order_reloc): Define. - -Mon Mar 14 12:27:50 1994 Ian Lance Taylor (ian@cygnus.com) - - * ieee-float.h: Removed; no longer used. - -Tue Mar 1 18:10:49 1994 Kung Hsu (kung@mexican.cygnus.com) - - * os9k.h: os9000 target specific header file, the header of the - object file is used now. - -Sun Feb 27 21:52:26 1994 Jim Kingdon (kingdon@deneb.cygnus.com) - - * floatformat.h: New file, intended to replace ieee-float.h. - -Sun Feb 20 17:15:42 1994 Ian Lance Taylor (ian@lisa.cygnus.com) - - * ansidecl.h (ANSI_PROTOTYPES): Define if using ANSI prototypes. - -Wed Feb 16 01:07:12 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * libiberty.h: Don't declare strsignal, to avoid conflicts with - Solaris system header files. - -Sat Feb 12 22:11:32 1994 Jeffrey A. Law (law@snake.cs.utah.edu) - - * libiberty.h (xexit): Use __volatile__ to avoid losing if - compiling with gcc -traditional. - -Thu Feb 10 14:05:41 1994 Ian Lance Taylor (ian@cygnus.com) - - * libiberty.h: New file. Declares functions provided by - libiberty. - -Tue Feb 8 05:19:52 1994 David J. Mackenzie (djm@thepub.cygnus.com) - - Handle obstack_chunk_alloc returning NULL. This allows - obstacks to be used by libraries, without forcing them - to call exit or longjmp. - * obstack.h (struct obstack): Add alloc_failed flag. - _obstack_begin, _obstack_begin_1): Declare to return int, not void. - (obstack_finish): If alloc_failed, return NULL. - (obstack_base, obstack_next_free, objstack_object_size): - If alloc_failed, return 0. - (obstack_grow, obstack_grow0, obstack_1grow, obstack_ptr_grow, - obstack_int_grow, obstack_blank): If alloc_failed, do nothing that - could corrupt the obstack. - -Mon Jan 24 15:06:05 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * bfdlink.h (struct bfd_link_callbacks): Add name, reloc_name and - addend argments to reloc_overflow callback. - -Fri Jan 21 19:13:12 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * dis-asm.h (print_insn_big_powerpc, print_insn_little_powerpc, - print_insn_rs6000): Declare. - -Thu Jan 6 14:15:55 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * bfdlink.h (struct bfd_link_callbacks): Add bitsize argument to - add_to_set field. Add new callback named constructor. - -Thu Dec 30 10:44:06 1993 Ian Lance Taylor (ian@rtl.cygnus.com) - - * bfdlink.h: New file for new BFD linker backend routines. - -Mon Nov 29 10:43:57 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * dis-asm.h (enum dis_insn_tyupe): Remove non-ANSI trailing comma. - -Sat Oct 2 20:42:26 1993 Jim Kingdon (kingdon@lioth.cygnus.com) - - * dis-asm.h: Move comment to right place. - -Mon Aug 9 19:03:35 1993 David J. Mackenzie (djm@thepub.cygnus.com) - - * obstack.h (obstack_chunkfun, obstack_freefun): Add defns from - previous version. Are these Cygnus local changes? - -Fri Aug 6 17:05:47 1993 David J. Mackenzie (djm@thepub.cygnus.com) - - * getopt.h, obstack.h: Update to latest FSF version. - -Mon Aug 2 16:37:14 1993 Stu Grossman (grossman at cygnus.com) - - * coff/i386.h: Add Lynx magic number. - -Mon Aug 2 14:45:29 1993 John Gilmore (gnu@cygnus.com) - - * dis-asm.h: Move enum outside of struct defn to avoid warnings. - -Mon Aug 2 08:49:30 1993 Stu Grossman (grossman at cygnus.com) - - * wait.h (WEXITSTATUS, WSTOPSIG): Mask down to 8 bits. This is - for systems that store stuff into the high 16 bits of a wait - status. - -Fri Jul 30 18:38:02 1993 John Gilmore (gnu@cygnus.com) - - * dis-asm.h: Add new fields insn_info_valid, branch_delay_insns, - data_size, insn_type, target, target2. These are used to return - information from the instruction decoders back to the calling - program. Add comments, make more readable. - -Mon Jul 19 22:14:14 1993 Fred Fish (fnf@deneb.cygnus.com) - - * nlm: New directory containing NLM/NetWare includes. - -Thu Jul 15 12:10:04 1993 Ken Raeburn (raeburn@cambridge.cygnus.com) - - * dis-asm.h (struct disassemble_info): New field application_data. - -Thu Jul 15 12:41:15 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * dis-asm.h: Added declaration of print_insn_m88k. - -Thu Jul 8 09:05:26 1993 Doug Evans (dje@canuck.cygnus.com) - - * opcode/h8300.h: Lots of little fixes for the h8/300h. - -Fri Jul 2 10:31:59 1993 Ian Lance Taylor (ian@cygnus.com) - - * ansidecl.h: Use ANSI macros if __mips and _SYSTYPE_SVR4 are - defined, since RISC/OS cc handles ANSI declarations in SVR4 mode - but does not define __STDC__. - -Sun Jun 20 18:27:52 1993 Ken Raeburn (raeburn@poseidon.cygnus.com) - - * dis-asm.h: Don't need to include ansidecl.h any more. - -Fri Jun 18 03:22:10 1993 John Gilmore (gnu@cygnus.com) - - * oasys.h: Eliminate "int8_type", "int16_type", "int32_type", and - their variants. These changes are coordinated with corresponding - changes in ../bfd/oasys.c. - -Wed Jun 16 10:43:08 1993 Fred Fish (fnf@cygnus.com) - - * bfd.h: Note that it has been removed. - -Tue Jun 8 12:16:03 1993 Steve Chamberlain (sac@phydeaux.cygnus.com) - - Support for H8/300-H - * dis-asm.h (print_insn_h8300, print_insn_h8300h): Declare it. - * coff/h8300.h: New magic number. - * coff/internal.h: New relocations. - * opcode/h8300.h: Lots of new opcodes. - -Tue Jun 1 07:35:03 1993 Ken Raeburn (raeburn@kr-pc.cygnus.com) - - * ansidecl.h (const): Don't define it if it's already defined. - -Thu May 27 18:19:51 1993 Ken Raeburn (raeburn@cambridge.cygnus.com) - - * dis-asm.h (print_insn_hppa): Declare it. - - * bfd.h: Moved to bfd directory. Small stub here includes it - without requiring "-I../bfd". - -Thu Apr 29 12:06:13 1993 Ken Raeburn (raeburn@deneb.cygnus.com) - - * bfd.h: Updated with BSF_FUNCTION. - -Mon Apr 26 18:15:50 1993 Steve Chamberlain (sac@thepub.cygnus.com) - - * bfd.h, dis-asm.h: Updated with Hitachi SH. - -Fri Apr 23 18:41:38 1993 Steve Chamberlain (sac@thepub.cygnus.com) - - * bfd.h: Updated with alpha changes. - * dis-asm.h: Added alpha. - -Fri Apr 16 17:35:30 1993 Jim Kingdon (kingdon@cygnus.com) - - * bfd.h: Update for signed bfd_*get_*. - -Thu Apr 15 09:24:21 1993 Jim Kingdon (kingdon@cygnus.com) - - * bfd.h: Updated for file_truncated error. - -Thu Apr 8 10:53:47 1993 Ian Lance Taylor (ian@cygnus.com) - - * ansidecl.h: If no ANSI, define const to be empty. - -Thu Apr 1 09:00:10 1993 Jim Kingdon (kingdon@cygnus.com) - - * dis-asm.h: Declare a29k and i960 print_insn_*. - - * dis-asm.h: Add print_address_func and related stuff. - - * dis-asm.h (dis_asm_read_memory): Fix prototype. - -Wed Mar 31 17:40:16 1993 Jim Kingdon (kingdon@lioth.cygnus.com) - - * dis-asm.h: Add print_insn_sparc. - -Wed Mar 31 17:51:42 1993 Ian Lance Taylor (ian@cygnus.com) - - * bfd.h: Updated for BFD_RELOC_MIPS_GPREL and bfd_[gs]et_gp_size - prototypes. - -Wed Mar 31 16:35:12 1993 Stu Grossman (grossman@cygnus.com) - - * dis-asm.h: (disassemble_info): Fix typo in prototype of - dis_asm_memory_error(). - -Tue Mar 30 19:09:23 1993 Jim Kingdon (kingdon@lioth.cygnus.com) - - * dis-asm.h (disassembler_info): Add read_memory_func, - memory_error_func, buffer, and length. - ({GDB_,}INIT_DISASSEMBLE_INFO): Set them. - print_insn_*: Remove second argument. - -Tue Mar 30 14:48:55 1993 Steve Chamberlain (sac@thepub.cygnus.com) - - * bfd.h: Update for lma field of section. - -Tue Mar 30 12:22:55 1993 Jim Kingdon (kingdon@cygnus.com) - - * ansidecl.h: Use ANSI versions on AIX regardless of __STDC__. - -Fri Mar 19 14:49:49 1993 Steve Chamberlain (sac@thepub.cygnus.com) - - * dis-asm.h: Add h8500. - -Thu Mar 18 13:49:09 1993 Per Bothner (bothner@rtl.cygnus.com) - - * ieee-float.h: Moved from ../gdb. - * dis-asm.h: New file. Interface to dis-assembler. - -Thu Mar 11 10:52:57 1993 Fred Fish (fnf@cygnus.com) - - * demangle.h (DMGL_NO_OPTS): Add define (set to 0) to use - in place of bare 0, for readability reasons. - -Tue Mar 2 17:50:11 1993 Fred Fish (fnf@cygnus.com) - - * demangle.h: Replace all references to cfront with ARM. - -Tue Feb 23 12:21:14 1993 Ian Lance Taylor (ian@cygnus.com) - - * bfd.h: Update for new elements in JUMP_TABLE. - -Tue Feb 16 00:51:30 1993 John Gilmore (gnu@cygnus.com) - - * bfd.h: Update for BFD_VERSION 2.1. - -Tue Jan 26 11:49:20 1993 Ian Lance Taylor (ian@cygnus.com) - - * bfd.h: Update for SEC_IS_COMMON flag. - -Tue Jan 19 12:25:12 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * bfd.h: Update for bfd_asymbol_value bug fix. - -Fri Jan 8 16:37:18 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * bfd.h: Update to include ECOFF tdata and target_flavour. - -Sun Dec 27 17:52:30 1992 Fred Fish (fnf@cygnus.com) - - * bfd.h: Add declaration for bfd_get_size(). - -Tue Dec 22 22:42:46 1992 Fred Fish (fnf@cygnus.com) - - * demangle.h: Protect file from multiple inclusions with - #if !defined(DEMANGLE_H)...#define DEMANGLE_H...#endif. - -Mon Dec 21 21:25:50 1992 Stu Grossman (grossman at cygnus.com) - - * bfd.h: Update to get hppa_core_struct from bfd.c. - -Thu Dec 17 00:42:35 1992 John Gilmore (gnu@cygnus.com) - - * bfd.h: Update to get tekhex tdata name change from bfd. - -Mon Nov 9 23:55:42 1992 John Gilmore (gnu@cygnus.com) - - * ansidecl.h: Update comments to discourage use of EXFUN. - -Thu Nov 5 16:35:44 1992 Ian Lance Taylor (ian@cygnus.com) - - * bfd.h: Update to bring in SEC_SHARED_LIBRARY. - -Thu Nov 5 03:21:32 1992 John Gilmore (gnu@cygnus.com) - - * bfd.h: Update to match EXFUN, bfd_seclet_struct, and SDEF - cleanups in bfd. - -Wed Nov 4 07:28:05 1992 Ken Raeburn (raeburn@cygnus.com) - - * bout.h (N_CALLNAME, N_BALNAME): Define as char-type values, so - widening works consistently. - -Fri Oct 16 03:17:08 1992 John Gilmore (gnu@cygnus.com) - - * getopt.h: Update to Revised Standard FSF Version. - -Thu Oct 15 21:43:22 1992 K. Richard Pixley (rich@sendai.cygnus.com) - - * getopt.h (struct option): use the provided enum for has_arg. - - * demangle.h (AUTO_DEMANGLING, GNU_DEMANGLING, - LUCID_DEMANGLING): ultrix compilers require enums to be - enums and ints to be ints and casts where they meet. cast some - enums into ints. - -Thu Oct 15 04:35:51 1992 John Gilmore (gnu@cygnus.com) - - * bfd.h: Update after comment changes. - -Thu Oct 8 09:03:02 1992 Steve Chamberlain (sac@thepub.cygnus.com) - - * bfd.h (bfd_get_symbol_leading_char): new macro for getting in xvec - -Thu Sep 3 09:10:50 1992 Stu Grossman (grossman at cygnus.com) - - * bfd.h (struct reloc_howto_struct): size needs to be signed if - it's going to hold negative values. - -Sun Aug 30 17:50:27 1992 Per Bothner (bothner@rtl.cygnus.com) - - * demangle.h: New file, moved from ../gdb. Made independent - of gdb. Allow demangling style option to be passed as a - parameter to cplus_demangle(), but using the - current_demangling_style global as the default. - -Sat Aug 29 10:07:55 1992 Fred Fish (fnf@cygnus.com) - - * obstack.h: Merge comment change from current FSF version. - -Thu Aug 27 12:59:29 1992 Brendan Kehoe (brendan@cygnus.com) - - * bfd.h: add we32k - -Tue Aug 25 15:07:47 1992 Steve Chamberlain (sac@thepub.cygnus.com) - - * bfd.h: new after Z8000 stuff - -Mon Aug 17 09:01:23 1992 Ken Raeburn (raeburn@cygnus.com) - - * bfd.h: Regenerated after page/segment size changes. - -Sat Aug 1 13:46:31 1992 Fred Fish (fnf@cygnus.com) - - * obstack.h: Merge changes from current FSF version. - -Mon Jul 20 21:06:23 1992 Fred Fish (fnf@cygnus.com) - - * obstack.h (area_id, flags): Remove, replace with extra_arg, - use_extra_arg, and maybe_empty_object. - * obstack.h (OBSTACK_MAYBE_EMPTY_OBJECT, OBSTACK_MMALLOC_LIKE): - Remove, replaced by maybe_empty_object and use_extra_arg bitfields. - * obstack.h (obstack_full_begin, _obstack_begin): Remove area_id - and flags arguments. - * obstack.h (obstack_alloc_arg): New macro to set extra_arg. - -Thu Jul 16 08:12:44 1992 Steve Chamberlain (sac@thepub.cygnus.com) - - * bfd.h: new after adding BFD_IS_RELAXABLE - -Sat Jul 4 03:22:23 1992 John Gilmore (gnu at cygnus.com) - - * bfd.h: Regen after adding BSF_FILE. - -Mon Jun 29 14:18:36 1992 Fred Fish (fnf at sunfish) - - * obstack.h: Convert bcopy() use to memcpy(), which is more - portable, more standard, and can take advantage of gcc's builtin - functions for increased performance. - -Thu Jun 25 04:46:08 1992 John Gilmore (gnu at cygnus.com) - - * ansidecl.h (PARAMS): Incorporate this macro from gdb's defs.h. - It's a cleaner way to forward-declare function prototypes. - -Fri Jun 19 15:46:32 1992 Stu Grossman (grossman at cygnus.com) - - * bfd.h: HPPA merge. - -Tue Jun 16 21:30:56 1992 K. Richard Pixley (rich@cygnus.com) - - * getopt.h: gratuitous white space changes merged from other prep - releases. - -Thu Jun 11 01:10:55 1992 John Gilmore (gnu at cygnus.com) - - * bfd.h: Regen'd from bfd.c after removing elf_core_tdata_struct. - -Mon May 18 17:29:03 1992 K. Richard Pixley (rich@cygnus.com) - - * getopt.h: merged changes from make-3.62.11. - - * getopt.h: merged changes from grep-1.6 (alpha). - -Fri May 8 14:53:32 1992 K. Richard Pixley (rich@cygnus.com) - - * getopt.h: merged changes from bison-1.18. - -Sat Mar 14 17:25:20 1992 Fred Fish (fnf@cygnus.com) - - * obstack.h: Add "area_id" and "flags" members to obstack - structure. Add obstack_chunkfun() and obstack_freefun() to - set functions explicitly. Convert maybe_empty_object to - a bit in "flags". - -Thu Feb 27 22:01:02 1992 Per Bothner (bothner@cygnus.com) - - * wait.h (WIFSTOPPED): Add IBM rs6000-specific version. - -Fri Feb 21 20:49:20 1992 John Gilmore (gnu at cygnus.com) - - * obstack.h: Add obstack_full_begin. - * bfd.h, obstack.h: Protolint. - -Thu Jan 30 01:18:42 1992 John Gilmore (gnu at cygnus.com) - - * bfd.h: Remove comma from enum declaration. - -Mon Jan 27 22:01:13 1992 Steve Chamberlain (sac at cygnus.com) - - * bfd.h : new target entr, bfd_relax_section - -Wed Dec 18 17:19:44 1991 Stu Grossman (grossman at cygnus.com) - - * bfd.h, ieee.h, opcode/m68k.h, opcode/sparc.h: ANSIfy enums. - -Thu Dec 12 20:59:56 1991 John Gilmore (gnu at cygnus.com) - - * fopen-same.h, fopen-bin.h: New files for configuring - whether fopen distinguishes binary files or not. For use - by host-dependent config files. - -Sat Nov 30 20:46:43 1991 Steve Chamberlain (sac at rtl.cygnus.com) - - * bfd.h: change the documentation format. - - * created coff, elf and opcode and aout directories. Moved: - - aout64.h ==> aout/aout64.h - ar.h ==> aout/ar.h - a.out.encap.h ==> aout/encap.h - a.out.host.h ==> aout/host.h - a.out.hp.h ==> aout/hp.h - a.out.sun4.h ==> aout/sun4.h - ranlib.h ==> aout/ranlib.h - reloc.h ==> aout/reloc.h - stab.def ==> aout/stab.def - stab.gnu.h ==> aout/stab_gnu.h - - coff-a29k.h ==> coff/a29k.h - coff-h8300.h ==> coff/h8300.h - coff-i386.h ==> coff/i386.h - coff-i960.h ==> coff/i960.h - internalcoff.h ==> coff/internal.h - coff-m68k.h ==> coff/m68k.h - coff-m88k.h ==> coff/m88k.h - coff-mips.h ==> coff/mips.h - coff-rs6000.h ==> coff/rs6000.h - - elf-common.h ==> elf/common.h - dwarf.h ==> elf/dwarf.h - elf-external.h ==> elf/external.h - elf-internal.h ==> elf/internal.h - - a29k-opcode.h ==> opcode/a29k.h - arm-opcode.h ==> opcode/arm.h - h8300-opcode.h ==> opcode/h8300.h - i386-opcode.h ==> opcode/i386.h - i860-opcode.h ==> opcode/i860.h - i960-opcode.h ==> opcode/i960.h - m68k-opcode.h ==> opcode/m68k.h - m88k-opcode.h ==> opcode/m88k.h - mips-opcode.h ==> opcode/mips.h - np1-opcode.h ==> opcode/np1.h - ns32k-opcode.h ==> opcode/ns32k.h - pn-opcode.h ==> opcode/pn.h - pyr-opcode.h ==> opcode/pyr.h - sparc-opcode.h ==> opcode/sparc.h - tahoe-opcode.h ==> opcode/tahoe.h - vax-opcode.h ==> opcode/vax.h - - - -Wed Nov 27 10:38:31 1991 Steve Chamberlain (sac at rtl.cygnus.com) - - * internalcoff.h: (internal_scnhdr) took out #def dependency, now - s_nreloc and s_nlnno are always long. (internal_reloc): allways - has an offset field now. - -Fri Nov 22 08:12:58 1991 John Gilmore (gnu at cygnus.com) - - * coff-rs6000.h: Lint; use unsigned chars for external fields. - * internalcoff.h: Lint; cast storage classes to signed char. - -Thu Nov 21 21:01:05 1991 Per Bothner (bothner at cygnus.com) - - * stab.def: Remove the GNU extended type codes (e.g. N_SETT). - * aout64.h: The heuristic for distinguishing between - sunos-style and bsd-style ZMAGIC files (wrt. where the - text segment starts) is moved into (the default definition of) - the macro N_HEADER_IN_TEXT. This definition is only used - if no other definition is used - e.g. bfd/newsos3.c defines - N_HEADER_IN_TEXT(x) to be always 0 (as before). - -Thu Nov 21 11:53:03 1991 John Gilmore (gnu at cygnus.com) - - * aout64.h (N_TXTADDR, N_TXTOFF, N_TXTSIZE): New definitions - that should handle all uses. LOGICAL_ versions deleted. - Eliminate N_HEADER_IN_TEXT, using a_entry to determine which - kind of zmagic a.out file we are looking at. - * coff-rs6000.h: Typo. - -Tue Nov 19 18:43:37 1991 Per Bothner (bothner at cygnus.com) - - (Note: This is a revised entry, as was aout64.h.) - * aout64.h: Some cleanups of N_TXTADDR and N_TXTOFF: - Will now work for both old- and new-style ZMAGIC files, - depending on N_HEADER_IN_TEXT macro. - Add LOGICAL_TXTADDR, LOICAL_TXTOFF and LOGICAL_TXTSIZE - that don't count the exec header as part - of the text segment, to be consistent with bfd. - * a.out.sun4.h: Simplified/fixed for previous change. - -Mon Nov 18 00:02:06 1991 Fred Fish (fnf at cygnus.com) - - * dwarf.h: Update to DWARF draft 5 version from gcc2. - -Thu Nov 14 19:44:59 1991 Per Bothner (bothner at cygnus.com) - - * stab.def: Added defs for extended GNU symbol types, - such as N_SETT. These are normally ifdef'd out (because - of conflicts with a.out.gnu.h), but are used by bfb_stab_name(). - -Thu Nov 14 19:17:03 1991 Fred Fish (fnf at cygnus.com) - - * elf-common.h: Add defines to support ELF symbol table code. - -Mon Nov 11 19:01:06 1991 Fred Fish (fnf at cygnus.com) - - * elf-internal.h, elf-external.h, elf-common.h: Add support for - note sections, which are used in ELF core files to hold copies - of various /proc structures. - -Thu Nov 7 08:58:26 1991 Steve Chamberlain (sac at cygnus.com) - - * internalcoff.h: took out the M88 dependency in the lineno - struct. - * coff-m88k.h: defines GET_LINENO_LNNO and PUT_LINENO_LNNO to use - 32bit linno entries. - * a29k-opcode.h: fixed encoding of mtacc - -Sun Nov 3 11:54:22 1991 Per Bothner (bothner at cygnus.com) - - * bfd.h: Updated from ../bfd/bfd-in.h (q.v). - -Fri Nov 1 11:13:53 1991 John Gilmore (gnu at cygnus.com) - - * internalcoff.h: Add x_csect defines. - -Fri Oct 25 03:18:20 1991 John Gilmore (gnu at cygnus.com) - - * Rename COFF-related files in `coff-ARCH.h' form. - coff-a29k.h, coff-i386.h, coff-i960.h, coff-m68k.h, coff-m88k.h, - coff-mips.h, coff-rs6000.h to be exact. - -Thu Oct 24 22:11:11 1991 John Gilmore (gnu at cygnus.com) - - RS/6000 support, by Metin G. Ozisik, Mimi Phûông-Thåo Võ, and - John Gilmore. - - * a.out.gnu.h: Update slightly. - * bfd.h: Add new error code, fix doc, add bfd_arch_rs6000. - * internalcoff.h: Add more F_ codes for filehdr. Add - rs/6000-dependent fields to aouthdr. Add storage classes - to syments. Add 6000-specific auxent. Add r_size in reloc. - * rs6000coff.c: New file. - -Thu Oct 24 04:13:20 1991 Fred Fish (fnf at cygnus.com) - - * dwarf.h: New file for dwarf support. Copied from gcc2 - distribution. - -Wed Oct 16 13:31:45 1991 John Gilmore (gnu at cygnus.com) - - * aout64.h: Remove PAGE_SIZE defines; they are target-dependent. - Add N_FN_SEQ for N_FN symbol type used on Sequent machines. - * stab.def: Include N_FN_SEQ in table. - * bout.h: External formats of structures use unsigned chars. - -Fri Oct 11 12:40:43 1991 Steve Chamberlain (steve at cygnus.com) - - * bfd.h:upgrade from bfd.c - * internalcoff.h: add n_name, n_zeroes and n_offset macros - * amdcoff.h: Define OMAGIC and AOUTHDRSZ. - -Fri Oct 11 10:58:06 1991 Per Bothner (bothner at cygnus.com) - - * a.out.host.h: Change SEGMENT_SIZE to 0x1000 for Sony. - * bfd.h (align_power): Add (actually move) comment. - -Tue Oct 8 15:29:32 1991 Per Bothner (bothner at cygnus.com) - - * sys/h-rtbsd.h: Define MISSING_VFPRINT (for binutils/bucomm.c). - -Sun Oct 6 19:24:39 1991 John Gilmore (gnu at cygnus.com) - - * aout64.h: Move struct internal_exec to ../bfd/libaout.h so - it can be shared by all `a.out-family' code. Rename - EXTERNAL_LIST_SIZE to EXTERNAL_NLIST_SIZE. Use basic types - for nlist members, and make strx integral rather than pointer. - More commentary on n_type values. - * bout.h: Provide a struct external_exec rather than an - internal_exec. - * m68kcoff.h: Remove `tagentries' which snuck in from the i960 - COFF port. - -Fri Oct 4 01:25:59 1991 John Gilmore (gnu at cygnus.com) - - * h8300-opcode.h: Remove `_enum' from the typedef for an enum. - * bfd.h: Update to match bfd changes. - - * sys/h-i386mach.h, sysdep.h: Add 386 Mach host support. - -Tue Oct 1 04:58:42 1991 John Gilmore (gnu at cygnus.com) - - * bfd.h, elf-common.h, elf-external.h, elf-internal.h: - Add preliminary ELF support, sufficient for GDB, from Fred Fish. - * sysdep.h, sys/h-amix.h: Support Amiga SVR4. - - * sys/h-vaxult.h: Make it work. (David Taylor ) - * a.out.vax.h: Remove unused and confusing file. - -Mon Sep 30 12:52:35 1991 Per Bothner (bothner at cygnus.com) - - * sysdep.h: Define NEWSOS3_SYS, and use it. - -Fri Sep 20 13:38:21 1991 John Gilmore (gnu at cygnus.com) - - * a.out.gnu.h (N_FN): Its value *really is* 0x1F. - Fix it, and add comments warning about or-ing N_EXT with it - and/or N_WARNING. - * aout64.h (N_FN): Fix value, add comments about N_EXT. - * stab.def (table at end): Update to show all the type - values <0x20, including low order bits. Move N_FN to - its rightful place. - -Tue Sep 17 17:41:37 1991 Stu Grossman (grossman at cygnus.com) - - * sys/h-irix3.h: sgi/irix support. - -Tue Sep 17 07:52:59 1991 John Gilmore (gnu at cygint.cygnus.com) - - * stab.def (N_DEFD): Add GNU Modula-2 debug stab, from Andrew - Beers. - -Thu Sep 12 14:12:59 1991 John Gilmore (gnu at cygint.cygnus.com) - - * internalcoff.h (SYMNMLEN, FILNMLEN, DIMNUM): Define these - for internalcoff, separately from the various external coff's. - * amdcoff.h, bcs88kcoff.h, i386coff.h, intel-coff.h, m68kcoff.h, - m88k-bcs.h: Prefix SYMNMLEN, FILNMLEN, and DIMNUM with E_'s for - the external struct definitions. - * ecoff.h: Remove these #define's, kludge no longer needed. - - * sys/h-ultra3.h: Add new Ultracomputer host. - * sysdep.h: Add ULTRA3_SYM1_SYS and use it. - -Tue Sep 10 10:11:46 1991 John Gilmore (gnu at cygint.cygnus.com) - - * i386coff.h (LINESZ): Always 6, not based on sizeof(). - (Fix from Peter Schauer .) - -Wed Sep 4 08:58:37 1991 John Gilmore (gnu at cygint.cygnus.com) - - * a.out.gnu.h, aout64.h: Add N_WARNING. Change N_FN to 0x0E, - to match SunOS and BSD. Add N_COMM as 0x12 for SunOS shared lib - support. - * stab.def: Add N_COMM to table, fix overlap comment. - -Tue Sep 3 06:29:20 1991 John Gilmore (gnu at cygint.cygnus.com) - - Merge with latest FSF versions of these files. - - * stab.gnu.h: Add LAST_UNUSED_STAB_CODE. - * stab.def: Update to GPL2. Move N_WARNING out, since not a - debug symbol. Change comments, and reorder table to numeric - order. Update final table comment. - (N_DSLINE, N_BSLINE): Renumber from 0x66 and 0x68, to 0x46 and 0x48. - - * obstack.h: GPL2. Merge. - -Fri Aug 23 01:54:23 1991 John Gilmore (gnu at cygint.cygnus.com) - - * a.out.gnu.h, a.out.sun4.h: Make SEGMENT_SIZE able to depend - on the particular a.out being examined. - * a.out.sun4.h: Define segment sizes for Sun-3's and Sun-4's. - * FIXME: a.out.gnu.h is almost obsolete. - * FIXME: a.out.sun4.h should be renamed a.out.sun.h now. - -Wed Aug 21 20:32:13 1991 John Gilmore (gnu at cygint.cygnus.com) - - * Start a ChangeLog for the includes directory. - - * a.out.gnu.h (N_FN): Fix value -- was 15, should be 0x1E. - * stab.def: Update allocation table in comments at end, - to reflect reality as I know it. - - -Local Variables: -mode: change-log -left-margin: 8 -fill-column: 74 -version-control: never -End: diff --git a/contrib/gcc/include/ansidecl.h b/contrib/gcc/include/ansidecl.h deleted file mode 100644 index 9a7c577..0000000 --- a/contrib/gcc/include/ansidecl.h +++ /dev/null @@ -1,295 +0,0 @@ -/* ANSI and traditional C compatability macros - Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 - Free Software Foundation, Inc. - This file is part of the GNU C Library. - -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 of the License, 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. */ - -/* ANSI and traditional C compatibility macros - - ANSI C is assumed if __STDC__ is #defined. - - Macro ANSI C definition Traditional C definition - ----- ---- - ---------- ----------- - ---------- - ANSI_PROTOTYPES 1 not defined - PTR `void *' `char *' - PTRCONST `void *const' `char *' - LONG_DOUBLE `long double' `double' - const not defined `' - volatile not defined `' - signed not defined `' - VA_START(ap, var) va_start(ap, var) va_start(ap) - - Note that it is safe to write "void foo();" indicating a function - with no return value, in all K+R compilers we have been able to test. - - For declaring functions with prototypes, we also provide these: - - PARAMS ((prototype)) - -- for functions which take a fixed number of arguments. Use this - when declaring the function. When defining the function, write a - K+R style argument list. For example: - - char *strcpy PARAMS ((char *dest, char *source)); - ... - char * - strcpy (dest, source) - char *dest; - char *source; - { ... } - - - VPARAMS ((prototype, ...)) - -- for functions which take a variable number of arguments. Use - PARAMS to declare the function, VPARAMS to define it. For example: - - int printf PARAMS ((const char *format, ...)); - ... - int - printf VPARAMS ((const char *format, ...)) - { - ... - } - - For writing functions which take variable numbers of arguments, we - also provide the VA_OPEN, VA_CLOSE, and VA_FIXEDARG macros. These - hide the differences between K+R and C89 more - thoroughly than the simple VA_START() macro mentioned above. - - VA_OPEN and VA_CLOSE are used *instead of* va_start and va_end. - Immediately after VA_OPEN, put a sequence of VA_FIXEDARG calls - corresponding to the list of fixed arguments. Then use va_arg - normally to get the variable arguments, or pass your va_list object - around. You do not declare the va_list yourself; VA_OPEN does it - for you. - - Here is a complete example: - - int - printf VPARAMS ((const char *format, ...)) - { - int result; - - VA_OPEN (ap, format); - VA_FIXEDARG (ap, const char *, format); - - result = vfprintf (stdout, format, ap); - VA_CLOSE (ap); - - return result; - } - - - You can declare variables either before or after the VA_OPEN, - VA_FIXEDARG sequence. Also, VA_OPEN and VA_CLOSE are the beginning - and end of a block. They must appear at the same nesting level, - and any variables declared after VA_OPEN go out of scope at - VA_CLOSE. Unfortunately, with a K+R compiler, that includes the - argument list. You can have multiple instances of VA_OPEN/VA_CLOSE - pairs in a single function in case you need to traverse the - argument list more than once. - - For ease of writing code which uses GCC extensions but needs to be - portable to other compilers, we provide the GCC_VERSION macro that - simplifies testing __GNUC__ and __GNUC_MINOR__ together, and various - wrappers around __attribute__. Also, __extension__ will be #defined - to nothing if it doesn't work. See below. - - This header also defines a lot of obsolete macros: - CONST, VOLATILE, SIGNED, PROTO, EXFUN, DEFUN, DEFUN_VOID, - AND, DOTS, NOARGS. Don't use them. */ - -#ifndef _ANSIDECL_H -#define _ANSIDECL_H 1 - -/* Every source file includes this file, - so they will all get the switch for lint. */ -/* LINTLIBRARY */ - -/* Using MACRO(x,y) in cpp #if conditionals does not work with some - older preprocessors. Thus we can't define something like this: - -#define HAVE_GCC_VERSION(MAJOR, MINOR) \ - (__GNUC__ > (MAJOR) || (__GNUC__ == (MAJOR) && __GNUC_MINOR__ >= (MINOR))) - -and then test "#if HAVE_GCC_VERSION(2,7)". - -So instead we use the macro below and test it against specific values. */ - -/* This macro simplifies testing whether we are using gcc, and if it - is of a particular minimum version. (Both major & minor numbers are - significant.) This macro will evaluate to 0 if we are not using - gcc at all. */ -#ifndef GCC_VERSION -#define GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__) -#endif /* GCC_VERSION */ - -#if defined (__STDC__) || defined (_AIX) || (defined (__mips) && defined (_SYSTYPE_SVR4)) || defined(_WIN32) -/* All known AIX compilers implement these things (but don't always - define __STDC__). The RISC/OS MIPS compiler defines these things - in SVR4 mode, but does not define __STDC__. */ - -#define ANSI_PROTOTYPES 1 -#define PTR void * -#define PTRCONST void *const -#define LONG_DOUBLE long double - -#define PARAMS(ARGS) ARGS -#define VPARAMS(ARGS) ARGS -#define VA_START(VA_LIST, VAR) va_start(VA_LIST, VAR) - -/* variadic function helper macros */ -/* "struct Qdmy" swallows the semicolon after VA_OPEN/VA_FIXEDARG's - use without inhibiting further decls and without declaring an - actual variable. */ -#define VA_OPEN(AP, VAR) { va_list AP; va_start(AP, VAR); { struct Qdmy -#define VA_CLOSE(AP) } va_end(AP); } -#define VA_FIXEDARG(AP, T, N) struct Qdmy - -#undef const -#undef volatile -#undef signed - -/* inline requires special treatment; it's in C99, and GCC >=2.7 supports - it too, but it's not in C89. */ -#undef inline -#if __STDC_VERSION__ > 199901L -/* it's a keyword */ -#else -# if GCC_VERSION >= 2007 -# define inline __inline__ /* __inline__ prevents -pedantic warnings */ -# else -# define inline /* nothing */ -# endif -#endif - -/* These are obsolete. Do not use. */ -#ifndef IN_GCC -#define CONST const -#define VOLATILE volatile -#define SIGNED signed - -#define PROTO(type, name, arglist) type name arglist -#define EXFUN(name, proto) name proto -#define DEFUN(name, arglist, args) name(args) -#define DEFUN_VOID(name) name(void) -#define AND , -#define DOTS , ... -#define NOARGS void -#endif /* ! IN_GCC */ - -#else /* Not ANSI C. */ - -#undef ANSI_PROTOTYPES -#define PTR char * -#define PTRCONST PTR -#define LONG_DOUBLE double - -#define PARAMS(args) () -#define VPARAMS(args) (va_alist) va_dcl -#define VA_START(va_list, var) va_start(va_list) - -#define VA_OPEN(AP, VAR) { va_list AP; va_start(AP); { struct Qdmy -#define VA_CLOSE(AP) } va_end(AP); } -#define VA_FIXEDARG(AP, TYPE, NAME) TYPE NAME = va_arg(AP, TYPE) - -/* some systems define these in header files for non-ansi mode */ -#undef const -#undef volatile -#undef signed -#undef inline -#define const -#define volatile -#define signed -#define inline - -#ifndef IN_GCC -#define CONST -#define VOLATILE -#define SIGNED - -#define PROTO(type, name, arglist) type name () -#define EXFUN(name, proto) name() -#define DEFUN(name, arglist, args) name arglist args; -#define DEFUN_VOID(name) name() -#define AND ; -#define DOTS -#define NOARGS -#endif /* ! IN_GCC */ - -#endif /* ANSI C. */ - -/* Define macros for some gcc attributes. This permits us to use the - macros freely, and know that they will come into play for the - version of gcc in which they are supported. */ - -#if (GCC_VERSION < 2007) -# define __attribute__(x) -#endif - -/* Attribute __malloc__ on functions was valid as of gcc 2.96. */ -#ifndef ATTRIBUTE_MALLOC -# if (GCC_VERSION >= 2096) -# define ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) -# else -# define ATTRIBUTE_MALLOC -# endif /* GNUC >= 2.96 */ -#endif /* ATTRIBUTE_MALLOC */ - -/* Attributes on labels were valid as of gcc 2.93. */ -#ifndef ATTRIBUTE_UNUSED_LABEL -# if (GCC_VERSION >= 2093) -# define ATTRIBUTE_UNUSED_LABEL ATTRIBUTE_UNUSED -# else -# define ATTRIBUTE_UNUSED_LABEL -# endif /* GNUC >= 2.93 */ -#endif /* ATTRIBUTE_UNUSED_LABEL */ - -#ifndef ATTRIBUTE_UNUSED -#define ATTRIBUTE_UNUSED __attribute__ ((__unused__)) -#endif /* ATTRIBUTE_UNUSED */ - -#ifndef ATTRIBUTE_NORETURN -#define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__)) -#endif /* ATTRIBUTE_NORETURN */ - -#ifndef ATTRIBUTE_PRINTF -#define ATTRIBUTE_PRINTF(m, n) __attribute__ ((__format__ (__printf__, m, n))) -#define ATTRIBUTE_PRINTF_1 ATTRIBUTE_PRINTF(1, 2) -#define ATTRIBUTE_PRINTF_2 ATTRIBUTE_PRINTF(2, 3) -#define ATTRIBUTE_PRINTF_3 ATTRIBUTE_PRINTF(3, 4) -#define ATTRIBUTE_PRINTF_4 ATTRIBUTE_PRINTF(4, 5) -#define ATTRIBUTE_PRINTF_5 ATTRIBUTE_PRINTF(5, 6) -#endif /* ATTRIBUTE_PRINTF */ - -/* We use __extension__ in some places to suppress -pedantic warnings - about GCC extensions. This feature didn't work properly before - gcc 2.8. */ -#if GCC_VERSION < 2008 -#define __extension__ -#endif - -/* Bootstrap support: Adjust certain macros defined by Autoconf, - which are only valid for the stage1 compiler. If we detect - a modern version of GCC, we are probably in stage2 or beyond, - so unconditionally reset the values. Note that const, inline, - etc. have been dealt with above. */ -#if (GCC_VERSION >= 2007) -# ifndef HAVE_LONG_DOUBLE -# define HAVE_LONG_DOUBLE 1 -# endif -#endif /* GCC >= 2.7 */ - -#endif /* ansidecl.h */ diff --git a/contrib/gcc/include/demangle.h b/contrib/gcc/include/demangle.h deleted file mode 100644 index ad0569a..0000000 --- a/contrib/gcc/include/demangle.h +++ /dev/null @@ -1,163 +0,0 @@ -/* Defs for interface to demanglers. - Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 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 - 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. */ - - -#if !defined (DEMANGLE_H) -#define DEMANGLE_H - -#include - -/* Options passed to cplus_demangle (in 2nd parameter). */ - -#define DMGL_NO_OPTS 0 /* For readability... */ -#define DMGL_PARAMS (1 << 0) /* Include function args */ -#define DMGL_ANSI (1 << 1) /* Include const, volatile, etc */ -#define DMGL_JAVA (1 << 2) /* Demangle as Java rather than C++. */ -#define DMGL_VERBOSE (1 << 3) /* Include implementation details. */ -#define DMGL_TYPES (1 << 4) /* Also try to demangle type encodings. */ - -#define DMGL_AUTO (1 << 8) -#define DMGL_GNU (1 << 9) -#define DMGL_LUCID (1 << 10) -#define DMGL_ARM (1 << 11) -#define DMGL_HP (1 << 12) /* For the HP aCC compiler; - same as ARM except for - template arguments, etc. */ -#define DMGL_EDG (1 << 13) -#define DMGL_GNU_V3 (1 << 14) -#define DMGL_GNAT (1 << 15) - -/* If none of these are set, use 'current_demangling_style' as the default. */ -#define DMGL_STYLE_MASK (DMGL_AUTO|DMGL_GNU|DMGL_LUCID|DMGL_ARM|DMGL_HP|DMGL_EDG|DMGL_GNU_V3|DMGL_JAVA|DMGL_GNAT) - -/* Enumeration of possible demangling styles. - - Lucid and ARM styles are still kept logically distinct, even though - they now both behave identically. The resulting style is actual the - union of both. I.E. either style recognizes both "__pt__" and "__rf__" - for operator "->", even though the first is lucid style and the second - is ARM style. (FIXME?) */ - -extern enum demangling_styles -{ - no_demangling = -1, - unknown_demangling = 0, - auto_demangling = DMGL_AUTO, - gnu_demangling = DMGL_GNU, - lucid_demangling = DMGL_LUCID, - arm_demangling = DMGL_ARM, - hp_demangling = DMGL_HP, - edg_demangling = DMGL_EDG, - gnu_v3_demangling = DMGL_GNU_V3, - java_demangling = DMGL_JAVA, - gnat_demangling = DMGL_GNAT -} current_demangling_style; - -/* Define string names for the various demangling styles. */ - -#define NO_DEMANGLING_STYLE_STRING "none" -#define AUTO_DEMANGLING_STYLE_STRING "auto" -#define GNU_DEMANGLING_STYLE_STRING "gnu" -#define LUCID_DEMANGLING_STYLE_STRING "lucid" -#define ARM_DEMANGLING_STYLE_STRING "arm" -#define HP_DEMANGLING_STYLE_STRING "hp" -#define EDG_DEMANGLING_STYLE_STRING "edg" -#define GNU_V3_DEMANGLING_STYLE_STRING "gnu-v3" -#define JAVA_DEMANGLING_STYLE_STRING "java" -#define GNAT_DEMANGLING_STYLE_STRING "gnat" - -/* Some macros to test what demangling style is active. */ - -#define CURRENT_DEMANGLING_STYLE current_demangling_style -#define AUTO_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_AUTO) -#define GNU_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_GNU) -#define LUCID_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_LUCID) -#define ARM_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_ARM) -#define HP_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_HP) -#define EDG_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_EDG) -#define GNU_V3_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_GNU_V3) -#define JAVA_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_JAVA) -#define GNAT_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_GNAT) - -/* Provide information about the available demangle styles. This code is - pulled from gdb into libiberty because it is useful to binutils also. */ - -extern const struct demangler_engine -{ - const char *const demangling_style_name; - const enum demangling_styles demangling_style; - const char *const demangling_style_doc; -} libiberty_demanglers[]; - -extern char * -cplus_demangle PARAMS ((const char *mangled, int options)); - -extern int -cplus_demangle_opname PARAMS ((const char *opname, char *result, int options)); - -extern const char * -cplus_mangle_opname PARAMS ((const char *opname, int options)); - -/* Note: This sets global state. FIXME if you care about multi-threading. */ - -extern void -set_cplus_marker_for_demangling PARAMS ((int ch)); - -extern enum demangling_styles -cplus_demangle_set_style PARAMS ((enum demangling_styles style)); - -extern enum demangling_styles -cplus_demangle_name_to_style PARAMS ((const char *name)); - -/* V3 ABI demangling entry points, defined in cp-demangle.c. */ -extern char* -cplus_demangle_v3 PARAMS ((const char* mangled, int options)); - -extern char* -java_demangle_v3 PARAMS ((const char* mangled)); - - -enum gnu_v3_ctor_kinds { - gnu_v3_complete_object_ctor = 1, - gnu_v3_base_object_ctor, - gnu_v3_complete_object_allocating_ctor -}; - -/* Return non-zero iff NAME is the mangled form of a constructor name - in the G++ V3 ABI demangling style. Specifically, return an `enum - gnu_v3_ctor_kinds' value indicating what kind of constructor - it is. */ -extern enum gnu_v3_ctor_kinds - is_gnu_v3_mangled_ctor PARAMS ((const char *name)); - - -enum gnu_v3_dtor_kinds { - gnu_v3_deleting_dtor = 1, - gnu_v3_complete_object_dtor, - gnu_v3_base_object_dtor -}; - -/* Return non-zero iff NAME is the mangled form of a destructor name - in the G++ V3 ABI demangling style. Specifically, return an `enum - gnu_v3_dtor_kinds' value, indicating what kind of destructor - it is. */ -extern enum gnu_v3_dtor_kinds - is_gnu_v3_mangled_dtor PARAMS ((const char *name)); - -#endif /* DEMANGLE_H */ diff --git a/contrib/gcc/include/dyn-string.h b/contrib/gcc/include/dyn-string.h deleted file mode 100644 index 2a771c7..0000000 --- a/contrib/gcc/include/dyn-string.h +++ /dev/null @@ -1,92 +0,0 @@ -/* An abstract string datatype. - Copyright (C) 1998, 1999, 2000, 2002 Free Software Foundation, Inc. - Contributed by Mark Mitchell (mark@markmitchell.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. */ - - -typedef struct dyn_string -{ - int allocated; /* The amount of space allocated for the string. */ - int length; /* The actual length of the string. */ - char *s; /* The string itself, NUL-terminated. */ -}* dyn_string_t; - -/* The length STR, in bytes, not including the terminating NUL. */ -#define dyn_string_length(STR) \ - ((STR)->length) - -/* The NTBS in which the contents of STR are stored. */ -#define dyn_string_buf(STR) \ - ((STR)->s) - -/* Compare DS1 to DS2 with strcmp. */ -#define dyn_string_compare(DS1, DS2) \ - (strcmp ((DS1)->s, (DS2)->s)) - - -/* dyn_string functions are used in the demangling implementation - included in the G++ runtime library. To prevent collisions with - names in user programs, the functions that are used in the - demangler are given implementation-reserved names. */ - -#if defined(IN_LIBGCC2) || defined(IN_GLIBCPP_V3) - -#define dyn_string_init __cxa_dyn_string_init -#define dyn_string_new __cxa_dyn_string_new -#define dyn_string_delete __cxa_dyn_string_delete -#define dyn_string_release __cxa_dyn_string_release -#define dyn_string_resize __cxa_dyn_string_resize -#define dyn_string_clear __cxa_dyn_string_clear -#define dyn_string_copy __cxa_dyn_string_copy -#define dyn_string_copy_cstr __cxa_dyn_string_copy_cstr -#define dyn_string_prepend __cxa_dyn_string_prepend -#define dyn_string_prepend_cstr __cxa_dyn_string_prepend_cstr -#define dyn_string_insert __cxa_dyn_string_insert -#define dyn_string_insert_cstr __cxa_dyn_string_insert_cstr -#define dyn_string_insert_char __cxa_dyn_string_insert_char -#define dyn_string_append __cxa_dyn_string_append -#define dyn_string_append_cstr __cxa_dyn_string_append_cstr -#define dyn_string_append_char __cxa_dyn_string_append_char -#define dyn_string_substring __cxa_dyn_string_substring -#define dyn_string_eq __cxa_dyn_string_eq - -#endif /* IN_LIBGCC2 || IN_GLIBCPP_V3 */ - - -extern int dyn_string_init PARAMS ((struct dyn_string *, int)); -extern dyn_string_t dyn_string_new PARAMS ((int)); -extern void dyn_string_delete PARAMS ((dyn_string_t)); -extern char *dyn_string_release PARAMS ((dyn_string_t)); -extern dyn_string_t dyn_string_resize PARAMS ((dyn_string_t, int)); -extern void dyn_string_clear PARAMS ((dyn_string_t)); -extern int dyn_string_copy PARAMS ((dyn_string_t, dyn_string_t)); -extern int dyn_string_copy_cstr PARAMS ((dyn_string_t, const char *)); -extern int dyn_string_prepend PARAMS ((dyn_string_t, dyn_string_t)); -extern int dyn_string_prepend_cstr PARAMS ((dyn_string_t, const char *)); -extern int dyn_string_insert PARAMS ((dyn_string_t, int, - dyn_string_t)); -extern int dyn_string_insert_cstr PARAMS ((dyn_string_t, int, - const char *)); -extern int dyn_string_insert_char PARAMS ((dyn_string_t, int, int)); -extern int dyn_string_append PARAMS ((dyn_string_t, dyn_string_t)); -extern int dyn_string_append_cstr PARAMS ((dyn_string_t, const char *)); -extern int dyn_string_append_char PARAMS ((dyn_string_t, int)); -extern int dyn_string_substring PARAMS ((dyn_string_t, - dyn_string_t, int, int)); -extern int dyn_string_eq PARAMS ((dyn_string_t, dyn_string_t)); diff --git a/contrib/gcc/include/fibheap.h b/contrib/gcc/include/fibheap.h deleted file mode 100644 index d109e4a..0000000 --- a/contrib/gcc/include/fibheap.h +++ /dev/null @@ -1,81 +0,0 @@ -/* A Fibonacci heap datatype. - Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc. - Contributed by Daniel Berlin (dan@cgsoftware.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. */ - -/* Fibonacci heaps are somewhat complex, but, there's an article in - DDJ that explains them pretty well: - - http://www.ddj.com/articles/1997/9701/9701o/9701o.htm?topic=algoritms - - Introduction to algorithms by Corman and Rivest also goes over them. - - The original paper that introduced them is "Fibonacci heaps and their - uses in improved network optimization algorithms" by Tarjan and - Fredman (JACM 34(3), July 1987). - - Amortized and real worst case time for operations: - - ExtractMin: O(lg n) amortized. O(n) worst case. - DecreaseKey: O(1) amortized. O(lg n) worst case. - Insert: O(2) amortized. O(1) actual. - Union: O(1) amortized. O(1) actual. */ - -#ifndef _FIBHEAP_H_ -#define _FIBHEAP_H_ - -#include - -typedef long fibheapkey_t; - -typedef struct fibheap -{ - size_t nodes; - struct fibnode *min; - struct fibnode *root; -} *fibheap_t; - -typedef struct fibnode -{ - struct fibnode *parent; - struct fibnode *child; - struct fibnode *left; - struct fibnode *right; - fibheapkey_t key; - void *data; - unsigned int degree : 31; - unsigned int mark : 1; -} *fibnode_t; - -extern fibheap_t fibheap_new PARAMS ((void)); -extern fibnode_t fibheap_insert PARAMS ((fibheap_t, fibheapkey_t, void *)); -extern int fibheap_empty PARAMS ((fibheap_t)); -extern fibheapkey_t fibheap_min_key PARAMS ((fibheap_t)); -extern fibheapkey_t fibheap_replace_key PARAMS ((fibheap_t, fibnode_t, - fibheapkey_t)); -extern void *fibheap_replace_key_data PARAMS ((fibheap_t, fibnode_t, - fibheapkey_t, void *)); -extern void *fibheap_extract_min PARAMS ((fibheap_t)); -extern void *fibheap_min PARAMS ((fibheap_t)); -extern void *fibheap_replace_data PARAMS ((fibheap_t, fibnode_t, void *)); -extern void *fibheap_delete_node PARAMS ((fibheap_t, fibnode_t)); -extern void fibheap_delete PARAMS ((fibheap_t)); -extern fibheap_t fibheap_union PARAMS ((fibheap_t, fibheap_t)); - -#endif /* _FIBHEAP_H_ */ diff --git a/contrib/gcc/include/floatformat.h b/contrib/gcc/include/floatformat.h deleted file mode 100644 index 0cd09be..0000000 --- a/contrib/gcc/include/floatformat.h +++ /dev/null @@ -1,122 +0,0 @@ -/* IEEE floating point support declarations, for GDB, the GNU Debugger. - Copyright 1991, 1994, 1995, 1997, 2000 Free Software Foundation, Inc. - -This file is part of GDB. - -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 of the License, 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. */ - -#if !defined (FLOATFORMAT_H) -#define FLOATFORMAT_H 1 - -#include "ansidecl.h" - -/* A floatformat consists of a sign bit, an exponent and a mantissa. Once the - bytes are concatenated according to the byteorder flag, then each of those - fields is contiguous. We number the bits with 0 being the most significant - (i.e. BITS_BIG_ENDIAN type numbering), and specify which bits each field - contains with the *_start and *_len fields. */ - -/* What is the order of the bytes. */ - -enum floatformat_byteorders { - - /* Standard little endian byte order. - EX: 1.2345678e10 => 00 00 80 c5 e0 fe 06 42 */ - - floatformat_little, - - /* Standard big endian byte order. - EX: 1.2345678e10 => 42 06 fe e0 c5 80 00 00 */ - - floatformat_big, - - /* Little endian byte order but big endian word order. - EX: 1.2345678e10 => e0 fe 06 42 00 00 80 c5 */ - - floatformat_littlebyte_bigword - -}; - -enum floatformat_intbit { floatformat_intbit_yes, floatformat_intbit_no }; - -struct floatformat -{ - enum floatformat_byteorders byteorder; - unsigned int totalsize; /* Total size of number in bits */ - - /* Sign bit is always one bit long. 1 means negative, 0 means positive. */ - unsigned int sign_start; - - unsigned int exp_start; - unsigned int exp_len; - /* Amount added to "true" exponent. 0x3fff for many IEEE extendeds. */ - unsigned int exp_bias; - /* Exponent value which indicates NaN. This is the actual value stored in - the float, not adjusted by the exp_bias. This usually consists of all - one bits. */ - unsigned int exp_nan; - - unsigned int man_start; - unsigned int man_len; - - /* Is the integer bit explicit or implicit? */ - enum floatformat_intbit intbit; - - /* Internal name for debugging. */ - const char *name; -}; - -/* floatformats for IEEE single and double, big and little endian. */ - -extern const struct floatformat floatformat_ieee_single_big; -extern const struct floatformat floatformat_ieee_single_little; -extern const struct floatformat floatformat_ieee_double_big; -extern const struct floatformat floatformat_ieee_double_little; - -/* floatformat for ARM IEEE double, little endian bytes and big endian words */ - -extern const struct floatformat floatformat_ieee_double_littlebyte_bigword; - -/* floatformats for various extendeds. */ - -extern const struct floatformat floatformat_i387_ext; -extern const struct floatformat floatformat_m68881_ext; -extern const struct floatformat floatformat_i960_ext; -extern const struct floatformat floatformat_m88110_ext; -extern const struct floatformat floatformat_m88110_harris_ext; -extern const struct floatformat floatformat_arm_ext; /* deprecated. */ -extern const struct floatformat floatformat_arm_ext_big; -extern const struct floatformat floatformat_arm_ext_littlebyte_bigword; -/* IA-64 Floating Point register spilt into memory. */ -extern const struct floatformat floatformat_ia64_spill_big; -extern const struct floatformat floatformat_ia64_spill_little; -extern const struct floatformat floatformat_ia64_quad_big; -extern const struct floatformat floatformat_ia64_quad_little; - -/* Convert from FMT to a double. - FROM is the address of the extended float. - Store the double in *TO. */ - -extern void -floatformat_to_double PARAMS ((const struct floatformat *, char *, double *)); - -/* The converse: convert the double *FROM to FMT - and store where TO points. */ - -extern void -floatformat_from_double PARAMS ((const struct floatformat *, - double *, char *)); - -#endif /* defined (FLOATFORMAT_H) */ diff --git a/contrib/gcc/include/fnmatch.h b/contrib/gcc/include/fnmatch.h deleted file mode 100644 index 37d23ee..0000000 --- a/contrib/gcc/include/fnmatch.h +++ /dev/null @@ -1,70 +0,0 @@ -/* Copyright 1991, 1992, 1993, 1996 Free Software Foundation, Inc. - -NOTE: The canonical source of this file is maintained with the GNU C Library. -Bugs can be reported to bug-glibc@prep.ai.mit.edu. - -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. */ - -#ifndef _FNMATCH_H - -#define _FNMATCH_H 1 - -#ifdef __cplusplus -extern "C" { -#endif - -#if defined (__cplusplus) || (defined (__STDC__) && __STDC__) -#undef __P -#define __P(args) args -#else /* Not C++ or ANSI C. */ -#undef __P -#define __P(args) () -/* We can get away without defining `const' here only because in this file - it is used only inside the prototype for `fnmatch', which is elided in - non-ANSI C where `const' is problematical. */ -#endif /* C++ or ANSI C. */ - - -/* We #undef these before defining them because some losing systems - (HP-UX A.08.07 for example) define these in . */ -#undef FNM_PATHNAME -#undef FNM_NOESCAPE -#undef FNM_PERIOD - -/* Bits set in the FLAGS argument to `fnmatch'. */ -#define FNM_PATHNAME (1 << 0) /* No wildcard can ever match `/'. */ -#define FNM_NOESCAPE (1 << 1) /* Backslashes don't quote special chars. */ -#define FNM_PERIOD (1 << 2) /* Leading `.' is matched only explicitly. */ - -#if !defined (_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 2 || defined (_GNU_SOURCE) -#define FNM_FILE_NAME FNM_PATHNAME /* Preferred GNU name. */ -#define FNM_LEADING_DIR (1 << 3) /* Ignore `/...' after a match. */ -#define FNM_CASEFOLD (1 << 4) /* Compare without regard to case. */ -#endif - -/* Value returned by `fnmatch' if STRING does not match PATTERN. */ -#define FNM_NOMATCH 1 - -/* Match STRING against the filename pattern PATTERN, - returning zero if it matches, FNM_NOMATCH if not. */ -extern int fnmatch __P ((const char *__pattern, const char *__string, - int __flags)); - -#ifdef __cplusplus -} -#endif - -#endif /* fnmatch.h */ diff --git a/contrib/gcc/include/getopt.h b/contrib/gcc/include/getopt.h deleted file mode 100644 index 04346dd..0000000 --- a/contrib/gcc/include/getopt.h +++ /dev/null @@ -1,141 +0,0 @@ -/* Declarations for getopt. - Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1996, 1997, 1998, 2000 - Free Software Foundation, Inc. - - NOTE: The canonical source of this file is maintained with the GNU C Library. - Bugs can be reported to bug-glibc@gnu.org. - - 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. */ - -#ifndef _GETOPT_H -#define _GETOPT_H 1 - -#ifdef __cplusplus -extern "C" { -#endif - -/* For communication from `getopt' to the caller. - When `getopt' finds an option that takes an argument, - the argument value is returned here. - Also, when `ordering' is RETURN_IN_ORDER, - each non-option ARGV-element is returned here. */ - -extern char *optarg; - -/* Index in ARGV of the next element to be scanned. - This is used for communication to and from the caller - and for communication between successive calls to `getopt'. - - On entry to `getopt', zero means this is the first call; initialize. - - When `getopt' returns -1, this is the index of the first of the - non-option elements that the caller should itself scan. - - Otherwise, `optind' communicates from one call to the next - how much of ARGV has been scanned so far. */ - -extern int optind; - -/* Callers store zero here to inhibit the error message `getopt' prints - for unrecognized options. */ - -extern int opterr; - -/* Set to an option character which was unrecognized. */ - -extern int optopt; - -/* Describe the long-named options requested by the application. - The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector - of `struct option' terminated by an element containing a name which is - zero. - - The field `has_arg' is: - no_argument (or 0) if the option does not take an argument, - required_argument (or 1) if the option requires an argument, - optional_argument (or 2) if the option takes an optional argument. - - If the field `flag' is not NULL, it points to a variable that is set - to the value given in the field `val' when the option is found, but - left unchanged if the option is not found. - - To have a long-named option do something other than set an `int' to - a compiled-in constant, such as set a value from `optarg', set the - option's `flag' field to zero and its `val' field to a nonzero - value (the equivalent single-letter option character, if there is - one). For long options that have a zero `flag' field, `getopt' - returns the contents of the `val' field. */ - -struct option -{ -#if defined (__STDC__) && __STDC__ - const char *name; -#else - char *name; -#endif - /* has_arg can't be an enum because some compilers complain about - type mismatches in all the code that assumes it is an int. */ - int has_arg; - int *flag; - int val; -}; - -/* Names for the values of the `has_arg' field of `struct option'. */ - -#define no_argument 0 -#define required_argument 1 -#define optional_argument 2 - -#if defined (__STDC__) && __STDC__ -/* HAVE_DECL_* is a three-state macro: undefined, 0 or 1. If it is - undefined, we haven't run the autoconf check so provide the - declaration without arguments. If it is 0, we checked and failed - to find the declaration so provide a fully prototyped one. If it - is 1, we found it so don't provide any declaration at all. */ -#if defined (__GNU_LIBRARY__) || (defined (HAVE_DECL_GETOPT) && !HAVE_DECL_GETOPT) -/* Many other libraries have conflicting prototypes for getopt, with - differences in the consts, in stdlib.h. To avoid compilation - errors, only prototype getopt for the GNU C library. */ -extern int getopt (int argc, char *const *argv, const char *shortopts); -#else /* not __GNU_LIBRARY__ */ -# if !defined (HAVE_DECL_GETOPT) && !defined (__cplusplus) -extern int getopt (); -# endif -#endif /* __GNU_LIBRARY__ */ -extern int getopt_long (int argc, char *const *argv, const char *shortopts, - const struct option *longopts, int *longind); -extern int getopt_long_only (int argc, char *const *argv, - const char *shortopts, - const struct option *longopts, int *longind); - -/* Internal only. Users should not call this directly. */ -extern int _getopt_internal (int argc, char *const *argv, - const char *shortopts, - const struct option *longopts, int *longind, - int long_only); -#else /* not __STDC__ */ -extern int getopt (); -extern int getopt_long (); -extern int getopt_long_only (); - -extern int _getopt_internal (); -#endif /* __STDC__ */ - -#ifdef __cplusplus -} -#endif - -#endif /* getopt.h */ diff --git a/contrib/gcc/include/hashtab.h b/contrib/gcc/include/hashtab.h deleted file mode 100644 index 8871710..0000000 --- a/contrib/gcc/include/hashtab.h +++ /dev/null @@ -1,155 +0,0 @@ -/* An expandable hash tables datatype. - Copyright (C) 1999, 2000 Free Software Foundation, Inc. - Contributed by Vladimir Makarov (vmakarov@cygnus.com). - -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 of the License, 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. */ - -/* This package implements basic hash table functionality. It is possible - to search for an entry, create an entry and destroy an entry. - - Elements in the table are generic pointers. - - The size of the table is not fixed; if the occupancy of the table - grows too high the hash table will be expanded. - - The abstract data implementation is based on generalized Algorithm D - from Knuth's book "The art of computer programming". Hash table is - expanded by creation of new hash table and transferring elements from - the old table to the new table. */ - -#ifndef __HASHTAB_H__ -#define __HASHTAB_H__ - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -#include - -/* The type for a hash code. */ -typedef unsigned int hashval_t; - -/* Callback function pointer types. */ - -/* Calculate hash of a table entry. */ -typedef hashval_t (*htab_hash) PARAMS ((const void *)); - -/* Compare a table entry with a possible entry. The entry already in - the table always comes first, so the second element can be of a - different type (but in this case htab_find and htab_find_slot - cannot be used; instead the variants that accept a hash value - must be used). */ -typedef int (*htab_eq) PARAMS ((const void *, const void *)); - -/* Cleanup function called whenever a live element is removed from - the hash table. */ -typedef void (*htab_del) PARAMS ((void *)); - -/* Function called by htab_traverse for each live element. The first - arg is the slot of the element (which can be passed to htab_clear_slot - if desired), the second arg is the auxiliary pointer handed to - htab_traverse. Return 1 to continue scan, 0 to stop. */ -typedef int (*htab_trav) PARAMS ((void **, void *)); - -/* Hash tables are of the following type. The structure - (implementation) of this type is not needed for using the hash - tables. All work with hash table should be executed only through - functions mentioned below. */ - -struct htab -{ - /* Pointer to hash function. */ - htab_hash hash_f; - - /* Pointer to comparison function. */ - htab_eq eq_f; - - /* Pointer to cleanup function. */ - htab_del del_f; - - /* Table itself. */ - PTR *entries; - - /* Current size (in entries) of the hash table */ - size_t size; - - /* Current number of elements including also deleted elements */ - size_t n_elements; - - /* Current number of deleted elements in the table */ - size_t n_deleted; - - /* The following member is used for debugging. Its value is number - of all calls of `htab_find_slot' for the hash table. */ - unsigned int searches; - - /* The following member is used for debugging. Its value is number - of collisions fixed for time of work with the hash table. */ - unsigned int collisions; - - /* This is non-zero if we are allowed to return NULL for function calls - that allocate memory. */ - int return_allocation_failure; -}; - -typedef struct htab *htab_t; - -/* An enum saying whether we insert into the hash table or not. */ -enum insert_option {NO_INSERT, INSERT}; - -/* The prototypes of the package functions. */ - -extern htab_t htab_create PARAMS ((size_t, htab_hash, - htab_eq, htab_del)); - -/* This function is like htab_create, but may return NULL if memory - allocation fails, and also signals that htab_find_slot_with_hash and - htab_find_slot are allowed to return NULL when inserting. */ -extern htab_t htab_try_create PARAMS ((size_t, htab_hash, - htab_eq, htab_del)); -extern void htab_delete PARAMS ((htab_t)); -extern void htab_empty PARAMS ((htab_t)); - -extern PTR htab_find PARAMS ((htab_t, const void *)); -extern PTR *htab_find_slot PARAMS ((htab_t, const void *, - enum insert_option)); -extern PTR htab_find_with_hash PARAMS ((htab_t, const void *, - hashval_t)); -extern PTR *htab_find_slot_with_hash PARAMS ((htab_t, const void *, - hashval_t, - enum insert_option)); -extern void htab_clear_slot PARAMS ((htab_t, void **)); -extern void htab_remove_elt PARAMS ((htab_t, void *)); - -extern void htab_traverse PARAMS ((htab_t, htab_trav, void *)); - -extern size_t htab_size PARAMS ((htab_t)); -extern size_t htab_elements PARAMS ((htab_t)); -extern double htab_collisions PARAMS ((htab_t)); - -/* A hash function for pointers. */ -extern htab_hash htab_hash_pointer; - -/* An equality function for pointers. */ -extern htab_eq htab_eq_pointer; - -/* A hash function for null-terminated strings. */ -extern hashval_t htab_hash_string PARAMS ((const PTR)); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* __HASHTAB_H */ diff --git a/contrib/gcc/include/libiberty.h b/contrib/gcc/include/libiberty.h deleted file mode 100644 index 3e0ca09..0000000 --- a/contrib/gcc/include/libiberty.h +++ /dev/null @@ -1,317 +0,0 @@ -/* Function declarations for libiberty. - - Copyright 2001, 2002 Free Software Foundation, Inc. - - Note - certain prototypes declared in this header file are for - functions whoes implementation copyright does not belong to the - FSF. Those prototypes are present in this file for reference - purposes only and their presence in this file should not construed - as an indication of ownership by the FSF of the implementation of - those functions in any way or form whatsoever. - - 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. - - Written by Cygnus Support, 1994. - - The libiberty library provides a number of functions which are - missing on some operating systems. We do not declare those here, - to avoid conflicts with the system header files on operating - systems that do support those functions. In this file we only - declare those functions which are specific to libiberty. */ - -#ifndef LIBIBERTY_H -#define LIBIBERTY_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include "ansidecl.h" - -#ifdef ANSI_PROTOTYPES -/* Get a definition for size_t. */ -#include -/* Get a definition for va_list. */ -#include -#endif - -/* Build an argument vector from a string. Allocates memory using - malloc. Use freeargv to free the vector. */ - -extern char **buildargv PARAMS ((const char *)) ATTRIBUTE_MALLOC; - -/* Free a vector returned by buildargv. */ - -extern void freeargv PARAMS ((char **)); - -/* Duplicate an argument vector. Allocates memory using malloc. Use - freeargv to free the vector. */ - -extern char **dupargv PARAMS ((char **)) ATTRIBUTE_MALLOC; - - -/* Return the last component of a path name. Note that we can't use a - prototype here because the parameter is declared inconsistently - across different systems, sometimes as "char *" and sometimes as - "const char *" */ - -/* HAVE_DECL_* is a three-state macro: undefined, 0 or 1. If it is - undefined, we haven't run the autoconf check so provide the - declaration without arguments. If it is 0, we checked and failed - to find the declaration so provide a fully prototyped one. If it - is 1, we found it so don't provide any declaration at all. */ -#if defined (__GNU_LIBRARY__ ) || defined (__linux__) || defined (__FreeBSD__) || defined (__OpenBSD__) || defined (__CYGWIN__) || defined (__CYGWIN32__) || (defined (HAVE_DECL_BASENAME) && !HAVE_DECL_BASENAME) -extern char *basename PARAMS ((const char *)); -#else -# if !defined (HAVE_DECL_BASENAME) -extern char *basename (); -# endif -#endif - -/* A well-defined basename () that is always compiled in. */ - -extern const char *lbasename PARAMS ((const char *)); - -/* Concatenate an arbitrary number of strings. You must pass NULL as - the last argument of this function, to terminate the list of - strings. Allocates memory using xmalloc. */ - -extern char *concat PARAMS ((const char *, ...)) ATTRIBUTE_MALLOC; - -/* Concatenate an arbitrary number of strings. You must pass NULL as - the last argument of this function, to terminate the list of - strings. Allocates memory using xmalloc. The first argument is - not one of the strings to be concatenated, but if not NULL is a - pointer to be freed after the new string is created, similar to the - way xrealloc works. */ - -extern char *reconcat PARAMS ((char *, const char *, ...)) ATTRIBUTE_MALLOC; - -/* Determine the length of concatenating an arbitrary number of - strings. You must pass NULL as the last argument of this function, - to terminate the list of strings. */ - -extern unsigned long concat_length PARAMS ((const char *, ...)); - -/* Concatenate an arbitrary number of strings into a SUPPLIED area of - memory. You must pass NULL as the last argument of this function, - to terminate the list of strings. The supplied memory is assumed - to be large enough. */ - -extern char *concat_copy PARAMS ((char *, const char *, ...)); - -/* Concatenate an arbitrary number of strings into a GLOBAL area of - memory. You must pass NULL as the last argument of this function, - to terminate the list of strings. The supplied memory is assumed - to be large enough. */ - -extern char *concat_copy2 PARAMS ((const char *, ...)); - -/* This is the global area used by concat_copy2. */ - -extern char *libiberty_concat_ptr; - -/* Concatenate an arbitrary number of strings. You must pass NULL as - the last argument of this function, to terminate the list of - strings. Allocates memory using alloca. The arguments are - evaluated twice! */ -#define ACONCAT(ACONCAT_PARAMS) \ - (libiberty_concat_ptr = alloca (concat_length ACONCAT_PARAMS + 1), \ - concat_copy2 ACONCAT_PARAMS) - -/* Check whether two file descriptors refer to the same file. */ - -extern int fdmatch PARAMS ((int fd1, int fd2)); - -/* Get the working directory. The result is cached, so don't call - chdir() between calls to getpwd(). */ - -extern char * getpwd PARAMS ((void)); - -/* Get the amount of time the process has run, in microseconds. */ - -extern long get_run_time PARAMS ((void)); - -/* Choose a temporary directory to use for scratch files. */ - -extern char *choose_temp_base PARAMS ((void)) ATTRIBUTE_MALLOC; - -/* Return a temporary file name or NULL if unable to create one. */ - -extern char *make_temp_file PARAMS ((const char *)) ATTRIBUTE_MALLOC; - -/* Allocate memory filled with spaces. Allocates using malloc. */ - -extern const char *spaces PARAMS ((int count)); - -/* Return the maximum error number for which strerror will return a - string. */ - -extern int errno_max PARAMS ((void)); - -/* Return the name of an errno value (e.g., strerrno (EINVAL) returns - "EINVAL"). */ - -extern const char *strerrno PARAMS ((int)); - -/* Given the name of an errno value, return the value. */ - -extern int strtoerrno PARAMS ((const char *)); - -/* ANSI's strerror(), but more robust. */ - -extern char *xstrerror PARAMS ((int)); - -/* Return the maximum signal number for which strsignal will return a - string. */ - -extern int signo_max PARAMS ((void)); - -/* Return a signal message string for a signal number - (e.g., strsignal (SIGHUP) returns something like "Hangup"). */ -/* This is commented out as it can conflict with one in system headers. - We still document its existence though. */ - -/*extern const char *strsignal PARAMS ((int));*/ - -/* Return the name of a signal number (e.g., strsigno (SIGHUP) returns - "SIGHUP"). */ - -extern const char *strsigno PARAMS ((int)); - -/* Given the name of a signal, return its number. */ - -extern int strtosigno PARAMS ((const char *)); - -/* Register a function to be run by xexit. Returns 0 on success. */ - -extern int xatexit PARAMS ((void (*fn) (void))); - -/* Exit, calling all the functions registered with xatexit. */ - -extern void xexit PARAMS ((int status)) ATTRIBUTE_NORETURN; - -/* Set the program name used by xmalloc. */ - -extern void xmalloc_set_program_name PARAMS ((const char *)); - -/* Report an allocation failure. */ -extern void xmalloc_failed PARAMS ((size_t)) ATTRIBUTE_NORETURN; - -/* Allocate memory without fail. If malloc fails, this will print a - message to stderr (using the name set by xmalloc_set_program_name, - if any) and then call xexit. */ - -extern PTR xmalloc PARAMS ((size_t)) ATTRIBUTE_MALLOC; - -/* Reallocate memory without fail. This works like xmalloc. Note, - realloc type functions are not suitable for attribute malloc since - they may return the same address across multiple calls. */ - -extern PTR xrealloc PARAMS ((PTR, size_t)); - -/* Allocate memory without fail and set it to zero. This works like - xmalloc. */ - -extern PTR xcalloc PARAMS ((size_t, size_t)) ATTRIBUTE_MALLOC; - -/* Copy a string into a memory buffer without fail. */ - -extern char *xstrdup PARAMS ((const char *)) ATTRIBUTE_MALLOC; - -/* Copy an existing memory buffer to a new memory buffer without fail. */ - -extern PTR xmemdup PARAMS ((const PTR, size_t, size_t)) ATTRIBUTE_MALLOC; - -/* hex character manipulation routines */ - -#define _hex_array_size 256 -#define _hex_bad 99 -extern const char _hex_value[_hex_array_size]; -extern void hex_init PARAMS ((void)); -#define hex_p(c) (hex_value (c) != _hex_bad) -/* If you change this, note well: Some code relies on side effects in - the argument being performed exactly once. */ -#define hex_value(c) (_hex_value[(unsigned char) (c)]) - -/* Definitions used by the pexecute routine. */ - -#define PEXECUTE_FIRST 1 -#define PEXECUTE_LAST 2 -#define PEXECUTE_ONE (PEXECUTE_FIRST + PEXECUTE_LAST) -#define PEXECUTE_SEARCH 4 -#define PEXECUTE_VERBOSE 8 - -/* Execute a program. */ - -extern int pexecute PARAMS ((const char *, char * const *, const char *, - const char *, char **, char **, int)); - -/* Wait for pexecute to finish. */ - -extern int pwait PARAMS ((int, int *, int)); - -/* Like sprintf but provides a pointer to malloc'd storage, which must - be freed by the caller. */ - -extern int asprintf PARAMS ((char **, const char *, ...)) ATTRIBUTE_PRINTF_2; - -/* Like vsprintf but provides a pointer to malloc'd storage, which - must be freed by the caller. */ - -extern int vasprintf PARAMS ((char **, const char *, va_list)) - ATTRIBUTE_PRINTF(2,0); - -#define ARRAY_SIZE(a) (sizeof (a) / sizeof ((a)[0])) - -/* Drastically simplified alloca configurator. If we're using GCC, - we use __builtin_alloca; otherwise we use the C alloca. The C - alloca is always available. You can override GCC by defining - USE_C_ALLOCA yourself. The canonical autoconf macro C_ALLOCA is - also set/unset as it is often used to indicate whether code needs - to call alloca(0). */ -extern PTR C_alloca PARAMS ((size_t)) ATTRIBUTE_MALLOC; -#undef alloca -#if GCC_VERSION >= 2000 && !defined USE_C_ALLOCA -# define alloca(x) __builtin_alloca(x) -# undef C_ALLOCA -# define ASTRDUP(X) \ - (__extension__ ({ const char *const libiberty_optr = (X); \ - const unsigned long libiberty_len = strlen (libiberty_optr) + 1; \ - char *const libiberty_nptr = alloca (libiberty_len); \ - (char *) memcpy (libiberty_nptr, libiberty_optr, libiberty_len); })) -#else -# define alloca(x) C_alloca(x) -# undef USE_C_ALLOCA -# define USE_C_ALLOCA 1 -# undef C_ALLOCA -# define C_ALLOCA 1 -extern const char *libiberty_optr; -extern char *libiberty_nptr; -extern unsigned long libiberty_len; -# define ASTRDUP(X) \ - (libiberty_optr = (X), \ - libiberty_len = strlen (libiberty_optr) + 1, \ - libiberty_nptr = alloca (libiberty_len), \ - (char *) memcpy (libiberty_nptr, libiberty_optr, libiberty_len)) -#endif - -#ifdef __cplusplus -} -#endif - - -#endif /* ! defined (LIBIBERTY_H) */ diff --git a/contrib/gcc/include/md5.h b/contrib/gcc/include/md5.h deleted file mode 100644 index ad51f19..0000000 --- a/contrib/gcc/include/md5.h +++ /dev/null @@ -1,142 +0,0 @@ -/* md5.h - Declaration of functions and data types used for MD5 sum - computing library functions. - Copyright 1995, 1996, 2000 Free Software Foundation, Inc. - NOTE: The canonical source of this file is maintained with the GNU C - Library. Bugs can be reported to bug-glibc@prep.ai.mit.edu. - - 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. */ - -#ifndef _MD5_H -#define _MD5_H 1 - -#include - -#if defined HAVE_LIMITS_H || _LIBC -# include -#endif - -/* The following contortions are an attempt to use the C preprocessor - to determine an unsigned integral type that is 32 bits wide. An - alternative approach is to use autoconf's AC_CHECK_SIZEOF macro, but - doing that would require that the configure script compile and *run* - the resulting executable. Locally running cross-compiled executables - is usually not possible. */ - -#ifdef _LIBC -# include -typedef u_int32_t md5_uint32; -#else -# define INT_MAX_32_BITS 2147483647 - -/* If UINT_MAX isn't defined, assume it's a 32-bit type. - This should be valid for all systems GNU cares about because - that doesn't include 16-bit systems, and only modern systems - (that certainly have ) have 64+-bit integral types. */ - -# ifndef INT_MAX -# define INT_MAX INT_MAX_32_BITS -# endif - -# if INT_MAX == INT_MAX_32_BITS - typedef unsigned int md5_uint32; -# else -# if SHRT_MAX == INT_MAX_32_BITS - typedef unsigned short md5_uint32; -# else -# if LONG_MAX == INT_MAX_32_BITS - typedef unsigned long md5_uint32; -# else - /* The following line is intended to evoke an error. - Using #error is not portable enough. */ - "Cannot determine unsigned 32-bit data type." -# endif -# endif -# endif -#endif - -#undef __P -#if defined (__STDC__) && __STDC__ -#define __P(x) x -#else -#define __P(x) () -#endif - -/* Structure to save state of computation between the single steps. */ -struct md5_ctx -{ - md5_uint32 A; - md5_uint32 B; - md5_uint32 C; - md5_uint32 D; - - md5_uint32 total[2]; - md5_uint32 buflen; - char buffer[128]; -}; - -/* - * The following three functions are build up the low level used in - * the functions `md5_stream' and `md5_buffer'. - */ - -/* Initialize structure containing state of computation. - (RFC 1321, 3.3: Step 3) */ -extern void md5_init_ctx __P ((struct md5_ctx *ctx)); - -/* Starting with the result of former calls of this function (or the - initialization function update the context for the next LEN bytes - starting at BUFFER. - It is necessary that LEN is a multiple of 64!!! */ -extern void md5_process_block __P ((const void *buffer, size_t len, - struct md5_ctx *ctx)); - -/* Starting with the result of former calls of this function (or the - initialization function update the context for the next LEN bytes - starting at BUFFER. - It is NOT required that LEN is a multiple of 64. */ -extern void md5_process_bytes __P ((const void *buffer, size_t len, - struct md5_ctx *ctx)); - -/* Process the remaining bytes in the buffer and put result from CTX - in first 16 bytes following RESBUF. The result is always in little - endian byte order, so that a byte-wise output yields to the wanted - ASCII representation of the message digest. - - IMPORTANT: On some systems it is required that RESBUF is correctly - aligned for a 32 bits value. */ -extern void *md5_finish_ctx __P ((struct md5_ctx *ctx, void *resbuf)); - - -/* Put result from CTX in first 16 bytes following RESBUF. The result is - always in little endian byte order, so that a byte-wise output yields - to the wanted ASCII representation of the message digest. - - IMPORTANT: On some systems it is required that RESBUF is correctly - aligned for a 32 bits value. */ -extern void *md5_read_ctx __P ((const struct md5_ctx *ctx, void *resbuf)); - - -/* Compute MD5 message digest for bytes read from STREAM. The - resulting message digest number will be written into the 16 bytes - beginning at RESBLOCK. */ -extern int md5_stream __P ((FILE *stream, void *resblock)); - -/* Compute MD5 message digest for LEN bytes beginning at BUFFER. The - result is always in little endian byte order, so that a byte-wise - output yields to the wanted ASCII representation of the message - digest. */ -extern void *md5_buffer __P ((const char *buffer, size_t len, void *resblock)); - -#endif diff --git a/contrib/gcc/include/objalloc.h b/contrib/gcc/include/objalloc.h deleted file mode 100644 index c710647..0000000 --- a/contrib/gcc/include/objalloc.h +++ /dev/null @@ -1,115 +0,0 @@ -/* objalloc.h -- routines to allocate memory for objects - Copyright 1997, 2001 Free Software Foundation, Inc. - Written by Ian Lance Taylor, Cygnus Solutions. - -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. */ - -#ifndef OBJALLOC_H -#define OBJALLOC_H - -#include "ansidecl.h" - -/* These routines allocate space for an object. The assumption is - that the object will want to allocate space as it goes along, but - will never want to free any particular block. There is a function - to free a block, which also frees all more recently allocated - blocks. There is also a function to free all the allocated space. - - This is essentially a specialization of obstacks. The main - difference is that a block may not be allocated a bit at a time. - Another difference is that these routines are always built on top - of malloc, and always pass an malloc failure back to the caller, - unlike more recent versions of obstacks. */ - -/* This is what an objalloc structure looks like. Callers should not - refer to these fields, nor should they allocate these structure - themselves. Instead, they should only create them via - objalloc_init, and only access them via the functions and macros - listed below. The structure is only defined here so that we can - access it via macros. */ - -struct objalloc -{ - char *current_ptr; - unsigned int current_space; - PTR chunks; -}; - -/* Work out the required alignment. */ - -struct objalloc_align { char x; double d; }; - -#if defined (__STDC__) && __STDC__ -#ifndef offsetof -#include -#endif -#endif -#ifndef offsetof -#define offsetof(TYPE, MEMBER) ((unsigned long) &((TYPE *)0)->MEMBER) -#endif -#define OBJALLOC_ALIGN offsetof (struct objalloc_align, d) - -/* Create an objalloc structure. Returns NULL if malloc fails. */ - -extern struct objalloc *objalloc_create PARAMS ((void)); - -/* Allocate space from an objalloc structure. Returns NULL if malloc - fails. */ - -extern PTR _objalloc_alloc PARAMS ((struct objalloc *, unsigned long)); - -/* The macro version of objalloc_alloc. We only define this if using - gcc, because otherwise we would have to evaluate the arguments - multiple times, or use a temporary field as obstack.h does. */ - -#if defined (__GNUC__) && defined (__STDC__) && __STDC__ - -/* NextStep 2.0 cc is really gcc 1.93 but it defines __GNUC__ = 2 and - does not implement __extension__. But that compiler doesn't define - __GNUC_MINOR__. */ -#if __GNUC__ < 2 || (__NeXT__ && !__GNUC_MINOR__) -#define __extension__ -#endif - -#define objalloc_alloc(o, l) \ - __extension__ \ - ({ struct objalloc *__o = (o); \ - unsigned long __len = (l); \ - if (__len == 0) \ - __len = 1; \ - __len = (__len + OBJALLOC_ALIGN - 1) &~ (OBJALLOC_ALIGN - 1); \ - (__len <= __o->current_space \ - ? (__o->current_ptr += __len, \ - __o->current_space -= __len, \ - (PTR) (__o->current_ptr - __len)) \ - : _objalloc_alloc (__o, __len)); }) - -#else /* ! __GNUC__ */ - -#define objalloc_alloc(o, l) _objalloc_alloc ((o), (l)) - -#endif /* ! __GNUC__ */ - -/* Free an entire objalloc structure. */ - -extern void objalloc_free PARAMS ((struct objalloc *)); - -/* Free a block allocated by objalloc_alloc. This also frees all more - recently allocated blocks. */ - -extern void objalloc_free_block PARAMS ((struct objalloc *, PTR)); - -#endif /* OBJALLOC_H */ diff --git a/contrib/gcc/include/obstack.h b/contrib/gcc/include/obstack.h deleted file mode 100644 index d86d9f2..0000000 --- a/contrib/gcc/include/obstack.h +++ /dev/null @@ -1,599 +0,0 @@ -/* obstack.h - object stack macros - Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1996, 1997, 1998, - 1999, 2000 - Free Software Foundation, Inc. - - - NOTE: The canonical source of this file is maintained with the GNU C Library. - Bugs can be reported to bug-glibc@gnu.org. - - 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. */ - -/* Summary: - -All the apparent functions defined here are macros. The idea -is that you would use these pre-tested macros to solve a -very specific set of problems, and they would run fast. -Caution: no side-effects in arguments please!! They may be -evaluated MANY times!! - -These macros operate a stack of objects. Each object starts life -small, and may grow to maturity. (Consider building a word syllable -by syllable.) An object can move while it is growing. Once it has -been "finished" it never changes address again. So the "top of the -stack" is typically an immature growing object, while the rest of the -stack is of mature, fixed size and fixed address objects. - -These routines grab large chunks of memory, using a function you -supply, called `obstack_chunk_alloc'. On occasion, they free chunks, -by calling `obstack_chunk_free'. You must define them and declare -them before using any obstack macros. - -Each independent stack is represented by a `struct obstack'. -Each of the obstack macros expects a pointer to such a structure -as the first argument. - -One motivation for this package is the problem of growing char strings -in symbol tables. Unless you are "fascist pig with a read-only mind" ---Gosper's immortal quote from HAKMEM item 154, out of context--you -would not like to put any arbitrary upper limit on the length of your -symbols. - -In practice this often means you will build many short symbols and a -few long symbols. At the time you are reading a symbol you don't know -how long it is. One traditional method is to read a symbol into a -buffer, realloc()ating the buffer every time you try to read a symbol -that is longer than the buffer. This is beaut, but you still will -want to copy the symbol from the buffer to a more permanent -symbol-table entry say about half the time. - -With obstacks, you can work differently. Use one obstack for all symbol -names. As you read a symbol, grow the name in the obstack gradually. -When the name is complete, finalize it. Then, if the symbol exists already, -free the newly read name. - -The way we do this is to take a large chunk, allocating memory from -low addresses. When you want to build a symbol in the chunk you just -add chars above the current "high water mark" in the chunk. When you -have finished adding chars, because you got to the end of the symbol, -you know how long the chars are, and you can create a new object. -Mostly the chars will not burst over the highest address of the chunk, -because you would typically expect a chunk to be (say) 100 times as -long as an average object. - -In case that isn't clear, when we have enough chars to make up -the object, THEY ARE ALREADY CONTIGUOUS IN THE CHUNK (guaranteed) -so we just point to it where it lies. No moving of chars is -needed and this is the second win: potentially long strings need -never be explicitly shuffled. Once an object is formed, it does not -change its address during its lifetime. - -When the chars burst over a chunk boundary, we allocate a larger -chunk, and then copy the partly formed object from the end of the old -chunk to the beginning of the new larger chunk. We then carry on -accreting characters to the end of the object as we normally would. - -A special macro is provided to add a single char at a time to a -growing object. This allows the use of register variables, which -break the ordinary 'growth' macro. - -Summary: - We allocate large chunks. - We carve out one object at a time from the current chunk. - Once carved, an object never moves. - We are free to append data of any size to the currently - growing object. - Exactly one object is growing in an obstack at any one time. - You can run one obstack per control block. - You may have as many control blocks as you dare. - Because of the way we do it, you can `unwind' an obstack - back to a previous state. (You may remove objects much - as you would with a stack.) -*/ - - -/* Don't do the contents of this file more than once. */ - -#ifndef _OBSTACK_H -#define _OBSTACK_H 1 - -#ifdef __cplusplus -extern "C" { -#endif - -/* We use subtraction of (char *) 0 instead of casting to int - because on word-addressable machines a simple cast to int - may ignore the byte-within-word field of the pointer. */ - -#ifndef __PTR_TO_INT -# define __PTR_TO_INT(P) ((P) - (char *) 0) -#endif - -#ifndef __INT_TO_PTR -# define __INT_TO_PTR(P) ((P) + (char *) 0) -#endif - -/* We need the type of the resulting object. If __PTRDIFF_TYPE__ is - defined, as with GNU C, use that; that way we don't pollute the - namespace with 's symbols. Otherwise, if is - available, include it and use ptrdiff_t. In traditional C, long is - the best that we can do. */ - -#ifdef __PTRDIFF_TYPE__ -# define PTR_INT_TYPE __PTRDIFF_TYPE__ -#else -# ifdef HAVE_STDDEF_H -# include -# define PTR_INT_TYPE ptrdiff_t -# else -# define PTR_INT_TYPE long -# endif -#endif - -#if defined _LIBC || defined HAVE_STRING_H -# include -# if defined __STDC__ && __STDC__ -# define _obstack_memcpy(To, From, N) memcpy ((To), (From), (N)) -# else -# define _obstack_memcpy(To, From, N) memcpy ((To), (char *)(From), (N)) -# endif -#else -# ifdef memcpy -# define _obstack_memcpy(To, From, N) memcpy ((To), (char *)(From), (N)) -# else -# define _obstack_memcpy(To, From, N) bcopy ((char *)(From), (To), (N)) -# endif -#endif - -struct _obstack_chunk /* Lives at front of each chunk. */ -{ - char *limit; /* 1 past end of this chunk */ - struct _obstack_chunk *prev; /* address of prior chunk or NULL */ - char contents[4]; /* objects begin here */ -}; - -struct obstack /* control current object in current chunk */ -{ - long chunk_size; /* preferred size to allocate chunks in */ - struct _obstack_chunk *chunk; /* address of current struct obstack_chunk */ - char *object_base; /* address of object we are building */ - char *next_free; /* where to add next char to current object */ - char *chunk_limit; /* address of char after current chunk */ - PTR_INT_TYPE temp; /* Temporary for some macros. */ - int alignment_mask; /* Mask of alignment for each object. */ -#if defined __STDC__ && __STDC__ - /* These prototypes vary based on `use_extra_arg', and we use - casts to the prototypeless function type in all assignments, - but having prototypes here quiets -Wstrict-prototypes. */ - struct _obstack_chunk *(*chunkfun) (void *, long); - void (*freefun) (void *, struct _obstack_chunk *); - void *extra_arg; /* first arg for chunk alloc/dealloc funcs */ -#else - struct _obstack_chunk *(*chunkfun) (); /* User's fcn to allocate a chunk. */ - void (*freefun) (); /* User's function to free a chunk. */ - char *extra_arg; /* first arg for chunk alloc/dealloc funcs */ -#endif - unsigned use_extra_arg:1; /* chunk alloc/dealloc funcs take extra arg */ - unsigned maybe_empty_object:1;/* There is a possibility that the current - chunk contains a zero-length object. This - prevents freeing the chunk if we allocate - a bigger chunk to replace it. */ - unsigned alloc_failed:1; /* No longer used, as we now call the failed - handler on error, but retained for binary - compatibility. */ -}; - -/* Declare the external functions we use; they are in obstack.c. */ - -#if defined __STDC__ && __STDC__ -extern void _obstack_newchunk (struct obstack *, int); -extern void _obstack_free (struct obstack *, void *); -extern int _obstack_begin (struct obstack *, int, int, - void *(*) (long), void (*) (void *)); -extern int _obstack_begin_1 (struct obstack *, int, int, - void *(*) (void *, long), - void (*) (void *, void *), void *); -extern int _obstack_memory_used (struct obstack *); -#else -extern void _obstack_newchunk (); -extern void _obstack_free (); -extern int _obstack_begin (); -extern int _obstack_begin_1 (); -extern int _obstack_memory_used (); -#endif - -#if defined __STDC__ && __STDC__ - -/* Do the function-declarations after the structs - but before defining the macros. */ - -void obstack_init (struct obstack *obstack); - -void * obstack_alloc (struct obstack *obstack, int size); - -void * obstack_copy (struct obstack *obstack, void *address, int size); -void * obstack_copy0 (struct obstack *obstack, void *address, int size); - -void obstack_free (struct obstack *obstack, void *block); - -void obstack_blank (struct obstack *obstack, int size); - -void obstack_grow (struct obstack *obstack, void *data, int size); -void obstack_grow0 (struct obstack *obstack, void *data, int size); - -void obstack_1grow (struct obstack *obstack, int data_char); -void obstack_ptr_grow (struct obstack *obstack, void *data); -void obstack_int_grow (struct obstack *obstack, int data); - -void * obstack_finish (struct obstack *obstack); - -int obstack_object_size (struct obstack *obstack); - -int obstack_room (struct obstack *obstack); -void obstack_make_room (struct obstack *obstack, int size); -void obstack_1grow_fast (struct obstack *obstack, int data_char); -void obstack_ptr_grow_fast (struct obstack *obstack, void *data); -void obstack_int_grow_fast (struct obstack *obstack, int data); -void obstack_blank_fast (struct obstack *obstack, int size); - -void * obstack_base (struct obstack *obstack); -void * obstack_next_free (struct obstack *obstack); -int obstack_alignment_mask (struct obstack *obstack); -int obstack_chunk_size (struct obstack *obstack); -int obstack_memory_used (struct obstack *obstack); - -#endif /* __STDC__ */ - -/* Non-ANSI C cannot really support alternative functions for these macros, - so we do not declare them. */ - -/* Error handler called when `obstack_chunk_alloc' failed to allocate - more memory. This can be set to a user defined function. The - default action is to print a message and abort. */ -#if defined __STDC__ && __STDC__ -extern void (*obstack_alloc_failed_handler) (void); -#else -extern void (*obstack_alloc_failed_handler) (); -#endif - -/* Exit value used when `print_and_abort' is used. */ -extern int obstack_exit_failure; - -/* Pointer to beginning of object being allocated or to be allocated next. - Note that this might not be the final address of the object - because a new chunk might be needed to hold the final size. */ - -#define obstack_base(h) ((h)->object_base) - -/* Size for allocating ordinary chunks. */ - -#define obstack_chunk_size(h) ((h)->chunk_size) - -/* Pointer to next byte not yet allocated in current chunk. */ - -#define obstack_next_free(h) ((h)->next_free) - -/* Mask specifying low bits that should be clear in address of an object. */ - -#define obstack_alignment_mask(h) ((h)->alignment_mask) - -/* To prevent prototype warnings provide complete argument list in - standard C version. */ -#if defined __STDC__ && __STDC__ - -# define obstack_init(h) \ - _obstack_begin ((h), 0, 0, \ - (void *(*) (long)) obstack_chunk_alloc, (void (*) (void *)) obstack_chunk_free) - -# define obstack_begin(h, size) \ - _obstack_begin ((h), (size), 0, \ - (void *(*) (long)) obstack_chunk_alloc, (void (*) (void *)) obstack_chunk_free) - -# define obstack_specify_allocation(h, size, alignment, chunkfun, freefun) \ - _obstack_begin ((h), (size), (alignment), \ - (void *(*) (long)) (chunkfun), (void (*) (void *)) (freefun)) - -# define obstack_specify_allocation_with_arg(h, size, alignment, chunkfun, freefun, arg) \ - _obstack_begin_1 ((h), (size), (alignment), \ - (void *(*) (void *, long)) (chunkfun), \ - (void (*) (void *, void *)) (freefun), (arg)) - -# define obstack_chunkfun(h, newchunkfun) \ - ((h) -> chunkfun = (struct _obstack_chunk *(*)(void *, long)) (newchunkfun)) - -# define obstack_freefun(h, newfreefun) \ - ((h) -> freefun = (void (*)(void *, struct _obstack_chunk *)) (newfreefun)) - -#else - -# define obstack_init(h) \ - _obstack_begin ((h), 0, 0, \ - (void *(*) ()) obstack_chunk_alloc, (void (*) ()) obstack_chunk_free) - -# define obstack_begin(h, size) \ - _obstack_begin ((h), (size), 0, \ - (void *(*) ()) obstack_chunk_alloc, (void (*) ()) obstack_chunk_free) - -# define obstack_specify_allocation(h, size, alignment, chunkfun, freefun) \ - _obstack_begin ((h), (size), (alignment), \ - (void *(*) ()) (chunkfun), (void (*) ()) (freefun)) - -# define obstack_specify_allocation_with_arg(h, size, alignment, chunkfun, freefun, arg) \ - _obstack_begin_1 ((h), (size), (alignment), \ - (void *(*) ()) (chunkfun), (void (*) ()) (freefun), (arg)) - -# define obstack_chunkfun(h, newchunkfun) \ - ((h) -> chunkfun = (struct _obstack_chunk *(*)()) (newchunkfun)) - -# define obstack_freefun(h, newfreefun) \ - ((h) -> freefun = (void (*)()) (newfreefun)) - -#endif - -#define obstack_1grow_fast(h,achar) (*((h)->next_free)++ = achar) - -#define obstack_blank_fast(h,n) ((h)->next_free += (n)) - -#define obstack_memory_used(h) _obstack_memory_used (h) - -#if defined __GNUC__ && defined __STDC__ && __STDC__ -/* NextStep 2.0 cc is really gcc 1.93 but it defines __GNUC__ = 2 and - does not implement __extension__. But that compiler doesn't define - __GNUC_MINOR__. */ -# if __GNUC__ < 2 || (__NeXT__ && !__GNUC_MINOR__) -# define __extension__ -# endif - -/* For GNU C, if not -traditional, - we can define these macros to compute all args only once - without using a global variable. - Also, we can avoid using the `temp' slot, to make faster code. */ - -# define obstack_object_size(OBSTACK) \ - __extension__ \ - ({ struct obstack *__o = (OBSTACK); \ - (unsigned) (__o->next_free - __o->object_base); }) - -# define obstack_room(OBSTACK) \ - __extension__ \ - ({ struct obstack *__o = (OBSTACK); \ - (unsigned) (__o->chunk_limit - __o->next_free); }) - -# define obstack_make_room(OBSTACK,length) \ -__extension__ \ -({ struct obstack *__o = (OBSTACK); \ - int __len = (length); \ - if (__o->chunk_limit - __o->next_free < __len) \ - _obstack_newchunk (__o, __len); \ - (void) 0; }) - -# define obstack_empty_p(OBSTACK) \ - __extension__ \ - ({ struct obstack *__o = (OBSTACK); \ - (__o->chunk->prev == 0 && __o->next_free - __o->chunk->contents == 0); }) - -# define obstack_grow(OBSTACK,where,length) \ -__extension__ \ -({ struct obstack *__o = (OBSTACK); \ - int __len = (length); \ - if (__o->next_free + __len > __o->chunk_limit) \ - _obstack_newchunk (__o, __len); \ - _obstack_memcpy (__o->next_free, (where), __len); \ - __o->next_free += __len; \ - (void) 0; }) - -# define obstack_grow0(OBSTACK,where,length) \ -__extension__ \ -({ struct obstack *__o = (OBSTACK); \ - int __len = (length); \ - if (__o->next_free + __len + 1 > __o->chunk_limit) \ - _obstack_newchunk (__o, __len + 1); \ - _obstack_memcpy (__o->next_free, (where), __len); \ - __o->next_free += __len; \ - *(__o->next_free)++ = 0; \ - (void) 0; }) - -# define obstack_1grow(OBSTACK,datum) \ -__extension__ \ -({ struct obstack *__o = (OBSTACK); \ - if (__o->next_free + 1 > __o->chunk_limit) \ - _obstack_newchunk (__o, 1); \ - *(__o->next_free)++ = (datum); \ - (void) 0; }) - -/* These assume that the obstack alignment is good enough for pointers or ints, - and that the data added so far to the current object - shares that much alignment. */ - -# define obstack_ptr_grow(OBSTACK,datum) \ -__extension__ \ -({ struct obstack *__o = (OBSTACK); \ - if (__o->next_free + sizeof (void *) > __o->chunk_limit) \ - _obstack_newchunk (__o, sizeof (void *)); \ - *((void **)__o->next_free)++ = ((void *)datum); \ - (void) 0; }) - -# define obstack_int_grow(OBSTACK,datum) \ -__extension__ \ -({ struct obstack *__o = (OBSTACK); \ - if (__o->next_free + sizeof (int) > __o->chunk_limit) \ - _obstack_newchunk (__o, sizeof (int)); \ - *((int *)__o->next_free)++ = ((int)datum); \ - (void) 0; }) - -# define obstack_ptr_grow_fast(h,aptr) (*((void **) (h)->next_free)++ = (void *)aptr) -# define obstack_int_grow_fast(h,aint) (*((int *) (h)->next_free)++ = (int) aint) - -# define obstack_blank(OBSTACK,length) \ -__extension__ \ -({ struct obstack *__o = (OBSTACK); \ - int __len = (length); \ - if (__o->chunk_limit - __o->next_free < __len) \ - _obstack_newchunk (__o, __len); \ - __o->next_free += __len; \ - (void) 0; }) - -# define obstack_alloc(OBSTACK,length) \ -__extension__ \ -({ struct obstack *__h = (OBSTACK); \ - obstack_blank (__h, (length)); \ - obstack_finish (__h); }) - -# define obstack_copy(OBSTACK,where,length) \ -__extension__ \ -({ struct obstack *__h = (OBSTACK); \ - obstack_grow (__h, (where), (length)); \ - obstack_finish (__h); }) - -# define obstack_copy0(OBSTACK,where,length) \ -__extension__ \ -({ struct obstack *__h = (OBSTACK); \ - obstack_grow0 (__h, (where), (length)); \ - obstack_finish (__h); }) - -/* The local variable is named __o1 to avoid a name conflict - when obstack_blank is called. */ -# define obstack_finish(OBSTACK) \ -__extension__ \ -({ struct obstack *__o1 = (OBSTACK); \ - void *value; \ - value = (void *) __o1->object_base; \ - if (__o1->next_free == value) \ - __o1->maybe_empty_object = 1; \ - __o1->next_free \ - = __INT_TO_PTR ((__PTR_TO_INT (__o1->next_free)+__o1->alignment_mask)\ - & ~ (__o1->alignment_mask)); \ - if (__o1->next_free - (char *)__o1->chunk \ - > __o1->chunk_limit - (char *)__o1->chunk) \ - __o1->next_free = __o1->chunk_limit; \ - __o1->object_base = __o1->next_free; \ - value; }) - -# define obstack_free(OBSTACK, OBJ) \ -__extension__ \ -({ struct obstack *__o = (OBSTACK); \ - void *__obj = (OBJ); \ - if (__obj > (void *)__o->chunk && __obj < (void *)__o->chunk_limit) \ - __o->next_free = __o->object_base = __obj; \ - else (obstack_free) (__o, __obj); }) - -#else /* not __GNUC__ or not __STDC__ */ - -# define obstack_object_size(h) \ - (unsigned) ((h)->next_free - (h)->object_base) - -# define obstack_room(h) \ - (unsigned) ((h)->chunk_limit - (h)->next_free) - -# define obstack_empty_p(h) \ - ((h)->chunk->prev == 0 && (h)->next_free - (h)->chunk->contents == 0) - -/* Note that the call to _obstack_newchunk is enclosed in (..., 0) - so that we can avoid having void expressions - in the arms of the conditional expression. - Casting the third operand to void was tried before, - but some compilers won't accept it. */ - -# define obstack_make_room(h,length) \ -( (h)->temp = (length), \ - (((h)->next_free + (h)->temp > (h)->chunk_limit) \ - ? (_obstack_newchunk ((h), (h)->temp), 0) : 0)) - -# define obstack_grow(h,where,length) \ -( (h)->temp = (length), \ - (((h)->next_free + (h)->temp > (h)->chunk_limit) \ - ? (_obstack_newchunk ((h), (h)->temp), 0) : 0), \ - _obstack_memcpy ((h)->next_free, (where), (h)->temp), \ - (h)->next_free += (h)->temp) - -# define obstack_grow0(h,where,length) \ -( (h)->temp = (length), \ - (((h)->next_free + (h)->temp + 1 > (h)->chunk_limit) \ - ? (_obstack_newchunk ((h), (h)->temp + 1), 0) : 0), \ - _obstack_memcpy ((h)->next_free, (where), (h)->temp), \ - (h)->next_free += (h)->temp, \ - *((h)->next_free)++ = 0) - -# define obstack_1grow(h,datum) \ -( (((h)->next_free + 1 > (h)->chunk_limit) \ - ? (_obstack_newchunk ((h), 1), 0) : 0), \ - (*((h)->next_free)++ = (datum))) - -# define obstack_ptr_grow(h,datum) \ -( (((h)->next_free + sizeof (char *) > (h)->chunk_limit) \ - ? (_obstack_newchunk ((h), sizeof (char *)), 0) : 0), \ - (*((char **) (((h)->next_free+=sizeof(char *))-sizeof(char *))) = ((char *) datum))) - -# define obstack_int_grow(h,datum) \ -( (((h)->next_free + sizeof (int) > (h)->chunk_limit) \ - ? (_obstack_newchunk ((h), sizeof (int)), 0) : 0), \ - (*((int *) (((h)->next_free+=sizeof(int))-sizeof(int))) = ((int) datum))) - -# define obstack_ptr_grow_fast(h,aptr) (*((char **) (h)->next_free)++ = (char *) aptr) -# define obstack_int_grow_fast(h,aint) (*((int *) (h)->next_free)++ = (int) aint) - -# define obstack_blank(h,length) \ -( (h)->temp = (length), \ - (((h)->chunk_limit - (h)->next_free < (h)->temp) \ - ? (_obstack_newchunk ((h), (h)->temp), 0) : 0), \ - ((h)->next_free += (h)->temp)) - -# define obstack_alloc(h,length) \ - (obstack_blank ((h), (length)), obstack_finish ((h))) - -# define obstack_copy(h,where,length) \ - (obstack_grow ((h), (where), (length)), obstack_finish ((h))) - -# define obstack_copy0(h,where,length) \ - (obstack_grow0 ((h), (where), (length)), obstack_finish ((h))) - -# define obstack_finish(h) \ -( ((h)->next_free == (h)->object_base \ - ? (((h)->maybe_empty_object = 1), 0) \ - : 0), \ - (h)->temp = __PTR_TO_INT ((h)->object_base), \ - (h)->next_free \ - = __INT_TO_PTR ((__PTR_TO_INT ((h)->next_free)+(h)->alignment_mask) \ - & ~ ((h)->alignment_mask)), \ - (((h)->next_free - (char *) (h)->chunk \ - > (h)->chunk_limit - (char *) (h)->chunk) \ - ? ((h)->next_free = (h)->chunk_limit) : 0), \ - (h)->object_base = (h)->next_free, \ - __INT_TO_PTR ((h)->temp)) - -# if defined __STDC__ && __STDC__ -# define obstack_free(h,obj) \ -( (h)->temp = (char *) (obj) - (char *) (h)->chunk, \ - (((h)->temp > 0 && (h)->temp < (h)->chunk_limit - (char *) (h)->chunk)\ - ? (int) ((h)->next_free = (h)->object_base \ - = (h)->temp + (char *) (h)->chunk) \ - : (((obstack_free) ((h), (h)->temp + (char *) (h)->chunk), 0), 0))) -# else -# define obstack_free(h,obj) \ -( (h)->temp = (char *) (obj) - (char *) (h)->chunk, \ - (((h)->temp > 0 && (h)->temp < (h)->chunk_limit - (char *) (h)->chunk)\ - ? (int) ((h)->next_free = (h)->object_base \ - = (h)->temp + (char *) (h)->chunk) \ - : (_obstack_free ((h), (h)->temp + (char *) (h)->chunk), 0))) -# endif - -#endif /* not __GNUC__ or not __STDC__ */ - -#ifdef __cplusplus -} /* C++ */ -#endif - -#endif /* obstack.h */ diff --git a/contrib/gcc/include/partition.h b/contrib/gcc/include/partition.h deleted file mode 100644 index 851422a..0000000 --- a/contrib/gcc/include/partition.h +++ /dev/null @@ -1,81 +0,0 @@ -/* List implementation of a partition of consecutive integers. - Copyright (C) 2000, 2001 Free Software Foundation, Inc. - Contributed by CodeSourcery, LLC. - - 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 package implements a partition of consecutive integers. The - elements are partitioned into classes. Each class is represented - by one of its elements, the canonical element, which is chosen - arbitrarily from elements in the class. The principal operations - on a partition are FIND, which takes an element, determines its - class, and returns the canonical element for that class, and UNION, - which unites the two classes that contain two given elements into a - single class. - - The list implementation used here provides constant-time finds. By - storing the size of each class with the class's canonical element, - it is able to perform unions over all the classes in the partition - in O (N log N) time. */ - -#ifndef _PARTITION_H -#define _PARTITION_H - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -#include -#include - -struct partition_elem -{ - /* The canonical element that represents the class containing this - element. */ - int class_element; - /* The next element in this class. Elements in each class form a - circular list. */ - struct partition_elem* next; - /* The number of elements in this class. Valid only if this is the - canonical element for its class. */ - unsigned class_count; -}; - -typedef struct partition_def -{ - /* The number of elements in this partition. */ - int num_elements; - /* The elements in the partition. */ - struct partition_elem elements[1]; -} *partition; - -extern partition partition_new PARAMS((int)); -extern void partition_delete PARAMS((partition)); -extern int partition_union PARAMS((partition, - int, - int)); -extern void partition_print PARAMS((partition, - FILE*)); - -/* Returns the canonical element corresponding to the class containing - ELEMENT__ in PARTITION__. */ - -#define partition_find(partition__, element__) \ - ((partition__)->elements[(element__)].class_element) - -#endif /* _PARTITION_H */ diff --git a/contrib/gcc/include/safe-ctype.h b/contrib/gcc/include/safe-ctype.h deleted file mode 100644 index b2ad849..0000000 --- a/contrib/gcc/include/safe-ctype.h +++ /dev/null @@ -1,103 +0,0 @@ -/* replacement macros. - - Copyright (C) 2000, 2001 Free Software Foundation, Inc. - Contributed by Zack Weinberg . - -This file is part of the libiberty library. -Libiberty is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public -License as published by the Free Software Foundation; either -version 2 of the License, or (at your option) any later version. - -Libiberty 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with libiberty; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. */ - -/* This is a compatible replacement of the standard C library's - with the following properties: - - - Implements all isxxx() macros required by C99. - - Also implements some character classes useful when - parsing C-like languages. - - Does not change behavior depending on the current locale. - - Behaves properly for all values in the range of a signed or - unsigned char. - - To avoid conflicts, this header defines the isxxx functions in upper - case, e.g. ISALPHA not isalpha. */ - -#ifndef SAFE_CTYPE_H -#define SAFE_CTYPE_H - -#ifdef isalpha - #error "safe-ctype.h and ctype.h may not be used simultaneously" -#else - -/* Categories. */ - -enum { - /* In C99 */ - _sch_isblank = 0x0001, /* space \t */ - _sch_iscntrl = 0x0002, /* nonprinting characters */ - _sch_isdigit = 0x0004, /* 0-9 */ - _sch_islower = 0x0008, /* a-z */ - _sch_isprint = 0x0010, /* any printing character including ' ' */ - _sch_ispunct = 0x0020, /* all punctuation */ - _sch_isspace = 0x0040, /* space \t \n \r \f \v */ - _sch_isupper = 0x0080, /* A-Z */ - _sch_isxdigit = 0x0100, /* 0-9A-Fa-f */ - - /* Extra categories useful to cpplib. */ - _sch_isidst = 0x0200, /* A-Za-z_ */ - _sch_isvsp = 0x0400, /* \n \r */ - _sch_isnvsp = 0x0800, /* space \t \f \v \0 */ - - /* Combinations of the above. */ - _sch_isalpha = _sch_isupper|_sch_islower, /* A-Za-z */ - _sch_isalnum = _sch_isalpha|_sch_isdigit, /* A-Za-z0-9 */ - _sch_isidnum = _sch_isidst|_sch_isdigit, /* A-Za-z0-9_ */ - _sch_isgraph = _sch_isalnum|_sch_ispunct, /* isprint and not space */ - _sch_iscppsp = _sch_isvsp|_sch_isnvsp, /* isspace + \0 */ - _sch_isbasic = _sch_isprint|_sch_iscppsp /* basic charset of ISO C - (plus ` and @) */ -}; - -/* Character classification. */ -extern const unsigned short _sch_istable[256]; - -#define _sch_test(c, bit) (_sch_istable[(c) & 0xff] & (unsigned short)(bit)) - -#define ISALPHA(c) _sch_test(c, _sch_isalpha) -#define ISALNUM(c) _sch_test(c, _sch_isalnum) -#define ISBLANK(c) _sch_test(c, _sch_isblank) -#define ISCNTRL(c) _sch_test(c, _sch_iscntrl) -#define ISDIGIT(c) _sch_test(c, _sch_isdigit) -#define ISGRAPH(c) _sch_test(c, _sch_isgraph) -#define ISLOWER(c) _sch_test(c, _sch_islower) -#define ISPRINT(c) _sch_test(c, _sch_isprint) -#define ISPUNCT(c) _sch_test(c, _sch_ispunct) -#define ISSPACE(c) _sch_test(c, _sch_isspace) -#define ISUPPER(c) _sch_test(c, _sch_isupper) -#define ISXDIGIT(c) _sch_test(c, _sch_isxdigit) - -#define ISIDNUM(c) _sch_test(c, _sch_isidnum) -#define ISIDST(c) _sch_test(c, _sch_isidst) -#define IS_ISOBASIC(c) _sch_test(c, _sch_isbasic) -#define IS_VSPACE(c) _sch_test(c, _sch_isvsp) -#define IS_NVSPACE(c) _sch_test(c, _sch_isnvsp) -#define IS_SPACE_OR_NUL(c) _sch_test(c, _sch_iscppsp) - -/* Character transformation. */ -extern const unsigned char _sch_toupper[256]; -extern const unsigned char _sch_tolower[256]; -#define TOUPPER(c) _sch_toupper[(c) & 0xff] -#define TOLOWER(c) _sch_tolower[(c) & 0xff] - -#endif /* no ctype.h */ -#endif /* SAFE_CTYPE_H */ diff --git a/contrib/gcc/include/sort.h b/contrib/gcc/include/sort.h deleted file mode 100644 index b974059..0000000 --- a/contrib/gcc/include/sort.h +++ /dev/null @@ -1,48 +0,0 @@ -/* Sorting algorithms. - Copyright (C) 2000 Free Software Foundation, Inc. - Contributed 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. */ - -#ifndef SORT_H -#define SORT_H - -#include /* For size_t */ -#ifdef __STDC__ -#include -#endif /* __STDC__ */ - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -#include - -/* Sort an array of pointers. */ - -extern void sort_pointers PARAMS ((size_t, void **, void **)); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* SORT_H */ - - - - diff --git a/contrib/gcc/include/splay-tree.h b/contrib/gcc/include/splay-tree.h deleted file mode 100644 index 4b7a7bf..0000000 --- a/contrib/gcc/include/splay-tree.h +++ /dev/null @@ -1,154 +0,0 @@ -/* A splay-tree datatype. - Copyright 1998, 1999, 2000 Free Software Foundation, Inc. - Contributed by Mark Mitchell (mark@markmitchell.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. */ - -/* For an easily readable description of splay-trees, see: - - Lewis, Harry R. and Denenberg, Larry. Data Structures and Their - Algorithms. Harper-Collins, Inc. 1991. - - The major feature of splay trees is that all basic tree operations - are amortized O(log n) time for a tree with n nodes. */ - -#ifndef _SPLAY_TREE_H -#define _SPLAY_TREE_H - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -#include - -/* Use typedefs for the key and data types to facilitate changing - these types, if necessary. These types should be sufficiently wide - that any pointer or scalar can be cast to these types, and then - cast back, without loss of precision. */ -typedef unsigned long int splay_tree_key; -typedef unsigned long int splay_tree_value; - -/* Forward declaration for a node in the tree. */ -typedef struct splay_tree_node_s *splay_tree_node; - -/* The type of a function which compares two splay-tree keys. The - function should return values as for qsort. */ -typedef int (*splay_tree_compare_fn) PARAMS((splay_tree_key, splay_tree_key)); - -/* The type of a function used to deallocate any resources associated - with the key. */ -typedef void (*splay_tree_delete_key_fn) PARAMS((splay_tree_key)); - -/* The type of a function used to deallocate any resources associated - with the value. */ -typedef void (*splay_tree_delete_value_fn) PARAMS((splay_tree_value)); - -/* The type of a function used to iterate over the tree. */ -typedef int (*splay_tree_foreach_fn) PARAMS((splay_tree_node, void*)); - -/* The type of a function used to allocate memory for tree root and - node structures. The first argument is the number of bytes needed; - the second is a data pointer the splay tree functions pass through - to the allocator. This function must never return zero. */ -typedef void *(*splay_tree_allocate_fn) PARAMS((int, void *)); - -/* The type of a function used to free memory allocated using the - corresponding splay_tree_allocate_fn. The first argument is the - memory to be freed; the latter is a data pointer the splay tree - functions pass through to the freer. */ -typedef void (*splay_tree_deallocate_fn) PARAMS((void *, void *)); - -/* The nodes in the splay tree. */ -struct splay_tree_node_s -{ - /* The key. */ - splay_tree_key key; - - /* The value. */ - splay_tree_value value; - - /* The left and right children, respectively. */ - splay_tree_node left; - splay_tree_node right; -}; - -/* The splay tree itself. */ -typedef struct splay_tree_s -{ - /* The root of the tree. */ - splay_tree_node root; - - /* The comparision function. */ - splay_tree_compare_fn comp; - - /* The deallocate-key function. NULL if no cleanup is necessary. */ - splay_tree_delete_key_fn delete_key; - - /* The deallocate-value function. NULL if no cleanup is necessary. */ - splay_tree_delete_value_fn delete_value; - - /* Allocate/free functions, and a data pointer to pass to them. */ - splay_tree_allocate_fn allocate; - splay_tree_deallocate_fn deallocate; - void *allocate_data; - -} *splay_tree; - -extern splay_tree splay_tree_new PARAMS((splay_tree_compare_fn, - splay_tree_delete_key_fn, - splay_tree_delete_value_fn)); -extern splay_tree splay_tree_new_with_allocator - PARAMS((splay_tree_compare_fn, - splay_tree_delete_key_fn, - splay_tree_delete_value_fn, - splay_tree_allocate_fn, - splay_tree_deallocate_fn, - void *)); -extern void splay_tree_delete PARAMS((splay_tree)); -extern splay_tree_node splay_tree_insert - PARAMS((splay_tree, - splay_tree_key, - splay_tree_value)); -extern void splay_tree_remove PARAMS((splay_tree, - splay_tree_key)); -extern splay_tree_node splay_tree_lookup - PARAMS((splay_tree, - splay_tree_key)); -extern splay_tree_node splay_tree_predecessor - PARAMS((splay_tree, - splay_tree_key)); -extern splay_tree_node splay_tree_successor - PARAMS((splay_tree, - splay_tree_key)); -extern splay_tree_node splay_tree_max - PARAMS((splay_tree)); -extern splay_tree_node splay_tree_min - PARAMS((splay_tree)); -extern int splay_tree_foreach PARAMS((splay_tree, - splay_tree_foreach_fn, - void*)); -extern int splay_tree_compare_ints PARAMS((splay_tree_key, - splay_tree_key)); -extern int splay_tree_compare_pointers PARAMS((splay_tree_key, - splay_tree_key)); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* _SPLAY_TREE_H */ diff --git a/contrib/gcc/include/symcat.h b/contrib/gcc/include/symcat.h deleted file mode 100644 index 61ce1e9..0000000 --- a/contrib/gcc/include/symcat.h +++ /dev/null @@ -1,49 +0,0 @@ -/* Symbol concatenation utilities. - - Copyright (C) 1998, 2000 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 of the License, 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. */ - -#ifndef SYM_CAT_H -#define SYM_CAT_H - -#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE) -#define CONCAT2(a,b) a##b -#define CONCAT3(a,b,c) a##b##c -#define CONCAT4(a,b,c,d) a##b##c##d -#define STRINGX(s) #s -#else -/* Note one should never pass extra whitespace to the CONCATn macros, - e.g. CONCAT2(foo, bar) because traditonal C will keep the space between - the two labels instead of concatenating them. Instead, make sure to - write CONCAT2(foo,bar). */ -#define CONCAT2(a,b) a/**/b -#define CONCAT3(a,b,c) a/**/b/**/c -#define CONCAT4(a,b,c,d) a/**/b/**/c/**/d -#define STRINGX(s) "s" -#endif - -#define XCONCAT2(a,b) CONCAT2(a,b) -#define XCONCAT3(a,b,c) CONCAT3(a,b,c) -#define XCONCAT4(a,b,c,d) CONCAT4(a,b,c,d) - -/* Note the layer of indirection here is typically used to allow - stringification of the expansion of macros. I.e. "#define foo - bar", "XSTRING(foo)", to yield "bar". Be aware that this only - works for __STDC__, not for traditional C which will still resolve - to "foo". */ -#define XSTRING(s) STRINGX(s) - -#endif /* SYM_CAT_H */ diff --git a/contrib/gcc/include/ternary.h b/contrib/gcc/include/ternary.h deleted file mode 100644 index 40d442e..0000000 --- a/contrib/gcc/include/ternary.h +++ /dev/null @@ -1,51 +0,0 @@ -/* ternary.h - Ternary Search Trees - Copyright 2001 Free Software Foundation, Inc. - - Contributed by Daniel Berlin (dan@cgsoftware.com) - - - 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. */ -#ifndef TERNARY_H_ -#define TERNARY_H_ -/* Ternary search trees */ - -typedef struct ternary_node_def *ternary_tree; - -typedef struct ternary_node_def -{ - char splitchar; - ternary_tree lokid; - ternary_tree eqkid; - ternary_tree hikid; -} -ternary_node; - -/* Insert string S into tree P, associating it with DATA. - Return the data in the tree associated with the string if it's - already there, and replace is 0. - Otherwise, replaces if it it exists, inserts if it doesn't, and - returns the data you passed in. */ -PTR ternary_insert PARAMS ((ternary_tree *p, const char *s, - PTR data, int replace)); - -/* Delete the ternary search tree rooted at P. - Does NOT delete the data you associated with the strings. */ -void ternary_cleanup PARAMS ((ternary_tree p)); - -/* Search the ternary tree for string S, returning the data associated - with it if found. */ -PTR ternary_search PARAMS ((const ternary_node *p, const char *s)); -#endif diff --git a/contrib/gcc/include/xregex.h b/contrib/gcc/include/xregex.h deleted file mode 100644 index 645195b..0000000 --- a/contrib/gcc/include/xregex.h +++ /dev/null @@ -1,28 +0,0 @@ -/* This file redefines all regex external names before including - a renamed copy of glibc's regex.h. */ - -#ifndef _XREGEX_H -#define _XREGEX_H 1 - -# define regfree xregfree -# define regexec xregexec -# define regcomp xregcomp -# define regerror xregerror -# define re_set_registers xre_set_registers -# define re_match_2 xre_match_2 -# define re_match xre_match -# define re_search xre_search -# define re_compile_pattern xre_compile_pattern -# define re_set_syntax xre_set_syntax -# define re_search_2 xre_search_2 -# define re_compile_fastmap xre_compile_fastmap -# define re_syntax_options xre_syntax_options -# define re_max_failures xre_max_failures - -# define _REGEX_RE_COMP -# define re_comp xre_comp -# define re_exec xre_exec - -#include "xregex2.h" - -#endif /* xregex.h */ diff --git a/contrib/gcc/include/xregex2.h b/contrib/gcc/include/xregex2.h deleted file mode 100644 index 2991daf..0000000 --- a/contrib/gcc/include/xregex2.h +++ /dev/null @@ -1,571 +0,0 @@ -/* Definitions for data structures and routines for the regular - expression library, version 0.12. - Copyright (C) 1985,1989-1993,1995-1998, 2000 Free Software Foundation, Inc. - This file is part of the GNU C Library. Its master source is NOT part of - the C library, however. The master source lives in /gd/gnu/lib. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _REGEX_H -#define _REGEX_H 1 - -/* Allow the use in C++ code. */ -#ifdef __cplusplus -extern "C" { -#endif - -/* POSIX says that must be included (by the caller) before - . */ - -#if !defined _POSIX_C_SOURCE && !defined _POSIX_SOURCE && defined VMS -/* VMS doesn't have `size_t' in , even though POSIX says it - should be there. */ -# include -#endif - -/* The following two types have to be signed and unsigned integer type - wide enough to hold a value of a pointer. For most ANSI compilers - ptrdiff_t and size_t should be likely OK. Still size of these two - types is 2 for Microsoft C. Ugh... */ -typedef long int s_reg_t; -typedef unsigned long int active_reg_t; - -/* The following bits are used to determine the regexp syntax we - recognize. The set/not-set meanings are chosen so that Emacs syntax - remains the value 0. The bits are given in alphabetical order, and - the definitions shifted by one from the previous bit; thus, when we - add or remove a bit, only one other definition need change. */ -typedef unsigned long int reg_syntax_t; - -/* If this bit is not set, then \ inside a bracket expression is literal. - If set, then such a \ quotes the following character. */ -#define RE_BACKSLASH_ESCAPE_IN_LISTS ((unsigned long int) 1) - -/* If this bit is not set, then + and ? are operators, and \+ and \? are - literals. - If set, then \+ and \? are operators and + and ? are literals. */ -#define RE_BK_PLUS_QM (RE_BACKSLASH_ESCAPE_IN_LISTS << 1) - -/* If this bit is set, then character classes are supported. They are: - [:alpha:], [:upper:], [:lower:], [:digit:], [:alnum:], [:xdigit:], - [:space:], [:print:], [:punct:], [:graph:], and [:cntrl:]. - If not set, then character classes are not supported. */ -#define RE_CHAR_CLASSES (RE_BK_PLUS_QM << 1) - -/* If this bit is set, then ^ and $ are always anchors (outside bracket - expressions, of course). - If this bit is not set, then it depends: - ^ is an anchor if it is at the beginning of a regular - expression or after an open-group or an alternation operator; - $ is an anchor if it is at the end of a regular expression, or - before a close-group or an alternation operator. - - This bit could be (re)combined with RE_CONTEXT_INDEP_OPS, because - POSIX draft 11.2 says that * etc. in leading positions is undefined. - We already implemented a previous draft which made those constructs - invalid, though, so we haven't changed the code back. */ -#define RE_CONTEXT_INDEP_ANCHORS (RE_CHAR_CLASSES << 1) - -/* If this bit is set, then special characters are always special - regardless of where they are in the pattern. - If this bit is not set, then special characters are special only in - some contexts; otherwise they are ordinary. Specifically, - * + ? and intervals are only special when not after the beginning, - open-group, or alternation operator. */ -#define RE_CONTEXT_INDEP_OPS (RE_CONTEXT_INDEP_ANCHORS << 1) - -/* If this bit is set, then *, +, ?, and { cannot be first in an re or - immediately after an alternation or begin-group operator. */ -#define RE_CONTEXT_INVALID_OPS (RE_CONTEXT_INDEP_OPS << 1) - -/* If this bit is set, then . matches newline. - If not set, then it doesn't. */ -#define RE_DOT_NEWLINE (RE_CONTEXT_INVALID_OPS << 1) - -/* If this bit is set, then . doesn't match NUL. - If not set, then it does. */ -#define RE_DOT_NOT_NULL (RE_DOT_NEWLINE << 1) - -/* If this bit is set, nonmatching lists [^...] do not match newline. - If not set, they do. */ -#define RE_HAT_LISTS_NOT_NEWLINE (RE_DOT_NOT_NULL << 1) - -/* If this bit is set, either \{...\} or {...} defines an - interval, depending on RE_NO_BK_BRACES. - If not set, \{, \}, {, and } are literals. */ -#define RE_INTERVALS (RE_HAT_LISTS_NOT_NEWLINE << 1) - -/* If this bit is set, +, ? and | aren't recognized as operators. - If not set, they are. */ -#define RE_LIMITED_OPS (RE_INTERVALS << 1) - -/* If this bit is set, newline is an alternation operator. - If not set, newline is literal. */ -#define RE_NEWLINE_ALT (RE_LIMITED_OPS << 1) - -/* If this bit is set, then `{...}' defines an interval, and \{ and \} - are literals. - If not set, then `\{...\}' defines an interval. */ -#define RE_NO_BK_BRACES (RE_NEWLINE_ALT << 1) - -/* If this bit is set, (...) defines a group, and \( and \) are literals. - If not set, \(...\) defines a group, and ( and ) are literals. */ -#define RE_NO_BK_PARENS (RE_NO_BK_BRACES << 1) - -/* If this bit is set, then \ matches . - If not set, then \ is a back-reference. */ -#define RE_NO_BK_REFS (RE_NO_BK_PARENS << 1) - -/* If this bit is set, then | is an alternation operator, and \| is literal. - If not set, then \| is an alternation operator, and | is literal. */ -#define RE_NO_BK_VBAR (RE_NO_BK_REFS << 1) - -/* If this bit is set, then an ending range point collating higher - than the starting range point, as in [z-a], is invalid. - If not set, then when ending range point collates higher than the - starting range point, the range is ignored. */ -#define RE_NO_EMPTY_RANGES (RE_NO_BK_VBAR << 1) - -/* If this bit is set, then an unmatched ) is ordinary. - If not set, then an unmatched ) is invalid. */ -#define RE_UNMATCHED_RIGHT_PAREN_ORD (RE_NO_EMPTY_RANGES << 1) - -/* If this bit is set, succeed as soon as we match the whole pattern, - without further backtracking. */ -#define RE_NO_POSIX_BACKTRACKING (RE_UNMATCHED_RIGHT_PAREN_ORD << 1) - -/* If this bit is set, do not process the GNU regex operators. - If not set, then the GNU regex operators are recognized. */ -#define RE_NO_GNU_OPS (RE_NO_POSIX_BACKTRACKING << 1) - -/* If this bit is set, turn on internal regex debugging. - If not set, and debugging was on, turn it off. - This only works if regex.c is compiled -DDEBUG. - We define this bit always, so that all that's needed to turn on - debugging is to recompile regex.c; the calling code can always have - this bit set, and it won't affect anything in the normal case. */ -#define RE_DEBUG (RE_NO_GNU_OPS << 1) - -/* If this bit is set, a syntactically invalid interval is treated as - a string of ordinary characters. For example, the ERE 'a{1' is - treated as 'a\{1'. */ -#define RE_INVALID_INTERVAL_ORD (RE_DEBUG << 1) - -/* This global variable defines the particular regexp syntax to use (for - some interfaces). When a regexp is compiled, the syntax used is - stored in the pattern buffer, so changing this does not affect - already-compiled regexps. */ -extern reg_syntax_t re_syntax_options; - -/* Define combinations of the above bits for the standard possibilities. - (The [[[ comments delimit what gets put into the Texinfo file, so - don't delete them!) */ -/* [[[begin syntaxes]]] */ -#define RE_SYNTAX_EMACS 0 - -#define RE_SYNTAX_AWK \ - (RE_BACKSLASH_ESCAPE_IN_LISTS | RE_DOT_NOT_NULL \ - | RE_NO_BK_PARENS | RE_NO_BK_REFS \ - | RE_NO_BK_VBAR | RE_NO_EMPTY_RANGES \ - | RE_DOT_NEWLINE | RE_CONTEXT_INDEP_ANCHORS \ - | RE_UNMATCHED_RIGHT_PAREN_ORD | RE_NO_GNU_OPS) - -#define RE_SYNTAX_GNU_AWK \ - ((RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS | RE_DEBUG) \ - & ~(RE_DOT_NOT_NULL | RE_INTERVALS | RE_CONTEXT_INDEP_OPS)) - -#define RE_SYNTAX_POSIX_AWK \ - (RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS \ - | RE_INTERVALS | RE_NO_GNU_OPS) - -#define RE_SYNTAX_GREP \ - (RE_BK_PLUS_QM | RE_CHAR_CLASSES \ - | RE_HAT_LISTS_NOT_NEWLINE | RE_INTERVALS \ - | RE_NEWLINE_ALT) - -#define RE_SYNTAX_EGREP \ - (RE_CHAR_CLASSES | RE_CONTEXT_INDEP_ANCHORS \ - | RE_CONTEXT_INDEP_OPS | RE_HAT_LISTS_NOT_NEWLINE \ - | RE_NEWLINE_ALT | RE_NO_BK_PARENS \ - | RE_NO_BK_VBAR) - -#define RE_SYNTAX_POSIX_EGREP \ - (RE_SYNTAX_EGREP | RE_INTERVALS | RE_NO_BK_BRACES \ - | RE_INVALID_INTERVAL_ORD) - -/* P1003.2/D11.2, section 4.20.7.1, lines 5078ff. */ -#define RE_SYNTAX_ED RE_SYNTAX_POSIX_BASIC - -#define RE_SYNTAX_SED RE_SYNTAX_POSIX_BASIC - -/* Syntax bits common to both basic and extended POSIX regex syntax. */ -#define _RE_SYNTAX_POSIX_COMMON \ - (RE_CHAR_CLASSES | RE_DOT_NEWLINE | RE_DOT_NOT_NULL \ - | RE_INTERVALS | RE_NO_EMPTY_RANGES) - -#define RE_SYNTAX_POSIX_BASIC \ - (_RE_SYNTAX_POSIX_COMMON | RE_BK_PLUS_QM) - -/* Differs from ..._POSIX_BASIC only in that RE_BK_PLUS_QM becomes - RE_LIMITED_OPS, i.e., \? \+ \| are not recognized. Actually, this - isn't minimal, since other operators, such as \`, aren't disabled. */ -#define RE_SYNTAX_POSIX_MINIMAL_BASIC \ - (_RE_SYNTAX_POSIX_COMMON | RE_LIMITED_OPS) - -#define RE_SYNTAX_POSIX_EXTENDED \ - (_RE_SYNTAX_POSIX_COMMON | RE_CONTEXT_INDEP_ANCHORS \ - | RE_CONTEXT_INDEP_OPS | RE_NO_BK_BRACES \ - | RE_NO_BK_PARENS | RE_NO_BK_VBAR \ - | RE_CONTEXT_INVALID_OPS | RE_UNMATCHED_RIGHT_PAREN_ORD) - -/* Differs from ..._POSIX_EXTENDED in that RE_CONTEXT_INDEP_OPS is - removed and RE_NO_BK_REFS is added. */ -#define RE_SYNTAX_POSIX_MINIMAL_EXTENDED \ - (_RE_SYNTAX_POSIX_COMMON | RE_CONTEXT_INDEP_ANCHORS \ - | RE_CONTEXT_INVALID_OPS | RE_NO_BK_BRACES \ - | RE_NO_BK_PARENS | RE_NO_BK_REFS \ - | RE_NO_BK_VBAR | RE_UNMATCHED_RIGHT_PAREN_ORD) -/* [[[end syntaxes]]] */ - -/* Maximum number of duplicates an interval can allow. Some systems - (erroneously) define this in other header files, but we want our - value, so remove any previous define. */ -#ifdef RE_DUP_MAX -# undef RE_DUP_MAX -#endif -/* If sizeof(int) == 2, then ((1 << 15) - 1) overflows. */ -#define RE_DUP_MAX (0x7fff) - - -/* POSIX `cflags' bits (i.e., information for `regcomp'). */ - -/* If this bit is set, then use extended regular expression syntax. - If not set, then use basic regular expression syntax. */ -#define REG_EXTENDED 1 - -/* If this bit is set, then ignore case when matching. - If not set, then case is significant. */ -#define REG_ICASE (REG_EXTENDED << 1) - -/* If this bit is set, then anchors do not match at newline - characters in the string. - If not set, then anchors do match at newlines. */ -#define REG_NEWLINE (REG_ICASE << 1) - -/* If this bit is set, then report only success or fail in regexec. - If not set, then returns differ between not matching and errors. */ -#define REG_NOSUB (REG_NEWLINE << 1) - - -/* POSIX `eflags' bits (i.e., information for regexec). */ - -/* If this bit is set, then the beginning-of-line operator doesn't match - the beginning of the string (presumably because it's not the - beginning of a line). - If not set, then the beginning-of-line operator does match the - beginning of the string. */ -#define REG_NOTBOL 1 - -/* Like REG_NOTBOL, except for the end-of-line. */ -#define REG_NOTEOL (1 << 1) - - -/* If any error codes are removed, changed, or added, update the - `re_error_msg' table in regex.c. */ -typedef enum -{ -#ifdef _XOPEN_SOURCE - REG_ENOSYS = -1, /* This will never happen for this implementation. */ -#endif - - REG_NOERROR = 0, /* Success. */ - REG_NOMATCH, /* Didn't find a match (for regexec). */ - - /* POSIX regcomp return error codes. (In the order listed in the - standard.) */ - REG_BADPAT, /* Invalid pattern. */ - REG_ECOLLATE, /* Not implemented. */ - REG_ECTYPE, /* Invalid character class name. */ - REG_EESCAPE, /* Trailing backslash. */ - REG_ESUBREG, /* Invalid back reference. */ - REG_EBRACK, /* Unmatched left bracket. */ - REG_EPAREN, /* Parenthesis imbalance. */ - REG_EBRACE, /* Unmatched \{. */ - REG_BADBR, /* Invalid contents of \{\}. */ - REG_ERANGE, /* Invalid range end. */ - REG_ESPACE, /* Ran out of memory. */ - REG_BADRPT, /* No preceding re for repetition op. */ - - /* Error codes we've added. */ - REG_EEND, /* Premature end. */ - REG_ESIZE, /* Compiled pattern bigger than 2^16 bytes. */ - REG_ERPAREN /* Unmatched ) or \); not returned from regcomp. */ -} reg_errcode_t; - -/* This data structure represents a compiled pattern. Before calling - the pattern compiler, the fields `buffer', `allocated', `fastmap', - `translate', and `no_sub' can be set. After the pattern has been - compiled, the `re_nsub' field is available. All other fields are - private to the regex routines. */ - -#ifndef RE_TRANSLATE_TYPE -# define RE_TRANSLATE_TYPE char * -#endif - -struct re_pattern_buffer -{ -/* [[[begin pattern_buffer]]] */ - /* Space that holds the compiled pattern. It is declared as - `unsigned char *' because its elements are - sometimes used as array indexes. */ - unsigned char *buffer; - - /* Number of bytes to which `buffer' points. */ - unsigned long int allocated; - - /* Number of bytes actually used in `buffer'. */ - unsigned long int used; - - /* Syntax setting with which the pattern was compiled. */ - reg_syntax_t syntax; - - /* Pointer to a fastmap, if any, otherwise zero. re_search uses - the fastmap, if there is one, to skip over impossible - starting points for matches. */ - char *fastmap; - - /* Either a translate table to apply to all characters before - comparing them, or zero for no translation. The translation - is applied to a pattern when it is compiled and to a string - when it is matched. */ - RE_TRANSLATE_TYPE translate; - - /* Number of subexpressions found by the compiler. */ - size_t re_nsub; - - /* Zero if this pattern cannot match the empty string, one else. - Well, in truth it's used only in `re_search_2', to see - whether or not we should use the fastmap, so we don't set - this absolutely perfectly; see `re_compile_fastmap' (the - `duplicate' case). */ - unsigned can_be_null : 1; - - /* If REGS_UNALLOCATED, allocate space in the `regs' structure - for `max (RE_NREGS, re_nsub + 1)' groups. - If REGS_REALLOCATE, reallocate space if necessary. - If REGS_FIXED, use what's there. */ -#define REGS_UNALLOCATED 0 -#define REGS_REALLOCATE 1 -#define REGS_FIXED 2 - unsigned regs_allocated : 2; - - /* Set to zero when `regex_compile' compiles a pattern; set to one - by `re_compile_fastmap' if it updates the fastmap. */ - unsigned fastmap_accurate : 1; - - /* If set, `re_match_2' does not return information about - subexpressions. */ - unsigned no_sub : 1; - - /* If set, a beginning-of-line anchor doesn't match at the - beginning of the string. */ - unsigned not_bol : 1; - - /* Similarly for an end-of-line anchor. */ - unsigned not_eol : 1; - - /* If true, an anchor at a newline matches. */ - unsigned newline_anchor : 1; - -/* [[[end pattern_buffer]]] */ -}; - -typedef struct re_pattern_buffer regex_t; - -/* Type for byte offsets within the string. POSIX mandates this. */ -typedef int regoff_t; - - -/* This is the structure we store register match data in. See - regex.texinfo for a full description of what registers match. */ -struct re_registers -{ - unsigned num_regs; - regoff_t *start; - regoff_t *end; -}; - - -/* If `regs_allocated' is REGS_UNALLOCATED in the pattern buffer, - `re_match_2' returns information about at least this many registers - the first time a `regs' structure is passed. */ -#ifndef RE_NREGS -# define RE_NREGS 30 -#endif - - -/* POSIX specification for registers. Aside from the different names than - `re_registers', POSIX uses an array of structures, instead of a - structure of arrays. */ -typedef struct -{ - regoff_t rm_so; /* Byte offset from string's start to substring's start. */ - regoff_t rm_eo; /* Byte offset from string's start to substring's end. */ -} regmatch_t; - -/* Declarations for routines. */ - -/* To avoid duplicating every routine declaration -- once with a - prototype (if we are ANSI), and once without (if we aren't) -- we - use the following macro to declare argument types. This - unfortunately clutters up the declarations a bit, but I think it's - worth it. */ - -#if __STDC__ - -# define _RE_ARGS(args) args - -#else /* not __STDC__ */ - -# define _RE_ARGS(args) () - -#endif /* not __STDC__ */ - -/* Sets the current default syntax to SYNTAX, and return the old syntax. - You can also simply assign to the `re_syntax_options' variable. */ -extern reg_syntax_t re_set_syntax _RE_ARGS ((reg_syntax_t syntax)); - -/* Compile the regular expression PATTERN, with length LENGTH - and syntax given by the global `re_syntax_options', into the buffer - BUFFER. Return NULL if successful, and an error string if not. */ -extern const char *re_compile_pattern - _RE_ARGS ((const char *pattern, size_t length, - struct re_pattern_buffer *buffer)); - - -/* Compile a fastmap for the compiled pattern in BUFFER; used to - accelerate searches. Return 0 if successful and -2 if was an - internal error. */ -extern int re_compile_fastmap _RE_ARGS ((struct re_pattern_buffer *buffer)); - - -/* Search in the string STRING (with length LENGTH) for the pattern - compiled into BUFFER. Start searching at position START, for RANGE - characters. Return the starting position of the match, -1 for no - match, or -2 for an internal error. Also return register - information in REGS (if REGS and BUFFER->no_sub are nonzero). */ -extern int re_search - _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string, - int length, int start, int range, struct re_registers *regs)); - - -/* Like `re_search', but search in the concatenation of STRING1 and - STRING2. Also, stop searching at index START + STOP. */ -extern int re_search_2 - _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string1, - int length1, const char *string2, int length2, - int start, int range, struct re_registers *regs, int stop)); - - -/* Like `re_search', but return how many characters in STRING the regexp - in BUFFER matched, starting at position START. */ -extern int re_match - _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string, - int length, int start, struct re_registers *regs)); - - -/* Relates to `re_match' as `re_search_2' relates to `re_search'. */ -extern int re_match_2 - _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string1, - int length1, const char *string2, int length2, - int start, struct re_registers *regs, int stop)); - - -/* Set REGS to hold NUM_REGS registers, storing them in STARTS and - ENDS. Subsequent matches using BUFFER and REGS will use this memory - for recording register information. STARTS and ENDS must be - allocated with malloc, and must each be at least `NUM_REGS * sizeof - (regoff_t)' bytes long. - - If NUM_REGS == 0, then subsequent matches should allocate their own - register data. - - Unless this function is called, the first search or match using - PATTERN_BUFFER will allocate its own register data, without - freeing the old data. */ -extern void re_set_registers - _RE_ARGS ((struct re_pattern_buffer *buffer, struct re_registers *regs, - unsigned num_regs, regoff_t *starts, regoff_t *ends)); - -#if defined _REGEX_RE_COMP || defined _LIBC -# ifndef _CRAY -/* 4.2 bsd compatibility. */ -extern char *re_comp _RE_ARGS ((const char *)); -extern int re_exec _RE_ARGS ((const char *)); -# endif -#endif - -/* GCC 2.95 and later have "__restrict"; C99 compilers have - "restrict", and "configure" may have defined "restrict". */ -#ifndef __restrict -# if ! (2 < __GNUC__ || (2 == __GNUC__ && 95 <= __GNUC_MINOR__)) -# if defined restrict || 199901L <= __STDC_VERSION__ -# define __restrict restrict -# else -# define __restrict -# endif -# endif -#endif - -/* GCC 3.1 and later support declaring arrays as non-overlapping - using the syntax array_name[restrict] */ -#ifndef __restrict_arr -# if ! (3 < __GNUC__ || (3 == __GNUC__ && 1 <= __GNUC_MINOR__)) || defined (__GNUG__) -# define __restrict_arr -# else -# define __restrict_arr __restrict -# endif -#endif - -/* POSIX compatibility. */ -extern int regcomp _RE_ARGS ((regex_t *__restrict __preg, - const char *__restrict __pattern, - int __cflags)); - -extern int regexec _RE_ARGS ((const regex_t *__restrict __preg, - const char *__restrict __string, size_t __nmatch, - regmatch_t __pmatch[__restrict_arr], - int __eflags)); - -extern size_t regerror _RE_ARGS ((int __errcode, const regex_t *__preg, - char *__errbuf, size_t __errbuf_size)); - -extern void regfree _RE_ARGS ((regex_t *__preg)); - - -#ifdef __cplusplus -} -#endif /* C++ */ - -#endif /* regex.h */ - -/* -Local variables: -make-backup-files: t -version-control: t -trim-versions-without-asking: nil -End: -*/ diff --git a/contrib/gcc/install-sh b/contrib/gcc/install-sh deleted file mode 100755 index 59bcde4..0000000 --- a/contrib/gcc/install-sh +++ /dev/null @@ -1,251 +0,0 @@ -#!/bin/sh -# -# install - install a program, script, or datafile -# This comes from X11R5 (mit/util/scripts/install.sh). -# -# Copyright 1991 by the Massachusetts Institute of Technology -# -# Permission to use, copy, modify, distribute, and sell this software and its -# documentation for any purpose is hereby granted without fee, provided that -# the above copyright notice appear in all copies and that both that -# copyright notice and this permission notice appear in supporting -# documentation, and that the name of M.I.T. not be used in advertising or -# publicity pertaining to distribution of the software without specific, -# written prior permission. M.I.T. makes no representations about the -# suitability of this software for any purpose. It is provided "as is" -# without express or implied warranty. -# -# Calling this script install-sh is preferred over install.sh, to prevent -# `make' implicit rules from creating a file called install from it -# when there is no Makefile. -# -# This script is compatible with the BSD install script, but was written -# from scratch. It can only install one file at a time, a restriction -# shared with many OS's install programs. - - -# set DOITPROG to echo to test this script - -# Don't use :- since 4.3BSD and earlier shells don't like it. -doit="${DOITPROG-}" - - -# put in absolute paths if you don't have them in your path; or use env. vars. - -mvprog="${MVPROG-mv}" -cpprog="${CPPROG-cp}" -chmodprog="${CHMODPROG-chmod}" -chownprog="${CHOWNPROG-chown}" -chgrpprog="${CHGRPPROG-chgrp}" -stripprog="${STRIPPROG-strip}" -rmprog="${RMPROG-rm}" -mkdirprog="${MKDIRPROG-mkdir}" - -transformbasename="" -transform_arg="" -instcmd="$mvprog" -chmodcmd="$chmodprog 0755" -chowncmd="" -chgrpcmd="" -stripcmd="" -rmcmd="$rmprog -f" -mvcmd="$mvprog" -src="" -dst="" -dir_arg="" - -while [ x"$1" != x ]; do - case $1 in - -c) instcmd="$cpprog" - shift - continue;; - - -d) dir_arg=true - shift - continue;; - - -m) chmodcmd="$chmodprog $2" - shift - shift - continue;; - - -o) chowncmd="$chownprog $2" - shift - shift - continue;; - - -g) chgrpcmd="$chgrpprog $2" - shift - shift - continue;; - - -s) stripcmd="$stripprog" - shift - continue;; - - -t=*) transformarg=`echo $1 | sed 's/-t=//'` - shift - continue;; - - -b=*) transformbasename=`echo $1 | sed 's/-b=//'` - shift - continue;; - - *) if [ x"$src" = x ] - then - src=$1 - else - # this colon is to work around a 386BSD /bin/sh bug - : - dst=$1 - fi - shift - continue;; - esac -done - -if [ x"$src" = x ] -then - echo "install: no input file specified" - exit 1 -else - true -fi - -if [ x"$dir_arg" != x ]; then - dst=$src - src="" - - if [ -d $dst ]; then - instcmd=: - chmodcmd="" - else - instcmd=mkdir - fi -else - -# Waiting for this to be detected by the "$instcmd $src $dsttmp" command -# might cause directories to be created, which would be especially bad -# if $src (and thus $dsttmp) contains '*'. - - if [ -f $src -o -d $src ] - then - true - else - echo "install: $src does not exist" - exit 1 - fi - - if [ x"$dst" = x ] - then - echo "install: no destination specified" - exit 1 - else - true - fi - -# If destination is a directory, append the input filename; if your system -# does not like double slashes in filenames, you may need to add some logic - - if [ -d $dst ] - then - dst="$dst"/`basename $src` - else - true - fi -fi - -## this sed command emulates the dirname command -dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` - -# Make sure that the destination directory exists. -# this part is taken from Noah Friedman's mkinstalldirs script - -# Skip lots of stat calls in the usual case. -if [ ! -d "$dstdir" ]; then -defaultIFS=' -' -IFS="${IFS-${defaultIFS}}" - -oIFS="${IFS}" -# Some sh's can't handle IFS=/ for some reason. -IFS='%' -set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` -IFS="${oIFS}" - -pathcomp='' - -while [ $# -ne 0 ] ; do - pathcomp="${pathcomp}${1}" - shift - - if [ ! -d "${pathcomp}" ] ; - then - $mkdirprog "${pathcomp}" - else - true - fi - - pathcomp="${pathcomp}/" -done -fi - -if [ x"$dir_arg" != x ] -then - $doit $instcmd $dst && - - if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi -else - -# If we're going to rename the final executable, determine the name now. - - if [ x"$transformarg" = x ] - then - dstfile=`basename $dst` - else - dstfile=`basename $dst $transformbasename | - sed $transformarg`$transformbasename - fi - -# don't allow the sed command to completely eliminate the filename - - if [ x"$dstfile" = x ] - then - dstfile=`basename $dst` - else - true - fi - -# Make a temp file name in the proper directory. - - dsttmp=$dstdir/_inst.$$_ - -# Move or copy the file name to the temp name - - $doit $instcmd $src $dsttmp && - - trap "rm -f ${dsttmp}" 0 && - -# and set any options; do chmod last to preserve setuid bits - -# If any of these fail, we abort the whole thing. If we want to -# ignore errors from any of these, just make sure not to ignore -# errors from the above "$doit $instcmd $src $dsttmp" command. - - if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && - -# Now rename the file to the real destination. - - $doit $rmcmd -f $dstdir/$dstfile && - $doit $mvcmd $dsttmp $dstdir/$dstfile - -fi && - - -exit 0 diff --git a/contrib/gcc/libtool.m4 b/contrib/gcc/libtool.m4 deleted file mode 100644 index aa7e62a..0000000 --- a/contrib/gcc/libtool.m4 +++ /dev/null @@ -1,854 +0,0 @@ -## libtool.m4 - Configure libtool for the host system. -*-Shell-script-*- -## Copyright 1996, 1997, 1998, 1999, 2000, 2001 -## Free Software Foundation, Inc. -## Originally by Gordon Matzigkeit , 1996 -## -## 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 of the License, 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 to the GNU General Public License, if you -## distribute this file as part of a program that contains a -## configuration script generated by Autoconf, you may include it under -## the same distribution terms that you use for the rest of that program. - -# serial 46 AC_PROG_LIBTOOL -AC_DEFUN([AC_PROG_LIBTOOL], -[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl -dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX -dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. - AC_PROVIDE_IFELSE([AC_PROG_CXX], - [AC_LIBTOOL_CXX], - [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX -])]) - -dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. -dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run -dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. - AC_PROVIDE_IFELSE([AC_PROG_GCJ], - [AC_LIBTOOL_GCJ], - [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], - [AC_LIBTOOL_GCJ], - [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], - [AC_LIBTOOL_GCJ], - [ifdef([AC_PROG_GCJ], - [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ -])]) - ifdef([A][M_PROG_GCJ], - [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ -])]) - ifdef([LT_AC_PROG_GCJ], - [define([LT_AC_PROG_GCJ], defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ -])])])])])]) - -AC_DEFUN([_AC_PROG_LIBTOOL], -[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl -AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl -AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl - -# Save cache, so that ltconfig can load it -AC_CACHE_SAVE - -# Actually configure libtool. ac_aux_dir is where install-sh is found. -AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \ -MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \ -LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \ -AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \ -objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \ -deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \ -${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \ -$libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \ -|| AC_MSG_ERROR([libtool configure failed]) - -# Reload cache, that may have been modified by ltconfig -AC_CACHE_LOAD - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' -AC_SUBST(LIBTOOL)dnl - -# Redirect the config.log output again, so that the ltconfig log is not -# clobbered by the next message. -exec 5>>./config.log -]) - -AC_DEFUN([AC_LIBTOOL_SETUP], -[AC_PREREQ(2.13)dnl -AC_REQUIRE([AC_ENABLE_SHARED])dnl -AC_REQUIRE([AC_ENABLE_STATIC])dnl -AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_PROG_LD])dnl -AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl -AC_REQUIRE([AC_PROG_NM])dnl -AC_REQUIRE([AC_PROG_LN_S])dnl -AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl -# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! -AC_REQUIRE([AC_OBJEXT])dnl -AC_REQUIRE([AC_EXEEXT])dnl -dnl - -# Only perform the check for file, if the check method requires it -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - AC_PATH_MAGIC - fi - ;; -esac - -AC_CHECK_TOOL(RANLIB, ranlib, :) -AC_CHECK_TOOL(STRIP, strip, :) - -# Check for any special flags to pass to ltconfig. -libtool_flags="--cache-file=$cache_file" -test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared" -test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static" -test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install" -test "$GCC" = yes && libtool_flags="$libtool_flags --with-gcc" -test "$lt_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld" -ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], -[libtool_flags="$libtool_flags --enable-dlopen"]) -ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], -[libtool_flags="$libtool_flags --enable-win32-dll"]) -AC_ARG_ENABLE(libtool-lock, - [ --disable-libtool-lock avoid locking (might break parallel builds)]) -test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock" -test x"$silent" = xyes && libtool_flags="$libtool_flags --silent" - -AC_ARG_WITH(pic, - [ --with-pic try to use only PIC/non-PIC objects [default=use both]], - pic_mode="$withval", pic_mode=default) -test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic" -test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic" - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -*-*-irix6*) - # Find out which ABI we are using. - echo '[#]line __oline__ "configure"' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, - [AC_LANG_SAVE - AC_LANG_C - AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) - AC_LANG_RESTORE]) - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" - fi - ;; - -ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], -[*-*-cygwin* | *-*-mingw* | *-*-pw32*) - AC_CHECK_TOOL(DLLTOOL, dlltool, false) - AC_CHECK_TOOL(AS, as, false) - AC_CHECK_TOOL(OBJDUMP, objdump, false) - - # recent cygwin and mingw systems supply a stub DllMain which the user - # can override, but on older systems we have to supply one - AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain, - [AC_TRY_LINK([], - [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*); - DllMain (0, 0, 0);], - [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])]) - - case $host/$CC in - *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*) - # old mingw systems require "-dll" to link a DLL, while more recent ones - # require "-mdll" - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -mdll" - AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch, - [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])]) - CFLAGS="$SAVE_CFLAGS" ;; - *-*-cygwin* | *-*-pw32*) - # cygwin systems need to pass --dll to the linker, and not link - # crt.o which will require a WinMain@16 definition. - lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;; - esac - ;; - ]) -esac -]) - -# AC_LIBTOOL_DLOPEN - enable checks for dlopen support -AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])]) - -# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's -AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])]) - -# AC_ENABLE_SHARED - implement the --enable-shared flag -# Usage: AC_ENABLE_SHARED[(DEFAULT)] -# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to -# `yes'. -AC_DEFUN([AC_ENABLE_SHARED], -[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl -AC_ARG_ENABLE(shared, -changequote(<<, >>)dnl -<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT], -changequote([, ])dnl -[p=${PACKAGE-default} -case $enableval in -yes) enable_shared=yes ;; -no) enable_shared=no ;; -*) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," - for pkg in $enableval; do - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS="$ac_save_ifs" - ;; -esac], -enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl -]) - -# AC_DISABLE_SHARED - set the default shared flag to --disable-shared -AC_DEFUN([AC_DISABLE_SHARED], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -AC_ENABLE_SHARED(no)]) - -# AC_ENABLE_STATIC - implement the --enable-static flag -# Usage: AC_ENABLE_STATIC[(DEFAULT)] -# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to -# `yes'. -AC_DEFUN([AC_ENABLE_STATIC], -[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl -AC_ARG_ENABLE(static, -changequote(<<, >>)dnl -<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT], -changequote([, ])dnl -[p=${PACKAGE-default} -case $enableval in -yes) enable_static=yes ;; -no) enable_static=no ;; -*) - enable_static=no - # Look at the argument we got. We use all the common list separators. - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," - for pkg in $enableval; do - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$ac_save_ifs" - ;; -esac], -enable_static=AC_ENABLE_STATIC_DEFAULT)dnl -]) - -# AC_DISABLE_STATIC - set the default static flag to --disable-static -AC_DEFUN([AC_DISABLE_STATIC], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -AC_ENABLE_STATIC(no)]) - - -# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag -# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)] -# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to -# `yes'. -AC_DEFUN([AC_ENABLE_FAST_INSTALL], -[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl -AC_ARG_ENABLE(fast-install, -changequote(<<, >>)dnl -<< --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT], -changequote([, ])dnl -[p=${PACKAGE-default} -case $enableval in -yes) enable_fast_install=yes ;; -no) enable_fast_install=no ;; -*) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," - for pkg in $enableval; do - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$ac_save_ifs" - ;; -esac], -enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl -]) - -# AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install -AC_DEFUN([AC_DISABLE_FAST_INSTALL], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -AC_ENABLE_FAST_INSTALL(no)]) - -# AC_LIBTOOL_PICMODE - implement the --with-pic flag -# Usage: AC_LIBTOOL_PICMODE[(MODE)] -# Where MODE is either `yes' or `no'. If omitted, it defaults to -# `both'. -AC_DEFUN([AC_LIBTOOL_PICMODE], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -pic_mode=ifelse($#,1,$1,default)]) - - -# AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library -AC_DEFUN([AC_PATH_TOOL_PREFIX], -[AC_MSG_CHECKING([for $1]) -AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, -[case $MAGIC_CMD in - /*) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; - ?:/*) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path. - ;; - *) - ac_save_MAGIC_CMD="$MAGIC_CMD" - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" -dnl $ac_dummy forces splitting on constant user-supplied paths. -dnl POSIX.2 word splitting is done only on the output of word expansions, -dnl not every word. This closes a longstanding sh security hole. - ac_dummy="ifelse([$2], , $PATH, [$2])" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$1; then - lt_cv_path_MAGIC_CMD="$ac_dir/$1" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - egrep "$file_magic_regex" > /dev/null; then - : - else - cat <&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -EOF - fi ;; - esac - fi - break - fi - done - IFS="$ac_save_ifs" - MAGIC_CMD="$ac_save_MAGIC_CMD" - ;; -esac]) -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - AC_MSG_RESULT($MAGIC_CMD) -else - AC_MSG_RESULT(no) -fi -]) - - -# AC_PATH_MAGIC - find a file program which can recognise a shared library -AC_DEFUN([AC_PATH_MAGIC], -[AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl -AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH) -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH) - else - MAGIC_CMD=: - fi -fi -]) - - -# AC_PROG_LD - find the path to the GNU or non-GNU linker -AC_DEFUN([AC_PROG_LD], -[AC_ARG_WITH(gnu-ld, -[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], -test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - AC_MSG_CHECKING([for ld used by GCC]) - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [[\\/]* | [A-Za-z]:[\\/]*)] - re_direlt=['/[^/][^/]*/\.\./'] - # Canonicalize the path of ld - ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` - while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do - ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - AC_MSG_CHECKING([for GNU ld]) -else - AC_MSG_CHECKING([for non-GNU ld]) -fi -AC_CACHE_VAL(lt_cv_path_LD, -[if test -z "$LD"; then - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some GNU ld's only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then - test "$with_gnu_ld" != no && break - else - test "$with_gnu_ld" != yes && break - fi - fi - done - IFS="$ac_save_ifs" -else - lt_cv_path_LD="$LD" # Let the user override the test with a path. -fi]) -LD="$lt_cv_path_LD" -if test -n "$LD"; then - AC_MSG_RESULT($LD) -else - AC_MSG_RESULT(no) -fi -test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) -AC_PROG_LD_GNU -]) - -AC_DEFUN([AC_PROG_LD_GNU], -[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, -[# I'd rather use --version here, but apparently some GNU ld's only accept -v. -if $LD -v 2>&1 &5; then - lt_cv_prog_gnu_ld=yes -else - lt_cv_prog_gnu_ld=no -fi]) -with_gnu_ld=$lt_cv_prog_gnu_ld -]) - -# AC_PROG_LD_RELOAD_FLAG - find reload flag for linker -# -- PORTME Some linkers may need a different reload flag. -AC_DEFUN([AC_PROG_LD_RELOAD_FLAG], -[AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag, -[lt_cv_ld_reload_flag='-r']) -reload_flag=$lt_cv_ld_reload_flag -test -n "$reload_flag" && reload_flag=" $reload_flag" -]) - -# AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies -# -- PORTME fill in with the dynamic library characteristics -AC_DEFUN([AC_DEPLIBS_CHECK_METHOD], -[AC_CACHE_CHECK([how to recognise dependant libraries], -lt_cv_deplibs_check_method, -[lt_cv_file_magic_cmd='$MAGIC_CMD' -lt_cv_file_magic_test_file= -lt_cv_deplibs_check_method='unknown' -# Need to set the preceding variable on all platforms that support -# interlibrary dependencies. -# 'none' -- dependencies not supported. -# `unknown' -- same as none, but documents that we really don't know. -# 'pass_all' -- all dependencies passed with no checks. -# 'test_compile' -- check by making test program. -# 'file_magic [regex]' -- check by looking for files in library path -# which responds to the $file_magic_cmd with a given egrep regex. -# If you have `file' or equivalent on your system and you're not sure -# whether `pass_all' will *always* work, you probably want this one. - -case $host_os in -aix*) - lt_cv_deplibs_check_method=pass_all - ;; - -beos*) - lt_cv_deplibs_check_method=pass_all - ;; - -bsdi4*) - lt_cv_deplibs_check_method=['file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'] - lt_cv_file_magic_cmd='/usr/bin/file -L' - lt_cv_file_magic_test_file=/shlib/libc.so - ;; - -cygwin* | mingw* |pw32*) - lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - ;; - -darwin* | rhapsody*) - lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library' - lt_cv_file_magic_cmd='/usr/bin/file -L' - case "$host_os" in - rhapsody* | darwin1.[012]) - lt_cv_file_magic_test_file='/System/Library/Frameworks/System.framework/System' - ;; - *) # Darwin 1.3 on - lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib' - ;; - esac - ;; - -freebsd* ) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method=['file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'] - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all - fi - ;; - -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - -hpux10.20*|hpux11*) - lt_cv_deplibs_check_method=['file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'] - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - -irix5* | irix6*) - case $host_os in - irix5*) - # this will be overridden with pass_all, but let us keep it just in case - lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1" - ;; - *) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - # this will be overridden with pass_all, but let us keep it just in case - lt_cv_deplibs_check_method=["file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"] - ;; - esac - lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*` - lt_cv_deplibs_check_method=pass_all - ;; - -# This must be Linux ELF. -linux-gnu*) - case $host_cpu in - alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* ) - lt_cv_deplibs_check_method=pass_all ;; - *) - # glibc up to 2.1.1 does not perform some relocations on ARM - lt_cv_deplibs_check_method=['file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'] ;; - esac - lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` - ;; - -netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then - [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'] - else - [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'] - fi - ;; - -newsos6) - [lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'] - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; - -osf3* | osf4* | osf5*) - # this will be overridden with pass_all, but let us keep it just in case - lt_cv_deplibs_check_method='file_magic COFF format alpha shared library' - lt_cv_file_magic_test_file=/shlib/libc.so - lt_cv_deplibs_check_method=pass_all - ;; - -sco3.2v5*) - lt_cv_deplibs_check_method=pass_all - ;; - -solaris*) - lt_cv_deplibs_check_method=pass_all - lt_cv_file_magic_test_file=/lib/libc.so - ;; - -[sysv5uw[78]* | sysv4*uw2*)] - lt_cv_deplibs_check_method=pass_all - ;; - -sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - case $host_vendor in - ncr) - lt_cv_deplibs_check_method=pass_all - ;; - motorola) - lt_cv_deplibs_check_method=['file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'] - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - esac - ;; -esac -]) -file_magic_cmd=$lt_cv_file_magic_cmd -deplibs_check_method=$lt_cv_deplibs_check_method -]) - - -# AC_PROG_NM - find the path to a BSD-compatible name lister -AC_DEFUN([AC_PROG_NM], -[AC_MSG_CHECKING([for BSD-compatible nm]) -AC_CACHE_VAL(lt_cv_path_NM, -[if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" - for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do - test -z "$ac_dir" && ac_dir=. - tmp_nm=$ac_dir/${ac_tool_prefix}nm - if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then - lt_cv_path_NM="$tmp_nm -B" - break - elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then - lt_cv_path_NM="$tmp_nm -p" - break - else - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - fi - fi - done - IFS="$ac_save_ifs" - test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm -fi]) -NM="$lt_cv_path_NM" -AC_MSG_RESULT([$NM]) -]) - -# AC_CHECK_LIBM - check for math library -AC_DEFUN([AC_CHECK_LIBM], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -LIBM= -case $host in -*-*-beos* | *-*-cygwin* | *-*-pw32*) - # These system don't have libm - ;; -*-ncr-sysv4.3*) - AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") - AC_CHECK_LIB(m, main, LIBM="$LIBM -lm") - ;; -*) - AC_CHECK_LIB(m, main, LIBM="-lm") - ;; -esac -]) - -# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for -# the libltdl convenience library and INCLTDL to the include flags for -# the libltdl header and adds --enable-ltdl-convenience to the -# configure arguments. Note that LIBLTDL and INCLTDL are not -# AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not -# provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed -# with '${top_builddir}/' and INCLTDL will be prefixed with -# '${top_srcdir}/' (note the single quotes!). If your package is not -# flat and you're not using automake, define top_builddir and -# top_srcdir appropriately in the Makefiles. -AC_DEFUN([AC_LIBLTDL_CONVENIENCE], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl - case $enable_ltdl_convenience in - no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; - "") enable_ltdl_convenience=yes - ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; - esac - LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la - INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) -]) - -# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for -# the libltdl installable library and INCLTDL to the include flags for -# the libltdl header and adds --enable-ltdl-install to the configure -# arguments. Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is -# AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed -# libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will -# be prefixed with '${top_builddir}/' and INCLTDL will be prefixed -# with '${top_srcdir}/' (note the single quotes!). If your package is -# not flat and you're not using automake, define top_builddir and -# top_srcdir appropriately in the Makefiles. -# In the future, this macro may have to be called after AC_PROG_LIBTOOL. -AC_DEFUN([AC_LIBLTDL_INSTALLABLE], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl - AC_CHECK_LIB(ltdl, main, - [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], - [if test x"$enable_ltdl_install" = xno; then - AC_MSG_WARN([libltdl not installed, but installation disabled]) - else - enable_ltdl_install=yes - fi - ]) - if test x"$enable_ltdl_install" = x"yes"; then - ac_configure_args="$ac_configure_args --enable-ltdl-install" - LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la - INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) - else - ac_configure_args="$ac_configure_args --enable-ltdl-install=no" - LIBLTDL="-lltdl" - INCLTDL= - fi -]) - -# If this macro is not defined by Autoconf, define it here. -ifdef([AC_PROVIDE_IFELSE], - [], - [define([AC_PROVIDE_IFELSE], - [ifdef([AC_PROVIDE_$1], - [$2], [$3])])]) - -# AC_LIBTOOL_CXX - enable support for C++ libraries -AC_DEFUN([AC_LIBTOOL_CXX], [AC_REQUIRE([_AC_LIBTOOL_CXX])]) - -AC_DEFUN([_AC_LIBTOOL_CXX], -[AC_REQUIRE([AC_PROG_CXX]) -AC_REQUIRE([AC_PROG_CXXCPP]) -LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-cxx.sh" -lt_save_CC="$CC" -lt_save_CFLAGS="$CFLAGS" -dnl Make sure LTCC is set to the C compiler, i.e. set LTCC before CC -dnl is set to the C++ compiler. -AR="$AR" LTCC="$CC" CC="$CXX" CXX="$CXX" CFLAGS="$CXXFLAGS" CPPFLAGS="$CPPFLAGS" \ -MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \ -LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \ -AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \ -objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \ -deplibs_check_method="$deplibs_check_method" \ -file_magic_cmd="$file_magic_cmd" \ -${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \ ---build="$build" --add-tag=CXX $ac_aux_dir/ltcf-cxx.sh $host \ -|| AC_MSG_ERROR([libtool tag configuration failed]) -CC="$lt_save_CC" -CFLAGS="$lt_save_CFLAGS" - -# Redirect the config.log output again, so that the ltconfig log is not -# clobbered by the next message. -exec 5>>./config.log -]) - -# AC_LIBTOOL_GCJ - enable support for GCJ libraries -AC_DEFUN([AC_LIBTOOL_GCJ],[AC_REQUIRE([_AC_LIBTOOL_GCJ])]) - -AC_DEFUN([_AC_LIBTOOL_GCJ], -[AC_REQUIRE([AC_PROG_LIBTOOL]) -AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], - [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], - [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], - [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], - [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], - [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) -LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-gcj.sh" -lt_save_CC="$CC" -lt_save_CFLAGS="$CFLAGS" -dnl Make sure LTCC is set to the C compiler, i.e. set LTCC before CC -dnl is set to the C++ compiler. -AR="$AR" LTCC="$CC" CC="$GCJ" CFLAGS="$GCJFLAGS" CPPFLAGS="$CPPFLAGS" \ -MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \ -LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \ -AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \ -objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \ -deplibs_check_method="$deplibs_check_method" \ -file_magic_cmd="$file_magic_cmd" \ -${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \ ---build="$build" --add-tag=GCJ $ac_aux_dir/ltcf-gcj.sh $host \ -|| AC_MSG_ERROR([libtool tag configuration failed]) -CC="$lt_save_CC" -CFLAGS="$lt_save_CFLAGS" - -# Redirect the config.log output again, so that the ltconfig log is not -# clobbered by the next message. -exec 5>>./config.log -]) - -dnl old names -AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) -AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) -AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) -AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) -AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) -AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) -AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) - -dnl This is just to silence aclocal about the macro not being used -ifelse([AC_DISABLE_FAST_INSTALL])dnl - -AC_DEFUN([LT_AC_PROG_GCJ], -[AC_CHECK_TOOL(GCJ, gcj, no) - test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" - AC_SUBST(GCJFLAGS) -]) diff --git a/contrib/gcc/ltcf-c.sh b/contrib/gcc/ltcf-c.sh deleted file mode 100644 index f11a0cf..0000000 --- a/contrib/gcc/ltcf-c.sh +++ /dev/null @@ -1,815 +0,0 @@ -#### This script is meant to be sourced by ltconfig. - -# ltcf-c.sh - Create a C compiler specific configuration -# -# Copyright (C) 1996-2000, 2001 Free Software Foundation, Inc. -# Originally by Gordon Matzigkeit , 1996 -# -# 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 of the License, 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 to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Source file extension for C test sources. -ac_ext=c - -# Object file extension for compiled C test sources. -objext=o - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='main(){return(0);}' - -## Linker Characteristics -case $host_os in -cygwin* | mingw*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$with_gcc" != yes; then - with_gnu_ld=no - fi - ;; - -esac - -ld_shlibs=yes -if test "$with_gnu_ld" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' - - # See if GNU ld supports shared libraries. - case $host_os in - aix3* | aix4* | aix5*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - ld_shlibs=no - cat <&2 - -*** Warning: the GNU linker, at least up to release 2.9.1, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to modify your PATH -*** so that a non-GNU linker is found, and then restart. - -EOF - fi - ;; - - amigaos*) - archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - - # Samuel A. Falvo II reports - # that the semantics of dynamic libraries on AmigaOS, at least up - # to version 4, is to share data among multiple programs linked - # with the same dynamic library. Since this doesn't match the - # behavior of shared libraries on other platforms, we can use - # them. - ld_shlibs=no - ;; - - beos*) - if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - ld_shlibs=no - fi - ;; - - cygwin* | mingw*) - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - hardcode_libdir_flag_spec='-L$libdir' - allow_undefined_flag=unsupported - always_export_symbols=yes - - extract_expsyms_cmds='test -f $output_objdir/impgen.c || \ - sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //; p; }" -e d < $0 > $output_objdir/impgen.c~ - test -f $output_objdir/impgen.exe || (cd $output_objdir && \ - if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \ - else $CC -o impgen impgen.c ; fi)~ - $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def' - - old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib' - - # cygwin and mingw dlls have different entry points and sets of symbols - # to exclude. - # FIXME: what about values for MSVC? - dll_entry=__cygwin_dll_entry@12 - dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~ - case $host_os in - mingw*) - # mingw values - dll_entry=_DllMainCRTStartup@12 - dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~ - ;; - esac - - # mingw and cygwin differ, and it's simplest to just exclude the union - # of the two symbol sets. - dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12 - - # recent cygwin and mingw systems supply a stub DllMain which the user - # can override, but on older systems we have to supply one (in ltdll.c) - if test "x$lt_cv_need_dllmain" = "xyes"; then - ltdll_obj='$output_objdir/$soname-ltdll.'"$objext " - ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $output_objdir/$soname-ltdll.c~ - test -f $output_objdir/$soname-ltdll.$objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~' - else - ltdll_obj= - ltdll_cmds= - fi - - # Extract the symbol export list from an `--export-all' def file, - # then regenerate the def file from the symbol export list, so that - # the compiled dll only exports the symbol export list. - # Be careful not to strip the DATA tag left be newer dlltools. - export_symbols_cmds="$ltdll_cmds"' - $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~ - sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols' - - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is. - # If DATA tags from a recent dlltool are present, honour them! - archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname-def; - else - echo EXPORTS > $output_objdir/$soname-def; - _lt_hint=1; - cat $export_symbols | while read symbol; do - set dummy \$symbol; - case \[$]# in - 2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;; - *) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;; - esac; - _lt_hint=`expr 1 + \$_lt_hint`; - done; - fi~ - '"$ltdll_cmds"' - $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~ - $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~ - $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~ - $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~ - $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags' - ;; - - darwin* | rhapsody*) - allow_undefined_flag='-undefined suppress' - archive_cmds='$CC `test .$module = .yes && echo -bundle || echo -dynamiclib` $allow_undefined_flag -o $lib $libobjs $deplibs $linkopts -install_name $rpath/$soname `test -n "$verstring" -a x$verstring != x0.0 && echo $verstring`' - # We need to add '_' to the symbols in $export_symbols first - #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols' - hardcode_direct=yes - hardcode_shlibpath_var=no - whole_archive_flag_spec='-all_load $convenience' - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris* | sysv5*) - if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then - ld_shlibs=no - cat <&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -EOF - elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - - sunos4*) - archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - *) - if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - - if test "$ld_shlibs" = yes; then - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec='${wl}--export-dynamic' - case $host_os in - cygwin* | mingw*) - # dlltool doesn't understand --whole-archive et. al. - whole_archive_flag_spec= - ;; - *) - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec= - fi - ;; - esac - fi -else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - allow_undefined_flag=unsupported - always_export_symbols=yes - archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - hardcode_minus_L=yes - if test "$with_gcc" = yes && test -z "$link_static_flag"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - hardcode_direct=unsupported - fi - ;; - - aix4* | aix5*) - hardcode_direct=yes - hardcode_libdir_separator=':' - link_all_deplibs=yes - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - if test "$with_gcc" = yes; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && \ - strings "$collect2name" | grep resolve_lib_name >/dev/null - then - # We have reworked collect2 - hardcode_direct=yes - else - # We have old collect2 - hardcode_direct=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L=yes - hardcode_libdir_flag_spec='-L$libdir' - hardcode_libdir_separator= - fi - esac - shared_flag='-shared' - else - # not using gcc - if test "$host_cpu" = ia64; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - if test $with_gnu_ld = no; then - exp_sym_flag='-Bexport' - no_entry_flag="" - fi - else - # Test if we are trying to use run time linking, or normal AIX style linking. - # If -brtl is somewhere in LDFLAGS, we need to do run time linking. - aix_use_runtimelinking=no - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl" ); then - aix_use_runtimelinking=yes - break - fi - done - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - # -bexpall does not export symbols beginning with underscore (_) - always_export_symbols=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other run time loading flags (-brtl), -berok will - # link without error, but may produce a broken library. - allow_undefined_flag=' ${wl}-berok' - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib' - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" - else - if test "$host_cpu" = ia64; then - if test $with_gnu_ld = no; then - hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' - allow_undefined_flag="-z nodefs" - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" - fi - else - allow_undefined_flag=' ${wl}-berok' - # -bexpall does not export symbols beginning with underscore (_) - always_export_symbols=yes - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec=' ' - build_libtool_need_lc=yes - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib' - # This is similar to how AIX traditionally builds it's shared libraries. - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - amigaos*) - archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - # see comment about different semantics on the GNU ld section - ld_shlibs=no - ;; - - cygwin* | mingw*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_from_new_cmds='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path='`cygpath -w "$srcfile"`' - ;; - - freebsd1*) - ld_shlibs=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd*) - archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - hpux9* | hpux10* | hpux11*) - if test $with_gcc = yes; then - case "$host_os" in - hpux9*) archive_cmds='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;; - *) archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; - esac - else - case $host_os in - hpux9*) archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;; - *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;; - esac - fi - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - hardcode_minus_L=yes # Not in the search PATH, but as the default - # location of the library. - export_dynamic_flag_spec='${wl}-E' - ;; - - irix5* | irix6*) - if test "$with_gcc" = yes; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' - else - archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' - fi - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - link_all_deplibs=yes - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - newsos6) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' - hardcode_direct=yes - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_shlibpath_var=no - ;; - - openbsd*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - os2*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - allow_undefined_flag=unsupported - archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - - osf3*) - if test "$with_gcc" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' - fi - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$with_gcc" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' - archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ - $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp' - - # cc supports -rpath directly - hardcode_libdir_flag_spec='-rpath $libdir' - fi - hardcode_libdir_separator=: - ;; - - sco3.2v5*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ;; - - solaris*) - no_undefined_flag=' -z defs' - if test "$with_gcc" = yes; then - archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' - else - archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_shlibpath_var=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) # Supported since Solaris 2.6 (maybe 2.5.1?) - whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; - esac - link_all_deplibs=yes - ;; - - sunos4*) - archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - sysv4) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var=no - hardcode_direct=no #Motorola manual says yes, but my tests say they lie - ;; - - sysv4.3*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - export_dynamic_flag_spec='-Bexport' - ;; - - sysv5*) - no_undefined_flag=' -z text' - # $CC -shared without GNU ld will not create a library from C++ - # object files and a static libstdc++, better avoid it by now - archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' - hardcode_libdir_flag_spec= - hardcode_shlibpath_var=no - runpath_var='LD_RUN_PATH' - ;; - - uts4*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - dgux*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - sysv4*MP*) - if test -d /usr/nec; then - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ld_shlibs=yes - fi - ;; - - sysv4.2uw2*) - archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_minus_L=no - hardcode_shlibpath_var=no - hardcode_runpath_var=yes - runpath_var=LD_RUN_PATH - ;; - - sysv5uw7* | unixware7*) - no_undefined_flag='${wl}-z ${wl}text' - if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var=no - ;; - - *) - ld_shlibs=no - ;; - esac -fi - -## Compiler Characteristics: PIC flags, static flags, etc -if test "X${ac_cv_prog_cc_pic+set}" = Xset; then - : -else - ac_cv_prog_cc_pic= - ac_cv_prog_cc_shlib= - ac_cv_prog_cc_wl= - ac_cv_prog_cc_static= - ac_cv_prog_cc_no_builtin= - ac_cv_prog_cc_can_build_shared=$can_build_shared - - if test "$with_gcc" = yes; then - ac_cv_prog_cc_wl='-Wl,' - ac_cv_prog_cc_static='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_cv_prog_cc_static='-Bstatic' - else - lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp' - fi - ;; - amigaos*) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - ac_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4' - ;; - beos* | irix5* | irix6* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - cygwin* | mingw* | os2*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - ac_cv_prog_cc_pic='-DDLL_EXPORT' - ;; - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_cv_prog_cc_pic='-fno-common' - ;; - *djgpp*) - # DJGPP does not support shared libraries at all - ac_cv_prog_cc_pic= - ;; - sysv4*MP*) - if test -d /usr/nec; then - ac_cv_prog_cc_pic=-Kconform_pic - fi - ;; - *) - ac_cv_prog_cc_pic='-fPIC' - ;; - esac - else - # PORTME Check for PIC flags for the system compiler. - case $host_os in - aix*) - # All AIX code is PIC. - ac_cv_prog_cc_static="$ac_cv_prog_cc_static ${ac_cv_prog_cc_wl}-lC" - ;; - - hpux9* | hpux10* | hpux11*) - # Is there a better ac_cv_prog_cc_static that works with the bundled CC? - ac_cv_prog_cc_wl='-Wl,' - ac_cv_prog_cc_static="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" - ac_cv_prog_cc_pic='+Z' - ;; - - irix5* | irix6*) - ac_cv_prog_cc_wl='-Wl,' - ac_cv_prog_cc_static='-non_shared' - # PIC (with -KPIC) is the default. - ;; - - cygwin* | mingw* | os2*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - ac_cv_prog_cc_pic='-DDLL_EXPORT' - ;; - - newsos6) - ac_cv_prog_cc_pic='-KPIC' - ac_cv_prog_cc_static='-Bstatic' - ;; - - osf3* | osf4* | osf5*) - # All OSF/1 code is PIC. - ac_cv_prog_cc_wl='-Wl,' - ac_cv_prog_cc_static='-non_shared' - ;; - - sco3.2v5*) - ac_cv_prog_cc_pic='-Kpic' - ac_cv_prog_cc_static='-dn' - ac_cv_prog_cc_shlib='-belf' - ;; - - solaris*) - ac_cv_prog_cc_pic='-KPIC' - ac_cv_prog_cc_static='-Bstatic' - ac_cv_prog_cc_wl='-Wl,' - ;; - - sunos4*) - ac_cv_prog_cc_pic='-PIC' - ac_cv_prog_cc_static='-Bstatic' - ac_cv_prog_cc_wl='-Qoption ld ' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - ac_cv_prog_cc_pic='-KPIC' - ac_cv_prog_cc_static='-Bstatic' - ac_cv_prog_cc_wl='-Wl,' - ;; - - uts4*) - ac_cv_prog_cc_pic='-pic' - ac_cv_prog_cc_static='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - ac_cv_prog_cc_pic='-Kconform_pic' - ac_cv_prog_cc_static='-Bstatic' - fi - ;; - - *) - ac_cv_prog_cc_can_build_shared=no - ;; - esac - fi - case "$host_os" in - # Platforms which do not suport PIC and -DPIC is meaningless - # on them: - *djgpp*) - ac_cv_prog_cc_pic= - ;; - *) - ac_cv_prog_cc_pic="$ac_cv_prog_cc_pic -DPIC" - ;; - esac -fi - -need_lc=yes -if test "$enable_shared" = yes && test "$with_gcc" = yes; then - case $archive_cmds in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - echo $ac_n "checking whether -lc should be explicitly linked in... $ac_c" 1>&6 - if eval "test \"`echo '$''{'ac_cv_archive_cmds_needs_lc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - need_lc=$ac_cv_archive_cmds_needs_lc - else - $rm conftest* - echo "static int dummy;" > conftest.$ac_ext - if { (eval echo ltcf-c.sh:need_lc: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; }; then - # Append any warnings to the config.log. - cat conftest.err 1>&5 - soname=conftest - lib=conftest - libobjs=conftest.$objext - deplibs= - wl=$ac_cv_prog_cc_wl - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - save_allow_undefined_flag=$allow_undefined_flag - allow_undefined_flag= - if { (eval echo ltcf-c.sh:need_lc: \"$archive_cmds\") 1>&5; (eval $archive_cmds) 2>&1 | grep " -lc " 1>&5 ; }; then - need_lc=no - fi - allow_undefined_flag=$save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - fi - $rm conftest* - echo "$ac_t$need_lc" 1>&6 - ;; - esac -fi -ac_cv_archive_cmds_needs_lc=$need_lc diff --git a/contrib/gcc/ltcf-cxx.sh b/contrib/gcc/ltcf-cxx.sh deleted file mode 100644 index 22875d0..0000000 --- a/contrib/gcc/ltcf-cxx.sh +++ /dev/null @@ -1,1005 +0,0 @@ -#### This script is meant to be sourced by ltconfig. - -# ltcf-cxx.sh - Create a C++ compiler specific configuration -# -# Copyright (C) 1996-1999, 2000, 2001 Free Software Foundation, Inc. -# Originally by Gordon Matzigkeit , 1996 -# -# Original C++ support by:Gary V. Vaughan -# Alexandre Oliva -# Ossama Othman -# Thomas Thanner -# -# 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 of the License, 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 to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Source file extension for C++ test sources. -ac_ext=cc - -# Object file extension for compiled C++ test sources. -objext=o - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(int, char *[]) { return (0); }' - -# C++ compiler -CXX=${CXX-c++} - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -CC=${CC-"$CXX"} -CFLAGS=${CFLAGS-"$CXXFLAGS"} - -# Allow CC to be a program name with arguments. -set dummy $CC -compiler=$2 -cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'` - -# Check if we are using GNU gcc (taken/adapted from configure script) -# We need to check here since "--with-gcc" is set at configure time, -# not ltconfig time! -cat > conftest.$ac_ext <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then - with_gcc=yes - - # Set up default GNU C++ configuration - - # Check if GNU C++ uses GNU ld as the underlying linker, since the - # archiving commands below assume that GNU ld is being used. - if eval "`$CC -print-prog-name=ld` --version 2>&1" | \ - egrep 'GNU ld' > /dev/null; then - with_gnu_ld=yes - - archive_cmds='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - - hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec='${wl}--export-dynamic' - - # If archive_cmds runs LD, not CC, wlarc should be empty - # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to - # investigate it a little bit more. (MM) - wlarc='${wl}' - - # ancient GNU ld didn't support --whole-archive et. al. - if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ - egrep 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec= - fi - else - with_gnu_ld=no - wlarc= - - # A generic and very simple default shared library creation - # command for GNU C++ for the case where it uses the native - # linker, instead of GNU ld. If possible, this setting should - # overridden to take advantage of the native linker features on - # the platform it is being used on. - archive_cmds='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - fi - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"' - -else - with_gcc=no - with_gnu_ld=no - wlarc= -fi - -# PORTME: fill in a description of your system's C++ link characteristics -case $host_os in - aix3*) - # FIXME: insert proper C++ library support - ld_shlibs=no - ;; - aix4* | aix5*) - archive_cmds='' - hardcode_direct=yes - hardcode_libdir_separator=':' - link_all_deplibs=yes - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - if test "$with_gcc" = yes; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && \ - strings "$collect2name" | grep resolve_lib_name >/dev/null - then - # We have reworked collect2 - hardcode_direct=yes - else - # We have old collect2 - hardcode_direct=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L=yes - hardcode_libdir_flag_spec='-L$libdir' - hardcode_libdir_separator= - fi - esac - shared_flag='-shared' - else - # not using gcc - if test "$host_cpu" = ia64; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - if test $with_gnu_ld = no; then - exp_sym_flag='-Bexport' - no_entry_flag="" - fi - else - # Test if we are trying to use run time linking, or normal AIX style linking. - # If -brtl is somewhere in LDFLAGS, we need to do run time linking. - aix_use_runtimelinking=no - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl" ); then - aix_use_runtimelinking=yes - break - fi - done - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - always_export_symbols=yes - if test "$aix_use_runtimelinking" = yes; then - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib' - allow_undefined_flag=' -Wl,-G' - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}-brtl \${wl}$exp_sym_flag:\$export_symbols" - else - if test "$host_cpu" = ia64; then - if test $with_gnu_ld = no; then - hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' - allow_undefined_flag="-z nodefs" - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" - fi - else - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib' - # Warning - without using the other run time loading flags, -berok will - # link without error, but may produce a broken library. - no_undefined_flag=' ${wl}-bnoerok' - allow_undefined_flag=' ${wl}-berok' - # -bexpall does not export symbols beginning with underscore (_) - always_export_symbols=yes - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec=' ' - build_libtool_need_lc=yes - # This is similar to how AIX traditionally builds it's shared libraries. - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - chorus*) - case $cc_basename in - *) - # FIXME: insert proper C++ library support - ld_shlibs=no - ;; - esac - ;; - dgux*) - case $cc_basename in - ec++) - # FIXME: insert proper C++ library support - ld_shlibs=no - ;; - ghcx) - # Green Hills C++ Compiler - # FIXME: insert proper C++ library support - ld_shlibs=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs=no - ;; - esac - ;; - freebsd[12]*) - # C++ shared libraries reported to be fairly broken before switch to ELF - ld_shlibs=no - ;; - freebsd*) - # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF - # conventions - ld_shlibs=yes - ;; - gnu*) - ;; - hpux*) - if test $with_gnu_ld = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - export_dynamic_flag_spec='${wl}-E' - fi - hardcode_direct=yes - hardcode_minus_L=yes # Not in the search PATH, but as the default - # location of the library. - - case $cc_basename in - CC) - # FIXME: insert proper C++ library support - ld_shlibs=no - ;; - aCC) - case $host_os in - hpux9*) archive_cmds='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;; - *) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; - esac - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | egrep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - ;; - *) - if test $with_gcc = yes; then - if test $with_gnu_ld = no; then - case "$host_os" in - hpux9*) archive_cmds='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;; - *) archive_cmds='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; - esac - fi - else - # FIXME: insert proper C++ library support - ld_shlibs=no - fi - ;; - esac - ;; - irix5* | irix6*) - case $cc_basename in - CC) - # SGI C++ - archive_cmds='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' - - # Archives containing C++ object files must be created using - # "CC -ar", where "CC" is the IRIX C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - old_archive_cmds='$CC -ar -WR,-u -o $oldlib $oldobjs' - ;; - *) - if test "$with_gcc" = yes; then - if test "$with_gnu_ld" = no; then - archive_cmds='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' - else - archive_cmds='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -o $lib' - fi - fi - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - link_all_deplibs=yes - ;; - esac - ;; - linux*) - case $cc_basename in - KCC) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - archive_cmds='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - archive_expsym_cmds='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest.so 2>&1 | egrep "ld"`; rm -f libconftest.so; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - - hardcode_libdir_flag_spec='${wl}--rpath,$libdir' - export_dynamic_flag_spec='${wl}--export-dynamic' - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - old_archive_cmds='$CC -Bstatic -o $oldlib $oldobjs' - ;; - cxx) - # Compaq C++ - archive_cmds='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' - - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec='-rpath $libdir' - hardcode_libdir_separator=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | sed "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - ;; - esac - ;; - lynxos*) - # FIXME: insert proper C++ library support - ld_shlibs=no - ;; - m88k*) - # FIXME: insert proper C++ library support - ld_shlibs=no - ;; - mvs*) - case $cc_basename in - cxx) - # FIXME: insert proper C++ library support - ld_shlibs=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs=no - ;; - esac - ;; - netbsd*) - # NetBSD uses g++ - do we need to do anything? - ;; - osf3*) - case $cc_basename in - KCC) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - archive_cmds='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - hardcode_libdir_separator=: - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - old_archive_cmds='$CC -Bstatic -o $oldlib $oldobjs' - - ;; - RCC) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - ld_shlibs=no - ;; - cxx) - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' - - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | sed "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - ;; - *) - if test "$with_gcc" = yes && test "$with_gnu_ld" = no; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' - - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"' - else - # FIXME: insert proper C++ library support - ld_shlibs=no - fi - ;; - esac - ;; - osf4* | osf5*) - case $cc_basename in - KCC) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - archive_cmds='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - hardcode_libdir_separator=: - - # Archives containing C++ object files must be created using - # the KAI C++ compiler. - old_archive_cmds='$CC -o $oldlib $oldobjs' - ;; - RCC) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - ld_shlibs=no - ;; - cxx) - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' - archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done~ - echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry $objdir/so_locations -o $lib~ - $rm $lib.exp' - - hardcode_libdir_flag_spec='-rpath $libdir' - hardcode_libdir_separator=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | sed "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - ;; - *) - if test "$with_gcc" = yes && test "$with_gnu_ld" = no; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' - - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"' - else - # FIXME: insert proper C++ library support - ld_shlibs=no - fi - ;; - esac - ;; - psos*) - # FIXME: insert proper C++ library support - ld_shlibs=no - ;; - sco*) - case $cc_basename in - CC) - # FIXME: insert proper C++ library support - ld_shlibs=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs=no - ;; - esac - ;; - sunos4*) - case $cc_basename in - CC) - # Sun C++ 4.x - # FIXME: insert proper C++ library support - ld_shlibs=no - ;; - lcc) - # Lucid - # FIXME: insert proper C++ library support - ld_shlibs=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs=no - ;; - esac - ;; - solaris*) - case $cc_basename in - CC) - # Sun C++ 4.2, 5.x and Centerline C++ - no_undefined_flag=' -zdefs' - archive_cmds='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' - - hardcode_libdir_flag_spec='-R$libdir' - hardcode_shlibpath_var=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The C++ compiler is used as linker so we must use $wl - # flag to pass the commands to the underlying system - # linker. - # Supported since Solaris 2.6 (maybe 2.5.1?) - whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - ;; - esac - link_all_deplibs=yes - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep "\-R|\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - old_archive_cmds='$CC -xar -o $oldlib $oldobjs' - ;; - gcx) - # Green Hills C++ Compiler - archive_cmds='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - - # The C++ compiler must be used to create the archive. - old_archive_cmds='$CC $LDFLAGS -archive -o $oldlib $oldobjs' - ;; - *) - # GNU C++ compiler with Solaris linker - if test "$with_gcc" = yes && test "$with_gnu_ld" = no; then - no_undefined_flag=' ${wl}-z ${wl}defs' - if $CC --version | egrep -v '^2\.7' > /dev/null; then - archive_cmds='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib' - archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\"" - else - # g++ 2.7 appears to require `-G' NOT `-shared' on this - # platform. - archive_cmds='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib' - archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\"" - fi - - hardcode_libdir_flag_spec='${wl}-R $wl$libdir' - fi - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC) - # NonStop-UX NCC 3.20 - # FIXME: insert proper C++ library support - ld_shlibs=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs=no - ;; - esac - ;; - unixware*) - # FIXME: insert proper C++ library support - ld_shlibs=no - ;; - vxworks*) - # FIXME: insert proper C++ library support - ld_shlibs=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs=no - ;; -esac - - -## Compiler Characteristics: PIC flags, static flags, etc - -# We don't use cached values here since only the C compiler -# characteristics should be cached. -ac_cv_prog_cc_pic= -ac_cv_prog_cc_shlib= -ac_cv_prog_cc_wl= -ac_cv_prog_cc_static= -ac_cv_prog_cc_no_builtin= -ac_cv_prog_cc_can_build_shared=$can_build_shared - -ac_cv_prog_cc_pic_works= -ac_cv_prog_cc_static_works= - -if test "$with_gcc" = yes; then - ac_cv_prog_cc_wl='-Wl,' - ac_cv_prog_cc_static='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_cv_prog_cc_static='-Bstatic' - else - lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp' - fi - ;; - amigaos*) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - ac_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4' - ;; - beos* | irix5* | irix6* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - cygwin* | mingw* | os2*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - ac_cv_prog_cc_pic='-DDLL_EXPORT' - ;; - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_cv_prog_cc_pic='-fno-common' - ;; - *djgpp*) - # DJGPP does not support shared libraries at all - ac_cv_prog_cc_pic= - ;; - sysv4*MP*) - if test -d /usr/nec; then - ac_cv_prog_cc_pic=-Kconform_pic - fi - ;; - *) - ac_cv_prog_cc_pic='-fPIC' - ;; - esac -else - case $host_os in - aix4* | aix5*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_cv_prog_cc_static='-Bstatic' - else - lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp' - fi - ;; - chorus*) - case $cc_basename in - cxch68) - # Green Hills C++ Compiler - # ac_cv_prog_cc_static="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" - ;; - esac - ;; - dgux*) - case $cc_basename in - ec++) - ac_cv_prog_cc_pic='-KPIC' - ;; - ghcx) - # Green Hills C++ Compiler - ac_cv_prog_cc_pic='-pic' - ;; - *) - ;; - esac - ;; - freebsd*) - # FreeBSD uses GNU C++ - ;; - gnu*) - ;; - hpux9* | hpux10* | hpux11*) - case $cc_basename in - CC) - ac_cv_prog_cc_wl='-Wl,' - ac_cv_prog_cc_static="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" - ac_cv_prog_cc_pic='+Z' - ;; - aCC) - ac_cv_prog_cc_wl='-Wl,' - ac_cv_prog_cc_static="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" - ac_cv_prog_cc_pic='+Z' - ;; - *) - ;; - esac - ;; - irix5* | irix6*) - case $cc_basename in - CC) - ac_cv_prog_cc_wl='-Wl,' - ac_cv_prog_cc_static='-non_shared' - ac_cv_prog_cc_pic='-KPIC' - ;; - *) - ;; - esac - ;; - linux*) - case $cc_basename in - KCC) - # KAI C++ Compiler - ac_cv_prog_cc_wl='--backend -Wl,' - ac_cv_prog_cc_pic='-fPIC' - ;; - cxx) - # Compaq C++ - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - ac_cv_prog_cc_pic= - ac_cv_prog_cc_static='-non_shared' - ;; - *) - ;; - esac - ;; - lynxos*) - ;; - m88k*) - ;; - mvs*) - case $cc_basename in - cxx) - ac_cv_prog_cc_pic='-W c,exportall' - ;; - *) - ;; - esac - ;; - netbsd*) - ;; - osf3* | osf4* | osf5*) - case $cc_basename in - KCC) - ac_cv_prog_cc_wl='--backend -Wl,' - ;; - RCC) - # Rational C++ 2.4.1 - ac_cv_prog_cc_pic='-pic' - ;; - cxx) - # Digital/Compaq C++ - ac_cv_prog_cc_wl='-Wl,' - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - ac_cv_prog_cc_pic= - ac_cv_prog_cc_static='-non_shared' - ;; - *) - ;; - esac - ;; - psos*) - ;; - sco*) - case $cc_basename in - CC) - ac_cv_prog_cc_pic='-fPIC' - ;; - *) - ;; - esac - ;; - solaris*) - case $cc_basename in - CC) - # Sun C++ 4.2, 5.x and Centerline C++ - ac_cv_prog_cc_pic='-KPIC' - ac_cv_prog_cc_static='-Bstatic' - ac_cv_prog_cc_wl='-Qoption ld ' - ;; - gcx) - # Green Hills C++ Compiler - ac_cv_prog_cc_pic='-PIC' - ;; - *) - ;; - esac - ;; - sunos4*) - case $cc_basename in - CC) - # Sun C++ 4.x - ac_cv_prog_cc_pic='-pic' - ac_cv_prog_cc_static='-Bstatic' - ;; - lcc) - # Lucid - ac_cv_prog_cc_pic='-pic' - ;; - *) - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC) - # NonStop-UX NCC 3.20 - ac_cv_prog_cc_pic='-KPIC' - ;; - *) - ;; - esac - ;; - unixware*) - ;; - vxworks*) - ;; - *) - ac_cv_prog_cc_can_build_shared=no - ;; - esac -fi - -case "$host_os" in - # Platforms which do not suport PIC and -DPIC is meaningless - # on them: - *djgpp*) - ac_cv_prog_cc_pic= - ;; - *) - ac_cv_prog_cc_pic="$ac_cv_prog_cc_pic -DPIC" - ;; -esac - - -# Figure out "hidden" C++ library dependencies from verbose -# compiler output whening linking a shared library. -cat > conftest.$ac_ext <&5; then - # Parse the compiler output and extract the necessary - # objects, libraries and library flags. - - # Sentinel used to keep track of whether or not we are before - # the conftest object file. - pre_test_object_deps_done=no - - for p in `eval $output_verbose_link_cmd`; do - - case $p in - - -L* | -R* | -l*) - # Some compilers place space between "-{L,R}" and the path. - # Remove the space. - if test $p = "-L" \ - || test $p = "-R"; then - prev=$p - continue - else - prev= - fi - - if test "$pre_test_object_deps_done" = no; then - case $p in - -L* | -R*) - # Internal compiler library paths should come after those - # provided the user. The postdeps already come after the - # user supplied libs so there is no need to process them. - if test -z "$compiler_lib_search_path"; then - compiler_lib_search_path="${prev}${p}" - else - compiler_lib_search_path="${compiler_lib_search_path} ${prev}${p}" - fi - ;; - # The "-l" case would never come before the object being - # linked, so don't bother handling this case. - esac - else - if test -z "$postdeps"; then - postdeps="${prev}${p}" - else - postdeps="${postdeps} ${prev}${p}" - fi - fi - ;; - - *.$objext) - # This assumes that the test object file only shows up - # once in the compiler output. - if test "$p" = "conftest.$objext"; then - pre_test_object_deps_done=yes - continue - fi - - if test "$pre_test_object_deps_done" = no; then - if test -z "$predep_objects"; then - predep_objects="$p" - else - predep_objects="$predep_objects $p" - fi - else - if test -z "$postdep_objects"; then - postdep_objects="$p" - else - postdep_objects="$postdep_objects $p" - fi - fi - ;; - - *) ;; # Ignore the rest. - - esac - done - - # Clean up. - rm -f a.out -else - echo "ltcf-cxx.sh: error: problem compiling test program" -fi - -$rm -f confest.$objext - -case " $postdeps " in -*" -lc "*) need_lc=no ;; -*) need_lc=yes ;; -esac diff --git a/contrib/gcc/ltcf-gcj.sh b/contrib/gcc/ltcf-gcj.sh deleted file mode 100644 index 7be8712..0000000 --- a/contrib/gcc/ltcf-gcj.sh +++ /dev/null @@ -1,651 +0,0 @@ -#### This script is meant to be sourced by ltconfig. - -# ltcf-gcj.sh - Create a GCJ compiler specific configuration -# -# Copyright (C) 1996-1999, 2000, 2001 Free Software Foundation, Inc. -# Originally by Gordon Matzigkeit , 1996 -# -# Original GCJ support by: -# Alexandre Oliva -# -# 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 of the License, 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 to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Source file extension for Java test sources. -ac_ext=java - -# Object file extension for compiled Java test sources. -objext=o - -# Code to be used in simple compile tests -lt_simple_compile_test_code="class foo {}" - -# Code to be used in simple link tests -lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }' - -## Linker Characteristics -case $host_os in -cygwin* | mingw*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$with_gcc" != yes; then - with_gnu_ld=no - fi - ;; - -esac - -ld_shlibs=yes -if test "$with_gnu_ld" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' - - # See if GNU ld supports shared libraries. - case $host_os in - aix3* | aix4* | aix5*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - ld_shlibs=no - cat <&2 - -*** Warning: the GNU linker, at least up to release 2.9.1, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to modify your PATH -*** so that a non-GNU linker is found, and then restart. - -EOF - fi - ;; - - amigaos*) - archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - - # Samuel A. Falvo II reports - # that the semantics of dynamic libraries on AmigaOS, at least up - # to version 4, is to share data among multiple programs linked - # with the same dynamic library. Since this doesn't match the - # behavior of shared libraries on other platforms, we can use - # them. - ld_shlibs=no - ;; - - beos*) - if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - ld_shlibs=no - fi - ;; - - cygwin* | mingw*) - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - hardcode_libdir_flag_spec='-L$libdir' - allow_undefined_flag=unsupported - always_export_symbols=yes - - extract_expsyms_cmds='test -f $output_objdir/impgen.c || \ - sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //; p; }" -e d < $0 > $output_objdir/impgen.c~ - test -f $output_objdir/impgen.exe || (cd $output_objdir && \ - if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \ - else $CC -o impgen impgen.c ; fi)~ - $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def' - - old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib' - - # cygwin and mingw dlls have different entry points and sets of symbols - # to exclude. - # FIXME: what about values for MSVC? - dll_entry=__cygwin_dll_entry@12 - dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~ - case $host_os in - mingw*) - # mingw values - dll_entry=_DllMainCRTStartup@12 - dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~ - ;; - esac - - # mingw and cygwin differ, and it's simplest to just exclude the union - # of the two symbol sets. - dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12 - - # recent cygwin and mingw systems supply a stub DllMain which the user - # can override, but on older systems we have to supply one (in ltdll.c) - if test "x$lt_cv_need_dllmain" = "xyes"; then - ltdll_obj='$output_objdir/$soname-ltdll.'"$objext " - ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $output_objdir/$soname-ltdll.c~ - test -f $output_objdir/$soname-ltdll.$objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~' - else - ltdll_obj= - ltdll_cmds= - fi - - # Extract the symbol export list from an `--export-all' def file, - # then regenerate the def file from the symbol export list, so that - # the compiled dll only exports the symbol export list. - # Be careful not to strip the DATA tag left be newer dlltools. - export_symbols_cmds="$ltdll_cmds"' - $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~ - sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols' - - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is. - # If DATA tags from a recent dlltool are present, honour them! - archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname-def; - else - echo EXPORTS > $output_objdir/$soname-def; - _lt_hint=1; - cat $export_symbols | while read symbol; do - set dummy \$symbol; - case \[$]# in - 2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;; - *) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;; - esac; - _lt_hint=`expr 1 + \$_lt_hint`; - done; - fi~ - '"$ltdll_cmds"' - $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~ - $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~ - $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~ - $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~ - $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags' - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris* | sysv5*) - if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then - ld_shlibs=no - cat <&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -EOF - elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - - sunos4*) - archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - *) - if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - - if test "$ld_shlibs" = yes; then - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec='${wl}--export-dynamic' - case $host_os in - cygwin* | mingw*) - # dlltool doesn't understand --whole-archive et. al. - whole_archive_flag_spec= - ;; - *) - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec= - fi - ;; - esac - fi -else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - allow_undefined_flag=unsupported - always_export_symbols=yes - archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - hardcode_minus_L=yes - if test "$with_gcc" = yes && test -z "$link_static_flag"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - hardcode_direct=unsupported - fi - ;; - - aix4* | aix5*) - hardcode_direct=yes - hardcode_libdir_separator=':' - link_all_deplibs=yes - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - if test "$with_gcc" = yes; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && \ - strings "$collect2name" | grep resolve_lib_name >/dev/null - then - # We have reworked collect2 - hardcode_direct=yes - else - # We have old collect2 - hardcode_direct=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L=yes - hardcode_libdir_flag_spec='-L$libdir' - hardcode_libdir_separator= - fi - esac - shared_flag='-shared' - else - # not using gcc - if test "$host_cpu" = ia64; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - if test $with_gnu_ld = no; then - exp_sym_flag='-Bexport' - no_entry_flag="" - fi - else - # Test if we are trying to use run time linking, or normal AIX style linking. - # If -brtl is somewhere in LDFLAGS, we need to do run time linking. - aix_use_runtimelinking=no - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl" ); then - aix_use_runtimelinking=yes - break - fi - done - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - # -bexpall does not export symbols beginning with underscore (_) - always_export_symbols=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other run time loading flags (-brtl), -berok will - # link without error, but may produce a broken library. - allow_undefined_flag=' ${wl}-berok' - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib' - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" - else - if test "$host_cpu" = ia64; then - if test $with_gnu_ld = no; then - hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' - allow_undefined_flag="-z nodefs" - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" - fi - else - allow_undefined_flag=' ${wl}-berok' - # -bexpall does not export symbols beginning with underscore (_) - always_export_symbols=yes - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec=' ' - build_libtool_need_lc=yes - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib' - # This is similar to how AIX traditionally builds it's shared libraries. - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - amigaos*) - archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - # see comment about different semantics on the GNU ld section - ld_shlibs=no - ;; - - cygwin* | mingw*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_from_new_cmds='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path='`cygpath -w "$srcfile"`' - ;; - - freebsd1*) - ld_shlibs=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd*) - archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - hpux9* | hpux10* | hpux11*) - case $host_os in - hpux9*) archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;; - *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;; - esac - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - hardcode_minus_L=yes # Not in the search PATH, but as the default - # location of the library. - export_dynamic_flag_spec='${wl}-E' - ;; - - irix5* | irix6*) - if test "$with_gcc" = yes; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' - else - archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' - fi - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - link_all_deplibs=yes - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - archive_cmds='$LD -shared -nodefaultlibs -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - hardcode_libdir_flag_spec='${wl}-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - openbsd*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - os2*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - allow_undefined_flag=unsupported - archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - - osf3*) - if test "$with_gcc" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' - fi - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$with_gcc" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' - fi - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - ;; - - sco3.2v5*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ;; - - solaris*) - no_undefined_flag=' ${wl}-z ${wl}defs' - archive_cmds='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib' - archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmds="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\"" - - hardcode_libdir_flag_spec='${wl}-R $wl$libdir' - hardcode_shlibpath_var=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) # Supported since Solaris 2.6 (maybe 2.5.1?) - whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; - esac - link_all_deplibs=yes - ;; - - sunos4*) - archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - sysv4) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var=no - hardcode_direct=no #Motorola manual says yes, but my tests say they lie - ;; - - sysv4.3*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - export_dynamic_flag_spec='-Bexport' - ;; - - sysv5*) - no_undefined_flag=' -z text' - # $CC -shared without GNU ld will not create a library from C++ - # object files and a static libstdc++, better avoid it by now - archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' - hardcode_libdir_flag_spec= - hardcode_shlibpath_var=no - runpath_var='LD_RUN_PATH' - ;; - - uts4*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - dgux*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - sysv4*MP*) - if test -d /usr/nec; then - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ld_shlibs=yes - fi - ;; - - sysv4.2uw2*) - archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_minus_L=no - hardcode_shlibpath_var=no - hardcode_runpath_var=yes - runpath_var=LD_RUN_PATH - ;; - - sysv5uw7* | unixware7*) - no_undefined_flag='${wl}-z ${wl}text' - if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var=no - ;; - - *) - ld_shlibs=no - ;; - esac -fi - -## Compiler Characteristics: PIC flags, static flags, etc - -# We don't use cached values here since only the C compiler -# characteristics should be cached. - ac_cv_prog_cc_pic= - ac_cv_prog_cc_shlib= - ac_cv_prog_cc_wl= - ac_cv_prog_cc_static= - ac_cv_prog_cc_no_builtin= - ac_cv_prog_cc_can_build_shared=$can_build_shared - - ac_cv_prog_cc_wl='-Wl,' - ac_cv_prog_cc_static='-static' - - case $host_os in - beos* | irix5* | irix6* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - aix*) - # Below there is a dirty hack to force normal static linking with -ldl - # The problem is because libdl dynamically linked with both libc and - # libC (AIX C++ library), which obviously doesn't included in libraries - # list by gcc. This cause undefined symbols with -static flags. - # This hack allows C programs to be linked with "-static -ldl", but - # we not sure about C++ programs. - ac_cv_prog_cc_static="$ac_cv_prog_cc_static ${ac_cv_prog_cc_wl}-lC" - ;; - *djgpp*) - # DJGPP does not suppot shared libraries at all - ac_cv_prog_cc_pic= - ;; - cygwin* | mingw* | os2*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - ac_cv_prog_cc_pic='-DDLL_EXPORT' - ;; - amigaos*) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - ac_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4' - ;; - sysv4*MP*) - if test -d /usr/nec; then - ac_cv_prog_cc_pic=-Kconform_pic - fi - ;; - *) - ac_cv_prog_cc_pic='-fPIC' - ;; - esac - -# GCJ did not exist at the time GCC didn't implicitly link libc in. -need_lc=no - -# All existing releases of GCJ support `-c -o'. -lt_cv_compiler_c_o=yes diff --git a/contrib/gcc/ltconfig b/contrib/gcc/ltconfig deleted file mode 100755 index 746e15b..0000000 --- a/contrib/gcc/ltconfig +++ /dev/null @@ -1,2795 +0,0 @@ -#! /bin/sh - -# ltconfig - Create a system-specific libtool. -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 -# Free Software Foundation, Inc. -# Originally by Gordon Matzigkeit , 1996 -# -# 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 of the License, 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 to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# A lot of this script is taken from autoconf-2.10. - -# Check that we are running under the correct shell. -SHELL=${CONFIG_SHELL-/bin/sh} -echo=echo -if test "X$1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X$1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then - # Yippee, $echo works! - : -else - # Restart under the correct shell. - exec "$SHELL" "$0" --no-reexec ${1+"$@"} -fi - -if test "X$1" = X--fallback-echo; then - # used as fallback echo - shift - cat </dev/null`} - case X$UNAME in - *-DOS) PATH_SEPARATOR=';' ;; - *) PATH_SEPARATOR=':' ;; - esac -fi - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi - -if test "X${echo_test_string+set}" != Xset; then - # find a string as large as possible, as long as the shell can cope with it - for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do - # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... - if (echo_test_string="`eval $cmd`") 2>/dev/null && - echo_test_string="`eval $cmd`" && - (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null; then - break - fi - done -fi - -if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - : -else - # The Solaris, AIX, and Digital Unix default echo programs unquote - # backslashes. This makes it impossible to quote backslashes using - # echo "$something" | sed 's/\\/\\\\/g' - # - # So, first we look for a working echo in the user's PATH. - - IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" - for dir in $PATH /usr/ucb; do - if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && - test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - echo="$dir/echo" - break - fi - done - IFS="$save_ifs" - - if test "X$echo" = Xecho; then - # We didn't find a better echo, so look for alternatives. - if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # This shell has a builtin print -r that does the trick. - echo='print -r' - elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && - test "X$CONFIG_SHELL" != X/bin/ksh; then - # If we have ksh, try running ltconfig again with it. - ORIGINAL_CONFIG_SHELL="${CONFIG_SHELL-/bin/sh}" - export ORIGINAL_CONFIG_SHELL - CONFIG_SHELL=/bin/ksh - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" --no-reexec ${1+"$@"} - else - # Try using printf. - echo='printf %s\n' - if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # Cool, printf works - : - elif echo_testing_string=`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - CONFIG_SHELL="$ORIGINAL_CONFIG_SHELL" - export CONFIG_SHELL - SHELL="$CONFIG_SHELL" - export SHELL - echo="$CONFIG_SHELL $0 --fallback-echo" - elif echo_testing_string=`("$CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`("$CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - echo="$CONFIG_SHELL $0 --fallback-echo" - else - # maybe with a smaller string... - prev=: - - for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do - if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null; then - break - fi - prev="$cmd" - done - - if test "$prev" != 'sed 50q "$0"'; then - echo_test_string=`eval $prev` - - export echo_test_string - exec "${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}}" "$0" ${1+"$@"} - else - # Oops. We lost completely, so just stick with echo. - echo=echo - fi - fi - fi - fi -fi - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -Xsed='sed -e s/^X//' -sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# The name of this program. -progname=`$echo "X$0" | $Xsed -e 's%^.*/%%'` - -# Constants: -PROGRAM=ltconfig -PACKAGE=libtool -VERSION=1.4a-GCC3.0 -TIMESTAMP=" (1.641.2.256 2001/05/28 20:09:07 with GCC-local changes)" -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -rm="rm -f" - -help="Try \`$progname --help' for more information." - -# Global variables: -default_ofile=libtool -can_build_shared=yes -enable_shared=yes -# All known linkers require a `.a' archive for static linking (except M$VC, -# which needs '.lib'). -enable_static=yes -enable_fast_install=yes -enable_dlopen=unknown -enable_win32_dll=no -pic_mode=default -ltmain= -silent= -srcdir= -ac_config_guess= -ac_config_sub= -host= -build=NONE -nonopt=NONE -ofile="$default_ofile" -verify_host=yes -tagname= -with_gcc=no -with_gnu_ld=no -need_locks=yes -ac_ext=c -libext=a -cache_file= -max_cmd_len= - -## Dependencies to place before and after the object being linked: -predep_objects= -postdep_objects= -predeps= -postdeps= -compiler_lib_search_path= - -## Link characteristics: -allow_undefined_flag= -no_undefined_flag= -need_lib_prefix=unknown -need_version=unknown -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -archive_cmds= -archive_expsym_cmds= -old_archive_from_new_cmds= -old_archive_from_expsyms_cmds= -striplib= -old_striplib= -export_dynamic_flag_spec= -whole_archive_flag_spec= -thread_safe_flag_spec= -hardcode_into_libs=no -hardcode_libdir_flag_spec= -hardcode_libdir_separator= -hardcode_direct=no -hardcode_minus_L=no -hardcode_shlibpath_var=unsupported -runpath_var= -link_all_deplibs=unknown -always_export_symbols=no -export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols' -# include_expsyms should be a list of space-separated symbols to be *always* -# included in the symbol list -include_expsyms= -# exclude_expsyms can be an egrep regular expression of symbols to exclude -# it will be wrapped by ` (' and `)$', so one must not match beginning or -# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', -# as well as any symbol that contains `d'. -exclude_expsyms="_GLOBAL_OFFSET_TABLE_" -# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out -# platforms (ab)use it in PIC code, but their linkers get confused if -# the symbol is explicitly referenced. Since portable code cannot -# rely on this symbol name, it's probably fine to never include it in -# preloaded symbol tables. -extract_expsyms_cmds= - -## Tools: -old_AR="$AR" -old_AR_FLAGS="$AR_FLAGS" -old_CC="$CC" -old_CFLAGS="$CFLAGS" -old_CPPFLAGS="$CPPFLAGS" -old_LDFLAGS="$LDFLAGS" -old_LIBS="$LIBS" -old_MAGIC_CMD="$MAGIC_CMD" -old_LD="$LD" -old_LN_S="$LN_S" -old_LTCC="$LTCC" -old_NM="$NM" -old_RANLIB="$RANLIB" -old_STRIP="$STRIP" -old_AS="$AS" -old_DLLTOOL="$DLLTOOL" -old_OBJDUMP="$OBJDUMP" -old_OBJEXT="$OBJEXT" -old_EXEEXT="$EXEEXT" -old_reload_flag="$reload_flag" -old_deplibs_check_method="$deplibs_check_method" -old_file_magic_cmd="$file_magic_cmd" - -# Parse the command line options. -args= -prev= -for option -do - case $option in - -*=*) optarg=`echo "$option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; - *) optarg= ;; - esac - - # If the previous option needs an argument, assign it. - if test -n "$prev"; then - eval "$prev=\$option" - prev= - continue - fi - - case $option in - --help) cat <&2 - echo "$help" 1>&2 - exit 1 - ;; - - *) - if test -z "$ltmain"; then - ltmain="$option" - elif test -z "$host"; then -# This generates an unnecessary warning for sparc-sun-solaris4.1.3_U1 -# if test -n "`echo $option| sed 's/[-a-z0-9.]//g'`"; then -# echo "$progname: warning \`$option' is not a valid host type" 1>&2 -# fi - host="$option" - else - echo "$progname: too many arguments" 1>&2 - echo "$help" 1>&2 - exit 1 - fi ;; - esac -done - -if test -z "$ltmain"; then - echo "$progname: you must specify a LTMAIN file" 1>&2 - echo "$help" 1>&2 - exit 1 -fi - -if test ! -f "$ltmain"; then - echo "$progname: \`$ltmain' does not exist" 1>&2 - echo "$help" 1>&2 - exit 1 -fi - -if test -n "$tagname"; then - # Check whether tagname contains only valid characters - case `$echo "X$tagname" | $Xsed -e 's/[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]//g'` in - "") ;; - *) - echo "$progname: invalid tag name: $tagname" 1>&2 - exit 1 - ;; - esac - - if grep "^### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$ofile" > /dev/null; then - echo "$progname: tag name $tagname already exists" 1>&2 - exit 1 - fi - - if test ! -f "$ofile"; then - echo "$progname: warning: output file \`$ofile' does not exist" 1>&2 - fi - - if test -z "$LTCC"; then - eval "`$SHELL $ofile --config | grep '^LTCC='`" - if test -z "$LTCC"; then - echo "$progname: warning: output file \`$ofile' does not look like a libtool script" 1>&2 - else - echo "$progname: warning: using \`LTCC=$LTCC', extracted from \`$ofile'" 1>&2 - fi - fi -fi - -# Quote any args containing shell metacharacters. -ltconfig_args= -for arg -do - case $arg in - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) - ltconfig_args="$ltconfig_args '$arg'" ;; - *) ltconfig_args="$ltconfig_args $arg" ;; - esac -done - -# A relevant subset of AC_INIT. - -# File descriptor usage: -# 0 standard input -# 1 file creation -# 2 errors and warnings -# 3 some systems may open it to /dev/tty -# 4 used on the Kubota Titan -# 5 compiler messages saved in config.log -# 6 checking for... messages and results -if test "$silent" = yes; then - exec 6>/dev/null -else - exec 6>&1 -fi -exec 5>>./config.log - -# NLS nuisances. -# Only set LANG and LC_ALL to C if already set. -# These must not be set unconditionally because not all systems understand -# e.g. LANG=C (notably SCO). -if test "X${LC_ALL+set}" = Xset; then LC_ALL=C; export LC_ALL; fi -if test "X${LANG+set}" = Xset; then LANG=C; export LANG; fi - -if test -n "$cache_file" && test -r "$cache_file" && test -f "$cache_file"; then - echo "loading cache $cache_file within ltconfig" - . $cache_file -fi - -if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then - # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. - if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then - ac_n= ac_c=' -' ac_t=' ' - else - ac_n=-n ac_c= ac_t= - fi -else - ac_n= ac_c='\c' ac_t= -fi - -if test -z "$srcdir"; then - # Assume the source directory is the same one as the path to LTMAIN. - srcdir=`$echo "X$ltmain" | $Xsed -e 's%/[^/]*$%%'` - test "$srcdir" = "$ltmain" && srcdir=. -fi - -trap "$rm conftest*; exit 1" 1 2 15 -if test "$verify_host" = yes; then - # Check for config.guess and config.sub. - ac_aux_dir= - for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do - if test -f $ac_dir/config.guess; then - ac_aux_dir=$ac_dir - break - fi - done - if test -z "$ac_aux_dir"; then - echo "$progname: cannot find config.guess in $srcdir $srcdir/.. $srcdir/../.." 1>&2 - echo "$help" 1>&2 - exit 1 - fi - ac_config_guess=$ac_aux_dir/config.guess - ac_config_sub=$ac_aux_dir/config.sub - - # Make sure we can run config.sub. - if $SHELL $ac_config_sub sun4 >/dev/null 2>&1; then : - else - echo "$progname: cannot run $ac_config_sub" 1>&2 - echo "$help" 1>&2 - exit 1 - fi - - echo $ac_n "checking host system type""... $ac_c" 1>&6 - - host_alias=$host - case $host_alias in - "") - # Force config.guess to use the C compiler. - # CC_FOR_BUILD overrides the CC variable in config.guess but I had - # problems with it so do it this way for now. - CC="$LTCC" - - if host_alias=`$SHELL $ac_config_guess`; then : - else - echo "$progname: cannot guess host type; you must specify one" 1>&2 - echo "$help" 1>&2 - exit 1 - fi - - # Restore the C compiler. - CC="$old_CC" - ;; - esac - host=`$SHELL $ac_config_sub $host_alias` - echo "$ac_t$host" 1>&6 - - # Make sure the host verified. - test -z "$host" && exit 1 - - # Check for the build system type - echo $ac_n "checking build system type... $ac_c" 1>&6 - - build_alias=$build - case $build_alias in - NONE) - case $nonopt in - NONE) build_alias=$host_alias ;; - *) build_alias=$nonopt ;; - esac ;; - esac - - build=`$SHELL $ac_config_sub $build_alias` - build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` - build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` - build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` - echo "$ac_t""$build" 1>&6 - -elif test -z "$host"; then - echo "$progname: you must specify a host type if you use \`--no-verify'" 1>&2 - echo "$help" 1>&2 - exit 1 -else - host_alias=$host - build_alias=$host_alias - build=$host -fi - -if test x"$host" != x"$build"; then - ac_tool_prefix=${host_alias}- -else - ac_tool_prefix= -fi - -host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` - -# Transform linux* to *-*-linux-gnu*, to support old configure scripts. -case $host_os in -linux-gnu*) ;; -linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` -esac - -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -if test -n "$RANLIB"; then - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" - old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" -fi - -# Source the script associated with the $tagname tag configuration. -if test -n "$tagname"; then - . $ltmain -else - # FIXME: We should use a variable here - # Configure for a C compiler - . $srcdir/ltcf-c.sh -fi - -# Set sane defaults for various variables -test -z "$AR" && AR=ar -test -z "$AR_FLAGS" && AR_FLAGS=cru -test -z "$AS" && AS=as -test -z "$CC" && CC=cc -test -z "$DLLTOOL" && DLLTOOL=dlltool -test -z "$MAGIC_CMD" && MAGIC_CMD=file -test -z "$LD" && LD=ld -test -z "$LN_S" && LN_S="ln -s" -test -z "$NM" && NM=nm -test -z "$OBJDUMP" && OBJDUMP=objdump -test -z "$RANLIB" && RANLIB=: -test -z "$STRIP" && STRIP=: -test -z "$objext" && objext=o - -echo $ac_n "checking for objdir... $ac_c" 1>&6 -rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - objdir=_libs -fi -rmdir .libs 2>/dev/null -echo "$ac_t$objdir" 1>&6 - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# Allow CC to be a program name with arguments. -set dummy $CC -compiler="$2" - -# We assume here that the value for ac_cv_prog_cc_pic will not be cached -# in isolation, and that seeing it set (from the cache) indicates that -# the associated values are set (in the cache) correctly too. -echo $ac_n "checking for $compiler option to produce PIC... $ac_c" 1>&6 -echo "$progname:678:checking for $compiler option to produce PIC" 1>&5 - -if test -z "$ac_cv_prog_cc_pic"; then - echo "$ac_t"none 1>&6 -else - echo "$ac_t""$ac_cv_prog_cc_pic" 1>&6 - - # Check to make sure the pic_flag actually works. - echo $ac_n "checking if $compiler PIC flag $ac_cv_prog_cc_pic works... $ac_c" 1>&6 - echo "$progname:687:checking that $compiler PIC flag $ac_cv_prog_cc_pic works." 1>&5 - if test "X${ac_cv_prog_cc_pic_works+set}" = Xset && \ - test "X${ac_cv_prog_cc_pic_works}" != X; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - ac_cv_prog_cc_pic_works=yes - $rm conftest* - echo $lt_simple_compile_test_code > conftest.$ac_ext - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $ac_cv_prog_cc_pic -DPIC" - if { (eval echo $progname:697: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then - # Append any warnings to the config.log. - cat conftest.err 1>&5 - - case $host_os in - hpux9* | hpux10* | hpux11*) - # On HP-UX, both CC and GCC only warn that PIC is supported... then - # they create non-PIC objects. So, if there were any warnings, we - # assume that PIC is not supported. - if test -s conftest.err; then - ac_cv_prog_cc_pic_works=no - ac_cv_prog_cc_can_build_shared=no - ac_cv_prog_cc_pic= - else - ac_cv_prog_cc_pic_works=yes - ac_cv_prog_cc_pic=" $ac_cv_prog_cc_pic" - fi - ;; - *) - ac_cv_prog_cc_pic_works=yes - ac_cv_prog_cc_pic=" $ac_cv_prog_cc_pic" - ;; - esac - else - # Append any errors to the config.log. - cat conftest.err 1>&5 - ac_cv_prog_cc_pic_works=no - ac_cv_prog_cc_can_build_shared=no - ac_cv_prog_cc_pic= - fi - CFLAGS="$save_CFLAGS" - $rm conftest* - fi - # Belt *and* braces to stop my trousers falling down: - if test "X$ac_cv_prog_cc_pic_works" = Xno; then - ac_cv_prog_cc_pic= - ac_cv_prog_cc_can_build_shared=no - fi - echo "$ac_t""$ac_cv_prog_cc_pic_works" 1>&6 -fi - -# Check for any special shared library compilation flags. -if test -n "$ac_cv_prog_cc_shlib"; then - echo "$progname: warning: \`$CC' requires \`$ac_cv_prog_cc_shlib' to build shared libraries" 1>&2 - if echo "$old_CC $old_CFLAGS " | egrep -e "[ ]$ac_cv_prog_cc_shlib[ ]" >/dev/null; then : - else - echo "$progname: add \`$ac_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2 - ac_cv_prog_cc_can_build_shared=no - fi -fi - -echo $ac_n "checking if $compiler static flag $ac_cv_prog_cc_static works... $ac_c" 1>&6 -echo "$progname:749: checking if $compiler static flag $ac_cv_prog_cc_static works" >&5 -if test "X${ac_cv_prog_cc_static_works+set}" = Xset && \ - test "X${ac_cv_prog_cc_static_works}" != X; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - $rm conftest* - echo $lt_simple_link_test_code > conftest.$ac_ext - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $ac_cv_prog_cc_static" - if { (eval echo $progname:758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - ac_cv_prog_cc_static_works=yes - else - ac_cv_prog_cc_static_works=no - ac_cv_prog_cc_static= - fi - LDFLAGS="$save_LDFLAGS" - $rm conftest* -fi -# Belt *and* braces to stop my trousers falling down: -if test "X$ac_cv_prog_cc_static_works" = Xno; then - ac_cv_prog_cc_static= -fi -echo "$ac_t""$ac_cv_prog_cc_static_works" 1>&6 -pic_flag="$ac_cv_prog_cc_pic" -special_shlib_compile_flags="$ac_cv_prog_cc_shlib" -wl="$ac_cv_prog_cc_wl" -link_static_flag="$ac_cv_prog_cc_static" -no_builtin_flag="$ac_cv_prog_cc_no_builtin" -can_build_shared="$ac_cv_prog_cc_can_build_shared" - -# find the maximum length of command line arguments -echo "$progname:780: finding the maximum length of command line arguments" 1>&5 -echo $ac_n "finding the maximum length of command line arguments... $ac_c" 1>&6 -if test "${lt_cv_sys_max_cmd_len+set}" = set; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - i=0 - testring="ABCD" - # If test is not a shell built-in, we'll probably end up computing a - # maximum length that is only half of the actual maximum length, but - # we can't tell. - while test "X"`$CONFIG_SHELL $0 --fallback-echo "X$testring" 2>/dev/null` \ - = "XX$testring" && - new_result=`expr "X$testring" : ".*" 2>&1` && - lt_cv_sys_max_cmd_len=$new_result && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - testring=$testring$testring - done - testring= - # add a significant safety factor because C++ compilers can tack on massive amounts - # of additional arguments before passing them to the linker. 1/4 should be good. - len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len - $len` -fi -echo "$progname:@lineno@: result: $lt_cv_sys_max_cmd_len" 1>&5 -echo "${ac_t}$lt_cv_sys_max_cmd_len" 1>&6 - -if test -n $lt_cv_sys_max_cmd_len ; then - max_cmd_len=$lt_cv_sys_max_cmd_len -else - max_cmd_len=none -fi - -# Check to see if options -o and -c are simultaneously supported by compiler -echo $ac_n "checking if $compiler supports -c -o file.$objext... $ac_c" 1>&6 -if test "${lt_cv_compiler_c_o+set}" = set; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - $rm -r conftest 2>/dev/null - mkdir conftest - cd conftest - $rm conftest* - echo $lt_simple_compile_test_code > conftest.$ac_ext - mkdir out - # According to Tom Tromey, Ian Lance Taylor reported there are C compilers - # that will create temporary files in the current directory regardless of - # the output directory. Thus, making CWD read-only will cause this test - # to fail, enabling locking or at least warning the user not to do parallel - # builds. - chmod -w . - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -o out/conftest2.$objext" - echo "$progname:833: checking if $compiler supports -c -o file.$objext" >&5 - if { (eval echo $progname:834: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$objext; then - - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s out/conftest.err; then - lt_cv_compiler_c_o=no - else - lt_cv_compiler_c_o=yes - fi - else - # Append any errors to the config.log. - cat out/conftest.err 1>&5 - lt_cv_compiler_c_o=no - fi - CFLAGS="$save_CFLAGS" - chmod u+w . - $rm conftest* out/* - rmdir out - cd .. - rmdir conftest - $rm -r conftest 2>/dev/null -fi -compiler_c_o=$lt_cv_compiler_c_o -echo "${ac_t}$compiler_c_o" 1>&6 - -# Check to see if we can do hard links to lock some files if needed -hard_links="nottested" -if test "$compiler_c_o" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - echo $ac_n "checking if we can lock with hard links... $ac_c" 1>&6 - hard_links=yes - $rm conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - echo "$ac_t$hard_links" 1>&6 - $rm conftest* - if test "$hard_links" = no; then - echo "*** WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2 - need_locks=warn - fi -else - need_locks=no -fi - -if test "$with_gcc" = yes; then - # Check to see if options -fno-rtti -fno-exceptions are supported by compiler - echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions ... $ac_c" 1>&6 - $rm conftest* - echo $lt_simple_compile_test_code > conftest.$ac_ext - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext" - echo "$progname:887: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 - if { (eval echo $progname:888: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then - - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - echo "$ac_t"no 1>&6 - compiler_rtti_exceptions=no - else - echo "$ac_t"yes 1>&6 - compiler_rtti_exceptions=yes - fi - else - # Append any errors to the config.log. - cat conftest.err 1>&5 - compiler_rtti_exceptions=no - echo "$ac_t"no 1>&6 - fi - CFLAGS="$save_CFLAGS" - $rm conftest* - - if test "$compiler_rtti_exceptions" = "yes"; then - no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions' - else - no_builtin_flag=' -fno-builtin' - fi - -fi - -# See if the linker supports building shared libraries. -echo $ac_n "checking whether the linker ($LD) supports shared libraries... $ac_c" 1>&6 - -echo "$ac_t$ld_shlibs" 1>&6 -test "$ld_shlibs" = no && can_build_shared=no - -# Check hardcoding attributes. -echo $ac_n "checking how to hardcode library paths into programs... $ac_c" 1>&6 -hardcode_action= -if test -n "$hardcode_libdir_flag_spec" || \ - test -n "$runpath_var"; then - - # We can hardcode non-existant directories. - if test "$hardcode_direct" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$hardcode_shlibpath_var" != no && - test "$hardcode_minus_L" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action=unsupported -fi -echo "$ac_t$hardcode_action" 1>&6 - -echo $ac_n "checking whether stripping libraries is possible... $ac_c" 1>&6 -if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - echo "${ac_t}yes" 1>&6 -else - echo "${ac_t}no" 1>&6 -fi - -case $reload_flag in -"" | " "*) ;; -*) reload_flag=" $reload_flag" ;; -esac -reload_cmds='$LD$reload_flag -o $output$reload_objs' -test -z "$deplibs_check_method" && deplibs_check_method=unknown - -# PORTME Fill in your ld.so characteristics -library_names_spec= -libname_spec='lib$name' -soname_spec= -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" - -echo $ac_n "checking dynamic linker characteristics... $ac_c" 1>&6 -case $host_os in -aix3*) - version_type=linux - library_names_spec='${libname}${release}.so$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}.so$major' - ;; - -aix4* | aix5*) - version_type=linux - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' - shlibpath_var=LD_LIBRARY_PATH - else - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - # We preserve .a as extension for shared libraries though AIX4.2 - # and later linker supports .so - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so instead of - # lib.a to let people know that these are not typical AIX shared libraries. - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' - else - # We preserve .a as extension for shared libraries though AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}.so$major' - fi - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | egrep '(GNU)' > /dev/null; then - export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' - fi - shlibpath_var=LIBPATH - deplibs_check_method=pass_all - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then - : - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - can_build_shared=no - fi - ;; - esac - fi - ;; - -amigaos*) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done' - ;; - -beos*) - library_names_spec='${libname}.so' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - -bsdi4*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' - soname_spec='${libname}${release}.so$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - export_dynamic_flag_spec=-rdynamic - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32*) - version_type=windows - need_version=no - need_lib_prefix=no - case $with_gcc,$host_os in - yes,cygwin*) - library_names_spec='$libname.dll.a' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | [sed -e 's/[.]/-/g']`${versuffix}.dll' - postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog .libs/$dlname \$dldir/$dlname' - postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll; $rm \$dlpath' - ;; - yes,mingw*) - library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll' - sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"` - ;; - yes,pw32*) - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll' -;; - *) - library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${versuffix}.`test .$module = .yes && echo so || echo dylib` ${libname}${release}${major}.$`test .$module = .yes && echo so || echo dylib` ${libname}.`test .$module = .yes && echo so || echo dylib`' - soname_spec='${libname}${release}${major}.`test .$module = .yes && echo so || echo dylib`' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - ;; - -freebsd1*) - dynamic_linker=no - ;; - -freebsd*) - objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' - need_version=no - need_lc=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2*) - shlibpath_overrides_runpath=yes - ;; - *) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so' - soname_spec='${libname}${release}.so$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - dynamic_linker="$host_os dld.sl" - version_type=sunos - need_lib_prefix=no - need_version=no - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl' - soname_spec='${libname}${release}.sl$major' - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' - ;; - -irix5* | irix6*) - version_type=irix - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}.so$major' - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so' - case $host_os in - irix5*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*) - dynamic_linker=no - ;; - -# This must be Linux ELF. -linux-gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' - soname_spec='${libname}${release}.so$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsd*) - need_lib_prefix=no - need_version=no - version_type=sunos - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so' - soname_spec='${libname}${release}.so$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -openbsd*) - version_type=sunos - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - need_version=no - fi - library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - ;; - -os2*) - libname_spec='$name' - need_lib_prefix=no - library_names_spec='$libname.dll $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_version=no - soname_spec='${libname}${release}.so' - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -sco3.2v5*) - version_type=osf - soname_spec='${libname}${release}.so$major' - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' - shlibpath_var=LD_LIBRARY_PATH - ;; - -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' - soname_spec='${libname}${release}.so$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - version_type=linux - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' - soname_spec='${libname}${release}.so$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -uts4*) - version_type=linux - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' - soname_spec='${libname}${release}.so$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' - soname_spec='${libname}${release}.so$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so' - soname_spec='$libname.so.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -*) - dynamic_linker=no - ;; -esac -echo "$ac_t$dynamic_linker" 1>&6 -test "$dynamic_linker" = no && can_build_shared=no - -# Check for command to grab the raw symbol name followed by C symbol from nm. -echo $ac_n "checking command to parse $NM output... $ac_c" 1>&6 - -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[BCDEGRST]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([_A-Za-z][_A-Za-z0-9]*\)' - -# Transform the above into a raw symbol and a C symbol. -symxfrm='\1 \2\3 \3' - -# Transform an extracted symbol line into a proper C declaration -global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'" - -# Define system-specific variables. -case $host_os in -aix*) - symcode='[BCDT]' - ;; -cygwin* | mingw* | pw32*) - symcode='[ABCDGISTW]' - ;; -hpux*) # Its linker distinguishes data from code symbols - global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - ;; -irix*) - symcode='[BCDEGRST]' - ;; -solaris* | sysv5*) - symcode='[BDT]' - ;; -sysv4) - symcode='[DFNSTU]' - ;; -esac - -# Handle CRLF in mingw tool chain -opt_cr= -case $host_os in -mingw*) - opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac - -# If we're using GNU nm, then use its standard symbol codes. -if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then - symcode='[ABCDGISTW]' -fi - -# Try without a prefix undercore, then with it. -for ac_symprfx in "" "_"; do - - # Write the raw and C identifiers. - global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'" - - # Check to see that the pipe works correctly. - pipe_works=no - $rm conftest* - cat > conftest.$ac_ext <&5 - if { (eval echo $progname:1432: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.$objext; then - # Now try to grab the symbols. - nlist=conftest.nm - if { echo "$progname:1435: eval \"$NM conftest.$objext | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.$objext | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then - - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if egrep ' nm_test_var$' "$nlist" >/dev/null; then - if egrep ' nm_test_func$' "$nlist" >/dev/null; then - cat < conftest.$ac_ext -#ifdef __cplusplus -extern "C" { -#endif - -EOF - # Now generate the symbol file. - eval "$global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext' - - cat <> conftest.$ac_ext -#if defined (__STDC__) && __STDC__ -# define lt_ptr_t void * -#else -# define lt_ptr_t char * -# define const -#endif - -/* The mapping between symbol names and symbols. */ -const struct { - const char *name; - lt_ptr_t address; -} -lt_preloaded_symbols[] = -{ -EOF - sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" >> conftest.$ac_ext - cat <<\EOF >> conftest.$ac_ext - {0, (lt_ptr_t) 0} -}; - -#ifdef __cplusplus -} -#endif -EOF - # Now try linking the two files. - mv conftest.$objext conftstm.$objext - save_LIBS="$LIBS" - save_CFLAGS="$CFLAGS" - LIBS="conftstm.$objext" - CFLAGS="$CFLAGS$no_builtin_flag" - if { (eval echo $progname:1487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - pipe_works=yes - else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - fi - LIBS="$save_LIBS" - else - echo "cannot find nm_test_func in $nlist" >&5 - fi - else - echo "cannot find nm_test_var in $nlist" >&5 - fi - else - echo "cannot run $global_symbol_pipe" >&5 - fi - else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - fi - $rm conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then - break - else - global_symbol_pipe= - fi -done -if test "$pipe_works" = yes; then - echo "${ac_t}ok" 1>&6 -else - echo "${ac_t}failed" 1>&6 -fi - -if test -z "$global_symbol_pipe"; then - global_symbol_to_cdecl= -fi - -# Report the final consequences. -echo "checking if libtool supports shared libraries... $can_build_shared" 1>&6 - -# Only try to build win32 dlls if AC_LIBTOOL_WIN32_DLL was used in -# configure.in, otherwise build static only libraries. -case $host_os in -cygwin* | mingw* | pw32* | os2*) - if test x$can_build_shared = xyes; then - test x$enable_win32_dll = xno && can_build_shared=no - echo "checking if package supports dlls... $can_build_shared" 1>&6 - fi -;; -esac - -echo $ac_n "checking whether to build shared libraries... $ac_c" 1>&6 -test "$can_build_shared" = "no" && enable_shared=no - -# On AIX, shared libraries and static libraries use the same namespace, and -# are all built from PIC. -case $host_os in -aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - -aix4*) - test "$enable_shared" = yes && enable_static=no - ;; -esac - -echo "$ac_t$enable_shared" 1>&6 - -# Make sure either enable_shared or enable_static is yes. -test "$enable_shared" = yes || enable_static=yes - -echo "checking whether to build static libraries... $enable_static" 1>&6 - -if test "$hardcode_action" = relink; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$with_gcc" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -# Check whether we must set pic_mode to default -test -z "$pic_flag" && pic_mode=default - -if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else -if test "X${lt_cv_dlopen+set}" != Xset; then - lt_cv_dlopen=no lt_cv_dlopen_libs= -echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "$progname:1591: checking for dlopen in -ldl" >&5 -if test "X${ac_cv_lib_dl_dlopen+set}" = Xset; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-ldl $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - ac_cv_lib_dl_dlopen=yes -else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_lib_dl_dlopen=no -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if test "X$ac_cv_lib_dl_dlopen" = Xyes; then - echo "$ac_t""yes" 1>&6 - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - echo "$ac_t""no" 1>&6 -echo $ac_n "checking for dlopen""... $ac_c" 1>&6 -echo "$progname:1630: checking for dlopen" >&5 -if test "X${ac_cv_func_dlopen+set}" = Xset; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_dlopen) || defined (__stub___dlopen) -choke me -#else -dlopen(); -#endif - -; return 0; } -EOF -if { (eval echo $progname:1660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - ac_cv_func_dlopen=yes -else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_func_dlopen=no -fi -rm -f conftest* -fi -if test "X$ac_cv_func_dlopen" = Xyes; then - echo "$ac_t""yes" 1>&6 - lt_cv_dlopen="dlopen" -else - echo "$ac_t""no" 1>&6 -echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6 -echo "$progname:1677: checking for dlopen in -lsvld" >&5 -if test "X${ac_cv_lib_svld_dlopen+set}" = Xset; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lsvld $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - ac_cv_lib_svld_dlopen=yes -else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_lib_svld_dlopen=no -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if test "X$ac_cv_lib_svld_dlopen" = Xyes; then - echo "$ac_t""yes" 1>&6 - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" -else - echo "$ac_t""no" 1>&6 -echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6 -echo "$progname:1716: checking for dld_link in -ldld" >&5 -if test "X${ac_cv_lib_dld_dld_link+set}" = Xset; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-ldld $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - ac_cv_lib_dld_dld_link=yes -else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_lib_dld_dld_link=no -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if test "X$ac_cv_lib_dld_dld_link" = Xyes; then - echo "$ac_t""yes" 1>&6 - lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" -else - echo "$ac_t""no" 1>&6 -echo $ac_n "checking for shl_load""... $ac_c" 1>&6 -echo "$progname:1755: checking for shl_load" >&5 -if test "X${ac_cv_func_shl_load+set}" = Xset; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char shl_load(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_shl_load) || defined (__stub___shl_load) -choke me -#else -shl_load(); -#endif - -; return 0; } -EOF -if { (eval echo $progname:1785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - ac_cv_func_shl_load=yes -else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_func_shl_load=no -fi -rm -f conftest* -fi - -if test "X$ac_cv_func_shl_load" = Xyes; then - echo "$ac_t""yes" 1>&6 - lt_cv_dlopen="shl_load" -else - echo "$ac_t""no" 1>&6 -echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 -echo "$progname:1803: checking for shl_load in -ldld" >&5 -if test "X${ac_cv_lib_dld_shl_load+set}" = Xset; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-ldld $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - ac_cv_lib_dld_shl_load=yes -else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_lib_dld_shl_load=no -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if test "X$ac_cv_lib_dld_shl_load" = Xyes; then - echo "$ac_t""yes" 1>&6 - lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" -else - echo "$ac_t""no" 1>&6 -fi - - -fi - - -fi - - -fi - - -fi - -fi - -fi - - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else - enable_dlopen=no - fi - - case $lt_cv_dlopen in - dlopen) -for ac_hdr in dlfcn.h; do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "$progname:1871: checking for $ac_hdr" >&5 -if eval "test \"`echo 'X$''{'ac_cv_header_$ac_safe'+set}'`\" = Xset"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -int fnord = 0; -int main () { return(0); } -EOF -ac_try="$ac_compile >/dev/null 2>conftest.out" -{ (eval echo $progname:1882: \"$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 "$progname: 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 -else - echo "$ac_t""no" 1>&6 -fi -done - - if test "x$ac_cv_header_dlfcn_h" = xyes; then - CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - fi - eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - LIBS="$lt_cv_dlopen_libs $LIBS" - - echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6 -echo "$progname:1910: checking whether a program can dlopen itself" >&5 -if test "X${lt_cv_dlopen_self+set}" = Xset; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - lt_cv_dlopen_self=cross - else - cat > conftest.$ac_ext < -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LTDL_GLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LTDL_GLOBAL DL_GLOBAL -# else -# define LTDL_GLOBAL 0 -# endif -#endif - -/* We may have to define LTDL_LAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LTDL_LAZY_OR_NOW -# ifdef RTLD_LAZY -# define LTDL_LAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LTDL_LAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LTDL_LAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LTDL_LAZY_OR_NOW DL_NOW -# else -# define LTDL_LAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -void fnord() { int i=42; } -int main() { - void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW); - if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord"); - if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); } - -EOF -if { (eval echo $progname:1965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null -then - lt_cv_dlopen_self=yes -else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - lt_cv_dlopen_self=no -fi -rm -fr conftest* -fi - -fi - -echo "$ac_t""$lt_cv_dlopen_self" 1>&6 - - if test "$lt_cv_dlopen_self" = yes; then - LDFLAGS="$LDFLAGS $link_static_flag" - echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6 -echo "$progname:1984: checking whether a statically linked program can dlopen itself" >&5 -if test "X${lt_cv_dlopen_self_static+set}" = Xset; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - lt_cv_dlopen_self_static=cross - else - cat > conftest.$ac_ext < -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LTDL_GLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LTDL_GLOBAL DL_GLOBAL -# else -# define LTDL_GLOBAL 0 -# endif -#endif - -/* We may have to define LTDL_LAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LTDL_LAZY_OR_NOW -# ifdef RTLD_LAZY -# define LTDL_LAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LTDL_LAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LTDL_LAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LTDL_LAZY_OR_NOW DL_NOW -# else -# define LTDL_LAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -void fnord() { int i=42; } -int main() { - void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW); - if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord"); - if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); } - -EOF -if { (eval echo $progname:2039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null -then - lt_cv_dlopen_self_static=yes -else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - lt_cv_dlopen_self_static=no -fi -rm -fr conftest* -fi - -fi - -echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6 -fi - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi - -# Copy echo and quote the copy, instead of the original, because it is -# used later. -ltecho="$echo" -if test "X$ltecho" = "X$CONFIG_SHELL $0 --fallback-echo"; then - ltecho="$CONFIG_SHELL \$0 --fallback-echo" -fi -LTSHELL="$SHELL" - -LTCONFIG_VERSION="$VERSION" - -# Only quote variables if we're using ltmain.sh. -case $ltmain in -*.sh) - # Now quote all the things that may contain metacharacters. - for var in ltecho old_AR old_AR_FLAGS old_CC old_LTCC old_CFLAGS old_CPPFLAGS \ - old_MAGIC_CMD old_LD old_LDFLAGS old_LIBS \ - old_LN_S old_NM old_RANLIB old_STRIP \ - old_AS old_DLLTOOL old_OBJDUMP \ - old_OBJEXT old_EXEEXT old_reload_flag \ - old_deplibs_check_method old_file_magic_cmd \ - AR AR_FLAGS CC LTCC LD LN_S NM LTSHELL LTCONFIG_VERSION \ - reload_flag reload_cmds wl \ - pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \ - thread_safe_flag_spec whole_archive_flag_spec libname_spec \ - library_names_spec soname_spec \ - RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \ - old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \ - postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \ - predep_objects postdep_objects predeps postdeps compiler_lib_search_path \ - old_striplib striplib file_magic_cmd export_symbols_cmds \ - deplibs_check_method allow_undefined_flag no_undefined_flag \ - finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \ - hardcode_libdir_flag_spec hardcode_libdir_separator \ - sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ - compiler_c_o need_locks exclude_expsyms include_expsyms; do - - case $var in - reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \ - old_postinstall_cmds | old_postuninstall_cmds | \ - export_symbols_cmds | archive_cmds | archive_expsym_cmds | \ - extract_expsyms_cmds | old_archive_from_expsyms_cmds | \ - postinstall_cmds | postuninstall_cmds | \ - finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) - # Double-quote double-evaled strings. - eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ### testsuite: skip nested quoting test - ;; - *) - eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ### testsuite: skip nested quoting test - ;; - esac - done - - case $ltecho in - *'\$0 --fallback-echo"') - ltecho=`$echo "X$ltecho" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` - ;; - esac - - if test -z "$tagname"; then - trap "$rm \"$ofile\"; exit 1" 1 2 15 - echo "creating $ofile" - $rm "$ofile" - cat < "$ofile" -#! $SHELL - -# `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) -# NOTE: Changes made to this file will be lost: look at ltconfig or ltmain.sh. -# -# Copyright (C) 1996-2000 Free Software Foundation, Inc. -# Originally by Gordon Matzigkeit , 1996 -# -# 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 of the License, 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 to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# Sed that helps us avoid accidentally triggering echo(1) options like -n. -Xsed="sed -e s/^X//" - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi - -# The names of the tagged configurations supported by this script. -available_tags= - -### BEGIN LIBTOOL CONFIG -EOF - else - echo "appending configuration tag \"$tagname\" to $ofile" - echo "### BEGIN LIBTOOL TAG CONFIG: $tagname" >> "$ofile" - fi - cfgfile="$ofile" - ;; - -*) - # Double-quote the variables that need it (for aesthetics). - for var in old_AR old_AR_FLAGS old_CC old_LTCC old_CFLAGS old_CPPFLAGS \ - old_MAGIC_CMD old_LD old_LDFLAGS old_LIBS \ - old_LN_S old_NM old_RANLIB old_STRIP \ - old_AS old_DLLTOOL old_OBJDUMP \ - old_OBJEXT old_EXEEXT old_reload_flag \ - old_deplibs_check_method old_file_magic_cmd; do - eval "$var=\\\"\$var\\\"" - done - - # Just create a config file. - cfgfile="$ofile.cfg" - if test -z "$tagname"; then - trap "$rm \"$cfgfile\"; exit 1" 1 2 15 - echo "creating $cfgfile" - $rm "$cfgfile" - cat < "$cfgfile" -# `$echo "$cfgfile" | sed 's%^.*/%%'` - Libtool configuration file. -# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) - -### BEGIN LIBTOOL CONFIG -EOF - else - echo "appending to $cfgfile" - echo "### BEGIN LIBTOOL TAG CONFIG: $tagname" >> "$ofile" - fi - ;; -esac - -cat <> "$cfgfile" -# Libtool was configured as follows, on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# -# AR=$old_AR AR_FLAGS=$old_AR_FLAGS LTCC=$old_LTCC CC=$old_CC \\ -# CFLAGS=$old_CFLAGS CPPFLAGS=$old_CPPFLAGS \\ -# MAGIC_CMD=$old_MAGIC_CMD LD=$old_LD LDFLAGS=$old_LDFLAGS LIBS=$old_LIBS \\ -# LN_S=$old_LN_S NM=$old_NM RANLIB=$old_RANLIB STRIP=$old_STRIP \\ -# AS=$old_AS DLLTOOL=$old_DLLTOOL OBJDUMP=$old_OBJDUMP \\ -# objext=$old_OBJEXT exeext=$old_EXEEXT reload_flag=$old_reload_flag \\ -# deplibs_check_method=$old_deplibs_check_method \\ -# file_magic_cmd=$old_file_magic_cmd \\ -# $0$ltconfig_args -# -# Compiler and other test output produced by $progname, useful for -# debugging $progname, is in ./config.log if it exists. - -# The version of $progname that generated this script. -LTCONFIG_VERSION=$LTCONFIG_VERSION - -# Shell to use when invoking shell scripts. -SHELL=$LTSHELL - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$need_lc - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - -# The host system. -host_alias=$host_alias -host=$host - -# An echo program that does not interpret backslashes. -echo=$ltecho - -# The archiver. -AR=$AR -AR_FLAGS=$AR_FLAGS - -# A C compiler. -LTCC=$LTCC - -# A language-specific compiler. -CC=$CC - -# Is the compiler the GNU C compiler? -with_gcc=$with_gcc - -# The linker used to build libraries. -LD=$LD - -# Whether we need hard or soft links. -LN_S=$LN_S - -# A BSD-compatible nm program. -NM=$NM - -# A symbol stripping program -STRIP=$STRIP - -# Used to examine libraries when file_magic_cmd begins "file" -MAGIC_CMD=$MAGIC_CMD - -# Used on cygwin: DLL creation program. -DLLTOOL="$DLLTOOL" - -# Used on cygwin: object dumper. -OBJDUMP="$OBJDUMP" - -# Used on cygwin: assembler. -AS="$AS" - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# How to create reloadable object files. -reload_flag=$reload_flag -reload_cmds=$reload_cmds - -# How to pass a linker flag through the compiler. -wl=$wl - -# Object file suffix (normally "o"). -objext="$objext" - -# Old archive suffix (normally "a"). -libext="$libext" - -# Executable file suffix (normally ""). -exeext="$exeext" - -# Additional compiler flags for building library objects. -pic_flag=$pic_flag -pic_mode=$pic_mode - -# What is the maximum length of a command? -max_cmd_len=$max_cmd_len - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$compiler_c_o - -# Must we lock files when doing compilation ? -need_locks=$need_locks - -# Do we need the lib prefix for modules? -need_lib_prefix=$need_lib_prefix - -# Do we need a version for libraries? -need_version=$need_version - -# Whether dlopen is supported. -dlopen_support=$enable_dlopen - -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static - -# Compiler flag to prevent dynamic linking. -link_static_flag=$link_static_flag - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$no_builtin_flag - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$export_dynamic_flag_spec - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$whole_archive_flag_spec - -# Compiler flag to generate thread-safe objects. -thread_safe_flag_spec=$thread_safe_flag_spec - -# Library versioning type. -version_type=$version_type - -# Format of library name prefix. -libname_spec=$libname_spec - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME. -library_names_spec=$library_names_spec - -# The coded name of the library, if different from the real name. -soname_spec=$soname_spec - -# Commands used to build and install an old-style archive. -RANLIB=$RANLIB -old_archive_cmds=$old_archive_cmds -old_postinstall_cmds=$old_postinstall_cmds -old_postuninstall_cmds=$old_postuninstall_cmds - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$old_archive_from_new_cmds - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$old_archive_from_expsyms_cmds - -# Commands used to build and install a shared archive. -archive_cmds=$archive_cmds -archive_expsym_cmds=$archive_expsym_cmds -postinstall_cmds=$postinstall_cmds -postuninstall_cmds=$postuninstall_cmds - -# Commands to strip libraries. -old_striplib=$old_striplib -striplib=$striplib - -# Dependencies to place before the objects being linked to create a -# shared library. -predep_objects=$predep_objects - -# Dependencies to place after the objects being linked to create a -# shared library. -postdep_objects=$postdep_objects - -# Dependencies to place before the objects being linked to create a -# shared library. -predeps=$predeps - -# Dependencies to place after the objects being linked to create a -# shared library. -postdeps=$postdeps - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$compiler_lib_search_path - -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$deplibs_check_method - -# Command to use when deplibs_check_method == file_magic. -file_magic_cmd=$file_magic_cmd - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$allow_undefined_flag - -# Flag that forces no undefined symbols. -no_undefined_flag=$no_undefined_flag - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$finish_cmds - -# Same as above, but a single script fragment to be evaled but not shown. -finish_eval=$finish_eval - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$global_symbol_pipe - -# Transform the output of nm in a proper C declaration -global_symbol_to_cdecl=$global_symbol_to_cdecl - -# This is the shared library runtime path variable. -runpath_var=$runpath_var - -# This is the shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec=$hardcode_libdir_flag_spec - -# Whether we need a single -rpath flag with a separated argument. -hardcode_libdir_separator=$hardcode_libdir_separator - -# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the -# resulting binary. -hardcode_direct=$hardcode_direct - -# Set to yes if using the -LDIR flag during linking hardcodes DIR into the -# resulting binary. -hardcode_minus_L=$hardcode_minus_L - -# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into -# the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at relink time. -variables_saved_for_relink="$variables_saved_for_relink" - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs - -# Compile-time system search path for libraries -sys_lib_search_path_spec=$sys_lib_search_path_spec - -# Run-time system search path for libraries -sys_lib_dlsearch_path_spec=$sys_lib_dlsearch_path_spec - -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path="$fix_srcfile_path" - -# Set to yes if exported symbols are required. -always_export_symbols=$always_export_symbols - -# The commands to list exported symbols. -export_symbols_cmds=$export_symbols_cmds - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$extract_expsyms_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$exclude_expsyms - -# Symbols that must always be exported. -include_expsyms=$include_expsyms - -EOF - -if test -z "$tagname"; then - echo '### END LIBTOOL CONFIG' >> "$ofile" -else - echo "### END LIBTOOL TAG CONFIG: $tagname" >> "$ofile" -fi - -case $ltmain in -*.sh) - echo >> "$ofile" - if test -z "$tagname"; then - case $host_os in - aix3*) - cat <<\EOF >> "$ofile" - -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -EOF - ;; - esac - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) - cat <<'EOF' >> "$ofile" - # This is a source program that is used to create dlls on Windows - # Don't remove nor modify the starting and closing comments -# /* ltdll.c starts here */ -# #define WIN32_LEAN_AND_MEAN -# #include -# #undef WIN32_LEAN_AND_MEAN -# #include -# -# #ifndef __CYGWIN__ -# # ifdef __CYGWIN32__ -# # define __CYGWIN__ __CYGWIN32__ -# # endif -# #endif -# -# #ifdef __cplusplus -# extern "C" { -# #endif -# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); -# #ifdef __cplusplus -# } -# #endif -# -# #ifdef __CYGWIN__ -# #include -# DECLARE_CYGWIN_DLL( DllMain ); -# #endif -# HINSTANCE __hDllInstance_base; -# -# BOOL APIENTRY -# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) -# { -# __hDllInstance_base = hInst; -# return TRUE; -# } -# /* ltdll.c ends here */ - # This is a source program that is used to create import libraries - # on Windows for dlls which lack them. Don't remove nor modify the - # starting and closing comments -# /* impgen.c starts here */ -# /* Copyright (C) 1999-2000 Free Software Foundation, Inc. -# -# This file is part of GNU libtool. -# -# 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 of the License, 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. -# */ -# -# #include /* for printf() */ -# #include /* for open(), lseek(), read() */ -# #include /* for O_RDONLY, O_BINARY */ -# #include /* for strdup() */ -# -# /* O_BINARY isn't required (or even defined sometimes) under Unix */ -# #ifndef O_BINARY -# #define O_BINARY 0 -# #endif -# -# static unsigned int -# pe_get16 (fd, offset) -# int fd; -# int offset; -# { -# unsigned char b[2]; -# lseek (fd, offset, SEEK_SET); -# read (fd, b, 2); -# return b[0] + (b[1]<<8); -# } -# -# static unsigned int -# pe_get32 (fd, offset) -# int fd; -# int offset; -# { -# unsigned char b[4]; -# lseek (fd, offset, SEEK_SET); -# read (fd, b, 4); -# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); -# } -# -# static unsigned int -# pe_as32 (ptr) -# void *ptr; -# { -# unsigned char *b = ptr; -# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); -# } -# -# int -# main (argc, argv) -# int argc; -# char *argv[]; -# { -# int dll; -# unsigned long pe_header_offset, opthdr_ofs, num_entries, i; -# unsigned long export_rva, export_size, nsections, secptr, expptr; -# unsigned long name_rvas, nexp; -# unsigned char *expdata, *erva; -# char *filename, *dll_name; -# -# filename = argv[1]; -# -# dll = open(filename, O_RDONLY|O_BINARY); -# if (dll < 1) -# return 1; -# -# dll_name = filename; -# -# for (i=0; filename[i]; i++) -# if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':') -# dll_name = filename + i +1; -# -# pe_header_offset = pe_get32 (dll, 0x3c); -# opthdr_ofs = pe_header_offset + 4 + 20; -# num_entries = pe_get32 (dll, opthdr_ofs + 92); -# -# if (num_entries < 1) /* no exports */ -# return 1; -# -# export_rva = pe_get32 (dll, opthdr_ofs + 96); -# export_size = pe_get32 (dll, opthdr_ofs + 100); -# nsections = pe_get16 (dll, pe_header_offset + 4 +2); -# secptr = (pe_header_offset + 4 + 20 + -# pe_get16 (dll, pe_header_offset + 4 + 16)); -# -# expptr = 0; -# for (i = 0; i < nsections; i++) -# { -# char sname[8]; -# unsigned long secptr1 = secptr + 40 * i; -# unsigned long vaddr = pe_get32 (dll, secptr1 + 12); -# unsigned long vsize = pe_get32 (dll, secptr1 + 16); -# unsigned long fptr = pe_get32 (dll, secptr1 + 20); -# lseek(dll, secptr1, SEEK_SET); -# read(dll, sname, 8); -# if (vaddr <= export_rva && vaddr+vsize > export_rva) -# { -# expptr = fptr + (export_rva - vaddr); -# if (export_rva + export_size > vaddr + vsize) -# export_size = vsize - (export_rva - vaddr); -# break; -# } -# } -# -# expdata = (unsigned char*)malloc(export_size); -# lseek (dll, expptr, SEEK_SET); -# read (dll, expdata, export_size); -# erva = expdata - export_rva; -# -# nexp = pe_as32 (expdata+24); -# name_rvas = pe_as32 (expdata+32); -# -# printf ("EXPORTS\n"); -# for (i = 0; i> "$ofile" || (rm -f "$ofile"; exit 1) - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - - chmod +x "$ofile" - fi - ;; - -*) - # Compile the libtool program. - echo "FIXME: would compile $ltmain" - ;; -esac - -# Update the list of available tags. -if test -n "$tagname"; then - - # Extract list of available tagged configurations in $ofile. - # Note that this assumes the entire list is on one line. - available_tags=`grep "^available_tags=" $ofile | sed -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` - - # Append the new tag name to the list of available tags. - available_tags="$available_tags $tagname" - - # Now substitute the updated of available tags. - if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' ${ofile} > ${ofile}.new"; then - mv ${ofile}.new ${ofile} - chmod +x "$ofile" - else - rm -f ${ofile}.new - echo "$progname: unable to update list of available tagged configurations." - exit 1 - fi -fi - -# Don't cache tagged configuration! -test -n "$cache_file" && test -z "$tagname" || exit 0 - -# AC_CACHE_SAVE -trap '' 1 2 15 -cat > confcache <<\EOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs. It is not useful on other systems. -# If it contains results you don't want to keep, you may remove or edit it. -# -# By default, configure uses ./config.cache as the cache file, -# creating it if it does not exist already. You can give configure -# the --cache-file=FILE option to use a different cache file; that is -# what configure does when it calls configure scripts in -# subdirectories, so they share the cache. -# Giving --cache-file=/dev/null disables caching, for debugging configure. -# config.status only pays attention to the cache file if you give it the -# --recheck option to rerun configure. -# -EOF -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, don't put newlines in cache variables' values. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -(set) 2>&1 | - case `(ac_space=' '; set | grep ac_space) 2>&1` in - *ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote substitution - # turns \\\\ into \\, and sed turns \\ into \). - sed -n \ - -e "s/'/'\\\\''/g" \ - -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" - ;; - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' - ;; - esac >> confcache -if cmp -s $cache_file confcache; then - : -else - if test -w $cache_file; then - echo "updating cache $cache_file" - cat confcache > $cache_file - else - echo "not updating unwritable cache $cache_file" - fi -fi -rm -f confcache - -exit 0 - -# Local Variables: -# mode:shell-script -# sh-indentation:2 -# End: diff --git a/contrib/gcc/ltmain.sh b/contrib/gcc/ltmain.sh deleted file mode 100644 index 92526b6..0000000 --- a/contrib/gcc/ltmain.sh +++ /dev/null @@ -1,5483 +0,0 @@ -# ltmain.sh - Provide generalized library-building support services. -# NOTE: Changing this file will not affect anything until you rerun ltconfig. -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 -# Free Software Foundation, Inc. -# Originally by Gordon Matzigkeit , 1996 -# -# 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 of the License, 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 to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# Check that we have a working $echo. -if test "X$1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X$1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then - # Yippee, $echo works! - : -else - # Restart under the correct shell, and then maybe $echo will work. - exec $SHELL "$0" --no-reexec ${1+"$@"} -fi - -if test "X$1" = X--fallback-echo; then - # used as fallback echo - shift - cat <&2 - echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 - exit 1 -fi - -if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then - echo "$modename: not configured to build any kind of library" 1>&2 - echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 - exit 1 -fi - -# Global variables. -mode=$default_mode -nonopt= -prev= -prevopt= -run= -show="$echo" -show_help= -execute_dlfiles= -lo2o="s/\\.lo\$/.${objext}/" -o2lo="s/\\.${objext}\$/.lo/" -taglist= - -# Parse our command line options once, thoroughly. -while test $# -gt 0 -do - arg="$1" - shift - - case $arg in - -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; - *) optarg= ;; - esac - - # If the previous option needs an argument, assign it. - if test -n "$prev"; then - case $prev in - execute_dlfiles) - execute_dlfiles="$execute_dlfiles $arg" - ;; - tag) - tagname="$arg" - - # Check whether tagname contains only valid characters - case $tagname in - *[!-_A-Za-z0-9,/]*) - echo "$progname: invalid tag name: $tagname" 1>&2 - exit 1 - ;; - esac - - case $tagname in - CC) - # Don't test for the "default" C tag, as we know, it's there, but - # not specially marked. - taglist="$taglist $tagname" - ;; - *) - if grep "^### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$0" > /dev/null; then - taglist="$taglist $tagname" - # Evaluate the configuration. - eval "`sed -n -e '/^### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $0`" - else - echo "$progname: ignoring unknown tag $tagname" 1>&2 - fi - ;; - esac - ;; - *) - eval "$prev=\$arg" - ;; - esac - - prev= - prevopt= - continue - fi - - # Have we seen a non-optional argument yet? - case $arg in - --help) - show_help=yes - ;; - - --version) - echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP" - exit 0 - ;; - - --config) - sed -n -e '/^### BEGIN LIBTOOL CONFIG/,/^### END LIBTOOL CONFIG/p' < "$0" - # Now print the configurations for the tags. - for tagname in $taglist; do - sed -n -e "/^### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^### END LIBTOOL TAG CONFIG: $tagname$/p" < "$0" - done - exit 0 - ;; - - --debug) - echo "$progname: enabling shell trace mode" - set -x - ;; - - --dry-run | -n) - run=: - ;; - - --features) - echo "host: $host" - if test "$build_libtool_libs" = yes; then - echo "enable shared libraries" - else - echo "disable shared libraries" - fi - if test "$build_old_libs" = yes; then - echo "enable static libraries" - else - echo "disable static libraries" - fi - exit 0 - ;; - - --finish) mode="finish" ;; - - --mode) prevopt="--mode" prev=mode ;; - --mode=*) mode="$optarg" ;; - - --quiet | --silent) - show=: - ;; - - --tag) prevopt="--tag" prev=tag ;; - --tag=*) - set tag "$optarg" ${1+"$@"} - shift - prev=tag - ;; - - -dlopen) - prevopt="-dlopen" - prev=execute_dlfiles - ;; - - -*) - $echo "$modename: unrecognized option \`$arg'" 1>&2 - $echo "$help" 1>&2 - exit 1 - ;; - - *) - nonopt="$arg" - break - ;; - esac -done - -if test -n "$prevopt"; then - $echo "$modename: option \`$prevopt' requires an argument" 1>&2 - $echo "$help" 1>&2 - exit 1 -fi - -# If this variable is set in any of the actions, the command in it -# will be execed at the end. This prevents here-documents from being -# left over by shells. -exec_cmd= - -if test -z "$show_help"; then - - # Infer the operation mode. - if test -z "$mode"; then - case $nonopt in - *cc | *++ | gcc* | *-gcc*) - mode=link - for arg - do - case $arg in - -c) - mode=compile - break - ;; - esac - done - ;; - *db | *dbx | *strace | *truss) - mode=execute - ;; - *install*|cp|mv) - mode=install - ;; - *rm) - mode=uninstall - ;; - *) - # If we have no mode, but dlfiles were specified, then do execute mode. - test -n "$execute_dlfiles" && mode=execute - - # Just use the default operation mode. - if test -z "$mode"; then - if test -n "$nonopt"; then - $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2 - else - $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2 - fi - fi - ;; - esac - fi - - # Only execute mode is allowed to have -dlopen flags. - if test -n "$execute_dlfiles" && test "$mode" != execute; then - $echo "$modename: unrecognized option \`-dlopen'" 1>&2 - $echo "$help" 1>&2 - exit 1 - fi - - # Change the help message to a mode-specific one. - generic_help="$help" - help="Try \`$modename --help --mode=$mode' for more information." - - # These modes are in order of execution frequency so that they run quickly. - case $mode in - # libtool compile mode - compile) - modename="$modename: compile" - # Get the compilation command and the source file. - base_compile= - prev= - lastarg= - srcfile="$nonopt" - suppress_output= - - user_target=no - for arg - do - case $prev in - "") ;; - xcompiler) - # Aesthetically quote the previous argument. - prev= - lastarg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - - case $arg in - # Double-quote args containing other shell metacharacters. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - - # Add the previous argument to base_compile. - if test -z "$base_compile"; then - base_compile="$lastarg" - else - base_compile="$base_compile $lastarg" - fi - continue - ;; - esac - - # Accept any command-line options. - case $arg in - -o) - if test "$user_target" != "no"; then - $echo "$modename: you cannot specify \`-o' more than once" 1>&2 - exit 1 - fi - user_target=next - ;; - - -static) - build_old_libs=yes - continue - ;; - - -prefer-pic) - pic_mode=yes - continue - ;; - - -prefer-non-pic) - pic_mode=no - continue - ;; - - -Xcompiler) - prev=xcompiler - continue - ;; - - -Wc,*) - args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` - lastarg= - IFS="${IFS= }"; save_ifs="$IFS"; IFS=',' - for arg in $args; do - IFS="$save_ifs" - - # Double-quote args containing other shell metacharacters. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - lastarg="$lastarg $arg" - done - IFS="$save_ifs" - lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"` - - # Add the arguments to base_compile. - if test -z "$base_compile"; then - base_compile="$lastarg" - else - base_compile="$base_compile $lastarg" - fi - continue - ;; - esac - - case $user_target in - next) - # The next one is the -o target name - user_target=yes - continue - ;; - yes) - # We got the output file - user_target=set - libobj="$arg" - continue - ;; - esac - - # Accept the current argument as the source file. - lastarg="$srcfile" - srcfile="$arg" - - # Aesthetically quote the previous argument. - - # Backslashify any backslashes, double quotes, and dollar signs. - # These are the only characters that are still specially - # interpreted inside of double-quoted scrings. - lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` - - # Double-quote args containing other shell metacharacters. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - case $lastarg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - lastarg="\"$lastarg\"" - ;; - esac - - # Add the previous argument to base_compile. - if test -z "$base_compile"; then - base_compile="$lastarg" - else - base_compile="$base_compile $lastarg" - fi - done - - case $user_target in - set) - ;; - no) - # Get the name of the library object. - libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` - ;; - *) - $echo "$modename: you must specify a target with \`-o'" 1>&2 - exit 1 - ;; - esac - - # Recognize several different file suffixes. - # If the user specifies -o file.o, it is replaced with file.lo - xform='[cCFSfmso]' - case $libobj in - *.ada) xform=ada ;; - *.adb) xform=adb ;; - *.ads) xform=ads ;; - *.asm) xform=asm ;; - *.c++) xform=c++ ;; - *.cc) xform=cc ;; - *.class) xform=class ;; - *.cpp) xform=cpp ;; - *.cxx) xform=cxx ;; - *.f90) xform=f90 ;; - *.for) xform=for ;; - *.java) xform=java ;; - esac - - libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` - - case $libobj in - *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; - *) - $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 - exit 1 - ;; - esac - - # Infer tagged configuration to use if any are available and - # if one wasn't chosen via the "--tag" command line option. - # Only attempt this if the compiler in the base compile - # command doesn't match the default compiler. - if test -n "$available_tags" && test -z "$tagname"; then - case $base_compile in - "$CC "*) ;; - # Blanks in the command may have been stripped by the calling shell, - # but not from the CC environment variable when ltconfig was run. - "`$echo $CC` "*) ;; - *) - for z in $available_tags; do - if grep "^### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev/null; then - # Evaluate the configuration. - eval "`sed -n -e '/^### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`" - case $base_compile in - "$CC "*) - # The compiler in the base compile command matches - # the one in the tagged configuration. - # Assume this is the tagged configuration we want. - tagname=$z - break - ;; - "`$echo $CC` "*) - tagname=$z - break - ;; - esac - fi - done - # If $tagname still isn't set, then no tagged configuration - # was found and let the user know that the "--tag" command - # line option must be used. - if test -z "$tagname"; then - echo "$modename: unable to infer tagged configuration" - echo "$modename: specify a tag with \`--tag'" 1>&2 - exit 1 -# else -# echo "$modename: using $tagname tagged configuration" - fi - ;; - esac - fi - - objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` - xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$obj"; then - xdir= - else - xdir=$xdir/ - fi - lobj=${xdir}$objdir/$objname - - if test -z "$base_compile"; then - $echo "$modename: you must specify a compilation command" 1>&2 - $echo "$help" 1>&2 - exit 1 - fi - - # Delete any leftover library objects. - if test "$build_old_libs" = yes; then - removelist="$obj $lobj $libobj ${libobj}T" - else - removelist="$lobj $libobj ${libobj}T" - fi - - $run $rm $removelist - trap "$run $rm $removelist; exit 1" 1 2 15 - - # On Cygwin there's no "real" PIC flag so we must build both object types - case $host_os in - cygwin* | mingw* | pw32* | os2*) - pic_mode=default - ;; - esac - if test $pic_mode = no && test "$deplibs_check_method" != pass_all; then - # non-PIC code in shared libraries is not supported - pic_mode=default - fi - - # Calculate the filename of the output object if compiler does - # not support -o with -c - if test "$compiler_c_o" = no; then - output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} - lockfile="$output_obj.lock" - removelist="$removelist $output_obj $lockfile" - trap "$run $rm $removelist; exit 1" 1 2 15 - else - output_obj= - need_locks=no - lockfile= - fi - - # Lock this critical section if it is needed - # We use this script file to make the link, it avoids creating a new file - if test "$need_locks" = yes; then - until $run ln "$0" "$lockfile" 2>/dev/null; do - $show "Waiting for $lockfile to be removed" - sleep 2 - done - elif test "$need_locks" = warn; then - if test -f "$lockfile"; then - echo "\ -*** ERROR, $lockfile exists and contains: -`cat $lockfile 2>/dev/null` - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $run $rm $removelist - exit 1 - fi - echo $srcfile > "$lockfile" - fi - - if test -n "$fix_srcfile_path"; then - eval srcfile=\"$fix_srcfile_path\" - fi - - $run $rm "$libobj" "${libobj}T" - - # Create a libtool object file (analogous to a ".la" file), - # but don't create it if we're doing a dry run. - test -z "$run" && cat > ${libobj}T </dev/null`" != x"$srcfile"; then - echo "\ -*** ERROR, $lockfile contains: -`cat $lockfile 2>/dev/null` - -but it should contain: -$srcfile - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $run $rm $removelist - exit 1 - fi - - # Just move the object if needed, then go on to compile the next one - if test -n "$output_obj" && test "x$output_obj" != "x$lobj"; then - $show "$mv $output_obj $lobj" - if $run $mv $output_obj $lobj; then : - else - error=$? - $run $rm $removelist - exit $error - fi - fi - - # Append the name of the PIC object to the libtool object file. - test -z "$run" && cat >> ${libobj}T <> ${libobj}T </dev/null`" != x"$srcfile"; then - echo "\ -*** ERROR, $lockfile contains: -`cat $lockfile 2>/dev/null` - -but it should contain: -$srcfile - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $run $rm $removelist - exit 1 - fi - - # Just move the object if needed - if test -n "$output_obj" && test "x$output_obj" != "x$obj"; then - $show "$mv $output_obj $obj" - if $run $mv $output_obj $obj; then : - else - error=$? - $run $rm $removelist - exit $error - fi - fi - - # Append the name of the non-PIC object the libtool object file. - # Only append if the libtool object file exists. - test -z "$run" && cat >> ${libobj}T <> ${libobj}T <&2 - fi - if test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - else - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - fi - build_libtool_libs=no - build_old_libs=yes - prefer_static_libs=yes - break - ;; - esac - done - - # See if our shared archives depend on static archives. - test -n "$old_archive_from_new_cmds" && build_old_libs=yes - - # Go through the arguments, transforming them on the way. - while test $# -gt 0; do - arg="$1" - base_compile="$base_compile $arg" - shift - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test - ;; - *) qarg=$arg ;; - esac - libtool_args="$libtool_args $qarg" - - # If the previous option needs an argument, assign it. - if test -n "$prev"; then - case $prev in - output) - compile_command="$compile_command @OUTPUT@" - finalize_command="$finalize_command @OUTPUT@" - ;; - esac - - case $prev in - dlfiles|dlprefiles) - if test "$preload" = no; then - # Add the symbol object into the linking commands. - compile_command="$compile_command @SYMFILE@" - finalize_command="$finalize_command @SYMFILE@" - preload=yes - fi - case $arg in - *.la | *.lo) ;; # We handle these cases below. - force) - if test "$dlself" = no; then - dlself=needless - export_dynamic=yes - fi - prev= - continue - ;; - self) - if test "$prev" = dlprefiles; then - dlself=yes - elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then - dlself=yes - else - dlself=needless - export_dynamic=yes - fi - prev= - continue - ;; - *) - if test "$prev" = dlfiles; then - dlfiles="$dlfiles $arg" - else - dlprefiles="$dlprefiles $arg" - fi - prev= - continue - ;; - esac - ;; - expsyms) - export_symbols="$arg" - if test ! -f "$arg"; then - $echo "$modename: symbol file \`$arg' does not exist" - exit 1 - fi - prev= - continue - ;; - expsyms_regex) - export_symbols_regex="$arg" - prev= - continue - ;; - release) - release="-$arg" - prev= - continue - ;; - objectlist) - if test -f "$arg"; then - save_arg=$arg - moreargs= - for fil in `cat $save_arg` - do -# moreargs="$moreargs $fil" - arg=$fil - # A libtool-controlled object. - - # Check to see that this really is a libtool object. - if (sed -e '2q' $arg | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - pic_object= - non_pic_object= - - # Read the .lo file - # If there is no directory component, then add one. - case $arg in - */* | *\\*) . $arg ;; - *) . ./$arg ;; - esac - - if test -z "$pic_object" || \ - test -z "$non_pic_object" || - test "$pic_object" = none && \ - test "$non_pic_object" = none; then - $echo "$modename: cannot find name of object for \`$arg'" 1>&2 - exit 1 - fi - - # Extract subdirectory from the argument. - xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$arg"; then - xdir= - else - xdir="$xdir/" - fi - - if test "$pic_object" != none; then - # Prepend the subdirectory the object is found in. - pic_object="$xdir$pic_object" - - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then - dlfiles="$dlfiles $pic_object" - prev= - continue - else - # If libtool objects are unsupported, then we need to preload. - prev=dlprefiles - fi - fi - - # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then - # Preload the old-style object. - dlprefiles="$dlprefiles $pic_object" - prev= - fi - - # A PIC object. - libobjs="$libobjs $pic_object" - arg="$pic_object" - fi - - # Non-PIC object. - if test "$non_pic_object" != none; then - # Prepend the subdirectory the object is found in. - non_pic_object="$xdir$non_pic_object" - - # A standard non-PIC object - non_pic_objects="$non_pic_objects $non_pic_object" - if test -z "$pic_object" || test "$pic_object" = none ; then - arg="$non_pic_object" - fi - fi - else - # Only an error if not doing a dry-run. - if test -z "$run"; then - $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 - exit 1 - else - # Dry-run case. - - # Extract subdirectory from the argument. - xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$arg"; then - xdir= - else - xdir="$xdir/" - fi - - pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` - non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` - libobjs="$libobjs $pic_object" - non_pic_objects="$non_pic_objects $non_pic_object" - fi - fi - done - else - $echo "$modename: link input file \`$save_arg' does not exist" - exit 1 - fi - arg=$save_arg - prev= - continue - ;; - rpath | xrpath) - # We need an absolute path. - case $arg in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - $echo "$modename: only absolute run-paths are allowed" 1>&2 - exit 1 - ;; - esac - if test "$prev" = rpath; then - case "$rpath " in - *" $arg "*) ;; - *) rpath="$rpath $arg" ;; - esac - else - case "$xrpath " in - *" $arg "*) ;; - *) xrpath="$xrpath $arg" ;; - esac - fi - prev= - continue - ;; - xcompiler) - compiler_flags="$compiler_flags $qarg" - prev= - compile_command="$compile_command $qarg" - finalize_command="$finalize_command $qarg" - continue - ;; - xlinker) - linker_flags="$linker_flags $qarg" - compiler_flags="$compiler_flags $wl$qarg" - prev= - compile_command="$compile_command $wl$qarg" - finalize_command="$finalize_command $wl$qarg" - continue - ;; - *) - eval "$prev=\"\$arg\"" - prev= - continue - ;; - esac - fi # test -n $prev - - prevarg="$arg" - - case $arg in - -all-static) - if test -n "$link_static_flag"; then - compile_command="$compile_command $link_static_flag" - finalize_command="$finalize_command $link_static_flag" - fi - continue - ;; - - -allow-undefined) - # FIXME: remove this flag sometime in the future. - $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2 - continue - ;; - - -avoid-version) - avoid_version=yes - continue - ;; - - -dlopen) - prev=dlfiles - continue - ;; - - -dlpreopen) - prev=dlprefiles - continue - ;; - - -export-dynamic) - export_dynamic=yes - continue - ;; - - -export-symbols | -export-symbols-regex) - if test -n "$export_symbols" || test -n "$export_symbols_regex"; then - $echo "$modename: more than one -exported-symbols argument is not allowed" - exit 1 - fi - if test "X$arg" = "X-export-symbols"; then - prev=expsyms - else - prev=expsyms_regex - fi - continue - ;; - - # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* - # so, if we see these flags be careful not to treat them like -L - -L[A-Z][A-Z]*:*) - case $with_gcc/$host in - no/*-*-irix*) - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - ;; - esac - continue - ;; - - -L*) - dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - absdir=`cd "$dir" && pwd` - if test -z "$absdir"; then - $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 - exit 1 - fi - dir="$absdir" - ;; - esac - case "$deplibs " in - *" -L$dir "*) ;; - *) - deplibs="$deplibs -L$dir" - lib_search_path="$lib_search_path $dir" - ;; - esac - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) - case :$dllsearchpath: in - *":$dir:"*) ;; - *) dllsearchpath="$dllsearchpath:$dir";; - esac - ;; - esac - continue - ;; - - -l*) - if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then - case $host in - *-*-cygwin* | *-*-pw32* | *-*-beos*) - # These systems don't actually have a C or math library (as such) - continue - ;; - *-*-mingw* | *-*-os2*) - # These systems don't actually have a C library (as such) - test "X$arg" = "X-lc" && continue - ;; - esac - fi - deplibs="$deplibs $arg" - continue - ;; - - -module) - module=yes - continue - ;; - - -no-fast-install) - fast_install=no - continue - ;; - - -no-install) - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) - # The PATH hackery in wrapper scripts is required on Windows - # in order for the loader to find any dlls it needs. - $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2 - $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 - fast_install=no - ;; - *) no_install=yes ;; - esac - continue - ;; - - -no-undefined) - allow_undefined=no - continue - ;; - - -objectlist) - prev=objectlist - continue - ;; - - -o) prev=output ;; - - -release) - prev=release - continue - ;; - - -rpath) - prev=rpath - continue - ;; - - -R) - prev=xrpath - continue - ;; - - -R*) - dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - $echo "$modename: only absolute run-paths are allowed" 1>&2 - exit 1 - ;; - esac - case "$xrpath " in - *" $dir "*) ;; - *) xrpath="$xrpath $dir" ;; - esac - continue - ;; - - -static) - # The effects of -static are defined in a previous loop. - # We used to do the same as -all-static on platforms that - # didn't have a PIC flag, but the assumption that the effects - # would be equivalent was wrong. It would break on at least - # Digital Unix and AIX. - continue - ;; - - -thread-safe) - thread_safe=yes - continue - ;; - - -version-info) - prev=vinfo - continue - ;; - - -Wc,*) - args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'` - arg= - IFS="${IFS= }"; save_ifs="$IFS"; IFS=',' - for flag in $args; do - IFS="$save_ifs" - case $flag in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - flag="\"$flag\"" - ;; - esac - arg="$arg $wl$flag" - compiler_flags="$compiler_flags $flag" - done - IFS="$save_ifs" - arg=`$echo "X$arg" | $Xsed -e "s/^ //"` - ;; - - -Wl,*) - args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'` - arg= - IFS="${IFS= }"; save_ifs="$IFS"; IFS=',' - for flag in $args; do - IFS="$save_ifs" - case $flag in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - flag="\"$flag\"" - ;; - esac - arg="$arg $wl$flag" - compiler_flags="$compiler_flags $wl$flag" - linker_flags="$linker_flags $flag" - done - IFS="$save_ifs" - arg=`$echo "X$arg" | $Xsed -e "s/^ //"` - ;; - - -Xcompiler) - prev=xcompiler - continue - ;; - - -Xlinker) - prev=xlinker - continue - ;; - - # Some other compiler flag. - -* | +*) - # Unknown arguments in both finalize_command and compile_command need - # to be aesthetically quoted because they are evaled later. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - ;; - - *.$objext) - # A standard object. - objs="$objs $arg" - ;; - - *.lo) - # A libtool-controlled object. - - # Check to see that this really is a libtool object. - if (sed -e '2q' $arg | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - pic_object= - non_pic_object= - - # Read the .lo file - # If there is no directory component, then add one. - case $arg in - */* | *\\*) . $arg ;; - *) . ./$arg ;; - esac - - if test -z "$pic_object" || \ - test -z "$non_pic_object" || - test "$pic_object" = none && \ - test "$non_pic_object" = none; then - $echo "$modename: cannot find name of object for \`$arg'" 1>&2 - exit 1 - fi - - # Extract subdirectory from the argument. - xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$arg"; then - xdir= - else - xdir="$xdir/" - fi - - if test "$pic_object" != none; then - # Prepend the subdirectory the object is found in. - pic_object="$xdir$pic_object" - - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then - dlfiles="$dlfiles $pic_object" - prev= - continue - else - # If libtool objects are unsupported, then we need to preload. - prev=dlprefiles - fi - fi - - # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then - # Preload the old-style object. - dlprefiles="$dlprefiles $pic_object" - prev= - fi - - # A PIC object. - libobjs="$libobjs $pic_object" - arg="$pic_object" - fi - - # Non-PIC object. - if test "$non_pic_object" != none; then - # Prepend the subdirectory the object is found in. - non_pic_object="$xdir$non_pic_object" - - # A standard non-PIC object - non_pic_objects="$non_pic_objects $non_pic_object" - if test -z "$pic_object" || test "$pic_object" = none ; then - arg="$non_pic_object" - fi - fi - else - # Only an error if not doing a dry-run. - if test -z "$run"; then - $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 - exit 1 - else - # Dry-run case. - - # Extract subdirectory from the argument. - xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$arg"; then - xdir= - else - xdir="$xdir/" - fi - - pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` - non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` - libobjs="$libobjs $pic_object" - non_pic_objects="$non_pic_objects $non_pic_object" - fi - fi - ;; - - *.$libext) - # An archive. - deplibs="$deplibs $arg" - old_deplibs="$old_deplibs $arg" - continue - ;; - - *.la) - # A libtool-controlled library. - - if test "$prev" = dlfiles; then - # This library was specified with -dlopen. - dlfiles="$dlfiles $arg" - prev= - elif test "$prev" = dlprefiles; then - # The library was specified with -dlpreopen. - dlprefiles="$dlprefiles $arg" - prev= - else - deplibs="$deplibs $arg" - fi - continue - ;; - - # Some other compiler argument. - *) - # Unknown arguments in both finalize_command and compile_command need - # to be aesthetically quoted because they are evaled later. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - ;; - esac # arg - - # Now actually substitute the argument into the commands. - if test -n "$arg"; then - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - fi - done # argument parsing loop - - if test -n "$prev"; then - $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 - $echo "$help" 1>&2 - exit 1 - fi - - # Infer tagged configuration to use if any are available and - # if one wasn't chosen via the "--tag" command line option. - # Only attempt this if the compiler in the base link - # command doesn't match the default compiler. - if test -n "$available_tags" && test -z "$tagname"; then - case $base_compile in - "$CC "*) ;; - # Blanks in the command may have been stripped by the calling shell, - # but not from the CC environment variable when ltconfig was run. - "`$echo $CC` "*) ;; - *) - for z in $available_tags; do - if grep "^### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev/null; then - # Evaluate the configuration. - eval "`sed -n -e '/^### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`" - case $base_compile in - "$CC "*) - # The compiler in $compile_command matches - # the one in the tagged configuration. - # Assume this is the tagged configuration we want. - tagname=$z - break - ;; - "`$echo $CC` "*) - tagname=$z - break - ;; - esac - fi - done - # If $tagname still isn't set, then no tagged configuration - # was found and let the user know that the "--tag" command - # line option must be used. - if test -z "$tagname"; then - echo "$modename: unable to infer tagged configuration" - echo "$modename: specify a tag with \`--tag'" 1>&2 - exit 1 -# else -# echo "$modename: using $tagname tagged configuration" - fi - ;; - esac - fi - - if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then - eval arg=\"$export_dynamic_flag_spec\" - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - fi - - # calculate the name of the file, without its directory - outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` - libobjs_save="$libobjs" - - if test -n "$shlibpath_var"; then - # get the directories listed in $shlibpath_var - eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` - else - shlib_search_path= - fi - eval sys_lib_search_path=\"$sys_lib_search_path_spec\" - eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" - - output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` - if test "X$output_objdir" = "X$output"; then - output_objdir="$objdir" - else - output_objdir="$output_objdir/$objdir" - fi - # Create the object directory. - if test ! -d $output_objdir; then - $show "$mkdir $output_objdir" - $run $mkdir $output_objdir - status=$? - if test $status -ne 0 && test ! -d $output_objdir; then - exit $status - fi - fi - - # Determine the type of output - case $output in - "") - $echo "$modename: you must specify an output file" 1>&2 - $echo "$help" 1>&2 - exit 1 - ;; - *.$libext) linkmode=oldlib ;; - *.lo | *.$objext) linkmode=obj ;; - *.la) linkmode=lib ;; - *) linkmode=prog ;; # Anything else should be a program. - esac - - specialdeplibs= - libs= - # Find all interdependent deplibs by searching for libraries - # that are linked more than once (e.g. -la -lb -la) - for deplib in $deplibs; do - case "$libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - libs="$libs $deplib" - done - - if test $linkmode = lib; then - libs="$predeps $libs $compiler_lib_search_path $postdeps" - - # Compute libraries that are listed more than once in $predeps - # $postdeps and mark them as special (i.e., whose duplicates are - # not to be eliminated). - pre_post_deps= - for pre_post_dep in $predeps $postdeps; do - case "$pre_post_deps " in - *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; - esac - pre_post_deps="$pre_post_deps $pre_post_dep" - done - pre_post_deps= - fi - - deplibs= - newdependency_libs= - newlib_search_path= - need_relink=no # whether we're linking any uninstalled libtool libraries - notinst_deplibs= # not-installed libtool libraries - notinst_path= # paths that contain not-installed libtool libraries - case $linkmode in - lib) - passes="conv link" - for file in $dlfiles $dlprefiles; do - case $file in - *.la) ;; - *) - $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2 - exit 1 - ;; - esac - done - ;; - prog) - compile_deplibs= - finalize_deplibs= - alldeplibs=no - newdlfiles= - newdlprefiles= - passes="conv scan dlopen dlpreopen link" - ;; - *) passes="conv" - ;; - esac - for pass in $passes; do - if test $linkmode = prog; then - # Determine which files to process - case $pass in - dlopen) - libs="$dlfiles" - save_deplibs="$deplibs" # Collect dlpreopened libraries - deplibs= - ;; - dlpreopen) libs="$dlprefiles" ;; - link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; - esac - fi - for deplib in $libs; do - lib= - found=no - case $deplib in - -l*) - if test $linkmode = oldlib && test $linkmode = obj; then - $echo "$modename: warning: \`-l' is ignored for archives/objects: $deplib" 1>&2 - continue - fi - if test $pass = conv; then - deplibs="$deplib $deplibs" - continue - fi - name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` - for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do - # Search the libtool library - lib="$searchdir/lib${name}.la" - if test -f "$lib"; then - found=yes - break - fi - done - if test "$found" != yes; then - # deplib doesn't seem to be a libtool library - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - test $linkmode = lib && newdependency_libs="$deplib $newdependency_libs" - fi - continue - fi - ;; # -l - -L*) - case $linkmode in - lib) - deplibs="$deplib $deplibs" - test $pass = conv && continue - newdependency_libs="$deplib $newdependency_libs" - newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` - ;; - prog) - if test $pass = conv; then - deplibs="$deplib $deplibs" - continue - fi - if test $pass = scan; then - deplibs="$deplib $deplibs" - newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi - ;; - *) - $echo "$modename: warning: \`-L' is ignored for archives/objects: $deplib" 1>&2 - ;; - esac # linkmode - continue - ;; # -L - -R*) - if test $pass = link; then - dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'` - # Make sure the xrpath contains only unique directories. - case "$xrpath " in - *" $dir "*) ;; - *) xrpath="$xrpath $dir" ;; - esac - fi - deplibs="$deplib $deplibs" - continue - ;; - *.la) lib="$deplib" ;; - *.$libext) - if test $pass = conv; then - deplibs="$deplib $deplibs" - continue - fi - case $linkmode in - lib) - if test "$deplibs_check_method" != pass_all; then - echo - echo "*** Warning: This library needs some functionality provided by $deplib." - echo "*** I have the capability to make that library automatically link in when" - echo "*** you link to this library. But I can only do this if you have a" - echo "*** shared version of the library, which you do not appear to have." - else - echo - echo "*** Warning: Linking the shared library $output against the" - echo "*** static library $deplib is not portable!" - deplibs="$deplib $deplibs" - fi - continue - ;; - prog) - if test $pass != link; then - deplibs="$deplib $deplibs" - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi - continue - ;; - esac # linkmode - ;; # *.$libext - *.lo | *.$objext) - if test $pass = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then - # If there is no dlopen support or we're linking statically, - # we need to preload. - newdlprefiles="$newdlprefiles $deplib" - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - newdlfiles="$newdlfiles $deplib" - fi - continue - ;; - %DEPLIBS%) - alldeplibs=yes - continue - ;; - esac # case $deplib - if test $found = yes || test -f "$lib"; then : - else - $echo "$modename: cannot find the library \`$lib'" 1>&2 - exit 1 - fi - - # Check to see that this really is a libtool archive. - if (sed -e '2q' $lib | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : - else - $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 - exit 1 - fi - - ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` - test "X$ladir" = "X$lib" && ladir="." - - dlname= - dlopen= - dlpreopen= - libdir= - library_names= - old_library= - # If the library was installed with an old release of libtool, - # it will not redefine variable installed. - installed=yes - - # Read the .la file - case $lib in - */* | *\\*) . $lib ;; - *) . ./$lib ;; - esac - - if test "$linkmode,$pass" = "lib,link" || - test "$linkmode,$pass" = "prog,scan" || - { test $linkmode = oldlib && test $linkmode = obj; }; then - # Add dl[pre]opened files of deplib - test -n "$dlopen" && dlfiles="$dlfiles $dlopen" - test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" - fi - - if test $pass = conv; then - # Only check for convenience libraries - deplibs="$lib $deplibs" - if test -z "$libdir"; then - if test -z "$old_library"; then - $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 - exit 1 - fi - # It is a libtool convenience library, so add in its objects. - convenience="$convenience $ladir/$objdir/$old_library" - old_convenience="$old_convenience $ladir/$objdir/$old_library" - tmp_libs= - for deplib in $dependency_libs; do - deplibs="$deplib $deplibs" - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - tmp_libs="$tmp_libs $deplib" - done - elif test $linkmode != prog && test $linkmode != lib; then - $echo "$modename: \`$lib' is not a convenience library" 1>&2 - exit 1 - fi - continue - fi # $pass = conv - - # Get the name of the library we link against. - linklib= - for l in $old_library $library_names; do - linklib="$l" - done - if test -z "$linklib"; then - $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 - exit 1 - fi - - # This library was specified with -dlopen. - if test $pass = dlopen; then - if test -z "$libdir"; then - $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2 - exit 1 - fi - if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then - # If there is no dlname, no dlopen support or we're linking - # statically, we need to preload. - dlprefiles="$dlprefiles $lib" - else - newdlfiles="$newdlfiles $lib" - fi - continue - fi # $pass = dlopen - - # We need an absolute path. - case $ladir in - [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; - *) - abs_ladir=`cd "$ladir" && pwd` - if test -z "$abs_ladir"; then - $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2 - $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 - abs_ladir="$ladir" - fi - ;; - esac - laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` - - # Find the relevant object directory and library name. - if test "X$installed" = Xyes; then - if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then - $echo "$modename: warning: library \`$lib' was moved." 1>&2 - dir="$ladir" - absdir="$abs_ladir" - libdir="$abs_ladir" - else - dir="$libdir" - absdir="$libdir" - fi - else - dir="$ladir/$objdir" - absdir="$abs_ladir/$objdir" - # Remove this search path later - notinst_path="$notinst_path $abs_ladir" - fi # $installed = yes - name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` - - # This library was specified with -dlpreopen. - if test $pass = dlpreopen; then - if test -z "$libdir"; then - $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2 - exit 1 - fi - # Prefer using a static library (so that no silly _DYNAMIC symbols - # are required to link). - if test -n "$old_library"; then - newdlprefiles="$newdlprefiles $dir/$old_library" - # Otherwise, use the dlname, so that lt_dlopen finds it. - elif test -n "$dlname"; then - newdlprefiles="$newdlprefiles $dir/$dlname" - else - newdlprefiles="$newdlprefiles $dir/$linklib" - fi - fi # $pass = dlpreopen - - if test -z "$libdir"; then - # Link the convenience library - if test $linkmode = lib; then - deplibs="$dir/$old_library $deplibs" - elif test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$dir/$old_library $compile_deplibs" - finalize_deplibs="$dir/$old_library $finalize_deplibs" - else - deplibs="$lib $deplibs" - fi - continue - fi - - if test $linkmode = prog && test $pass != link; then - newlib_search_path="$newlib_search_path $ladir" - deplibs="$lib $deplibs" - - linkalldeplibs=no - if test "$link_all_deplibs" != no || test -z "$library_names" || - test "$build_libtool_libs" = no; then - linkalldeplibs=yes - fi - - tmp_libs= - for deplib in $dependency_libs; do - case $deplib in - -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test - esac - # Need to link against all dependency_libs? - if test $linkalldeplibs = yes; then - deplibs="$deplib $deplibs" - else - # Need to hardcode shared library paths - # or/and link against static libraries - newdependency_libs="$deplib $newdependency_libs" - fi - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - tmp_libs="$tmp_libs $deplib" - done # for deplib - continue - fi # $linkmode = prog... - - link_static=no # Whether the deplib will be linked statically - if test -n "$library_names" && - { test "$prefer_static_libs" = no || test -z "$old_library"; }; then - # Link against this shared library - - if test "$linkmode,$pass" = "prog,link" || - { test $linkmode = lib && test $hardcode_into_libs = yes; }; then - # Hardcode the library path. - # Skip directories that are in the system default run-time - # search path. - case " $sys_lib_dlsearch_path " in - *" $absdir "*) ;; - *) - case "$compile_rpath " in - *" $absdir "*) ;; - *) compile_rpath="$compile_rpath $absdir" - esac - ;; - esac - case " $sys_lib_dlsearch_path " in - *" $libdir "*) ;; - *) - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" - esac - ;; - esac - if test $linkmode = prog; then - # We need to hardcode the library path - if test -n "$shlibpath_var"; then - # Make sure the rpath contains only unique directories. - case "$temp_rpath " in - *" $dir "*) ;; - *" $absdir "*) ;; - *) temp_rpath="$temp_rpath $dir" ;; - esac - fi - fi - fi # $linkmode,$pass = prog,link... - - if test "$alldeplibs" = yes && - { test "$deplibs_check_method" = pass_all || - { test "$build_libtool_libs" = yes && - test -n "$library_names"; }; }; then - # We only need to search for static libraries - continue - fi - - if test "$installed" = no; then - notinst_deplibs="$notinst_deplibs $lib" - need_relink=yes - fi - - if test -n "$old_archive_from_expsyms_cmds"; then - # figure out the soname - set dummy $library_names - realname="$2" - shift; shift - libname=`eval \\$echo \"$libname_spec\"` - # use dlname if we got it. it's perfectly good, no? - if test -n "$dlname"; then - soname="$dlname" - elif test -n "$soname_spec"; then - # bleh windows - case $host in - *cygwin*) - major=`expr $current - $age` - versuffix="-$major" - ;; - esac - eval soname=\"$soname_spec\" - else - soname="$realname" - fi - - # Make a new name for the extract_expsyms_cmds to use - soroot="$soname" - soname=`echo $soroot | sed -e 's/^.*\///'` - newlib="libimp-`echo $soname | sed 's/^lib//;s/\.dll$//'`.a" - - # If the library has no export list, then create one now - if test -f "$output_objdir/$soname-def"; then : - else - $show "extracting exported symbol list from \`$soname'" - IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' - eval cmds=\"$extract_expsyms_cmds\" - for cmd in $cmds; do - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - fi - - # Create $newlib - if test -f "$output_objdir/$newlib"; then :; else - $show "generating import library for \`$soname'" - IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' - eval cmds=\"$old_archive_from_expsyms_cmds\" - for cmd in $cmds; do - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - fi - # make sure the library variables are pointing to the new library - dir=$output_objdir - linklib=$newlib - fi # test -n $old_archive_from_expsyms_cmds - - if test $linkmode = prog || test "$mode" != relink; then - add_shlibpath= - add_dir= - add= - lib_linked=yes - case $hardcode_action in - immediate | unsupported) - if test "$hardcode_direct" = no; then - add="$dir/$linklib" - elif test "$hardcode_minus_L" = no; then - case $host in - *-*-sunos*) add_shlibpath="$dir" ;; - esac - add_dir="-L$dir" - add="-l$name" - elif test "$hardcode_shlibpath_var" = no; then - add_shlibpath="$dir" - add="-l$name" - else - lib_linked=no - fi - ;; - relink) - if test "$hardcode_direct" = yes; then - add="$dir/$linklib" - elif test "$hardcode_minus_L" = yes; then - add_dir="-L$dir" - add="-l$name" - elif test "$hardcode_shlibpath_var" = yes; then - add_shlibpath="$dir" - add="-l$name" - else - lib_linked=no - fi - ;; - *) lib_linked=no ;; - esac - - if test "$lib_linked" != yes; then - $echo "$modename: configuration error: unsupported hardcode properties" - exit 1 - fi - - if test -n "$add_shlibpath"; then - case :$compile_shlibpath: in - *":$add_shlibpath:"*) ;; - *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; - esac - fi - if test $linkmode = prog; then - test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" - test -n "$add" && compile_deplibs="$add $compile_deplibs" - else - test -n "$add_dir" && deplibs="$add_dir $deplibs" - test -n "$add" && deplibs="$add $deplibs" - if test "$hardcode_direct" != yes && \ - test "$hardcode_minus_L" != yes && \ - test "$hardcode_shlibpath_var" = yes; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; - *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; - esac - fi - fi - fi - - if test $linkmode = prog || test "$mode" = relink; then - add_shlibpath= - add_dir= - add= - # Finalize command for both is simple: just hardcode it. - if test "$hardcode_direct" = yes; then - add="$libdir/$linklib" - elif test "$hardcode_minus_L" = yes; then - add_dir="-L$libdir" - add="-l$name" - elif test "$hardcode_shlibpath_var" = yes; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; - *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; - esac - add="-l$name" - else - # We cannot seem to hardcode it, guess we'll fake it. - add_dir="-L$libdir" - add="-l$name" - fi - - if test $linkmode = prog; then - test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" - test -n "$add" && finalize_deplibs="$add $finalize_deplibs" - else - test -n "$add_dir" && deplibs="$add_dir $deplibs" - test -n "$add" && deplibs="$add $deplibs" - fi - fi - elif test $linkmode = prog; then - if test "$alldeplibs" = yes && - { test "$deplibs_check_method" = pass_all || - { test "$build_libtool_libs" = yes && - test -n "$library_names"; }; }; then - # We only need to search for static libraries - continue - fi - - # Try to link the static library - # Here we assume that one of hardcode_direct or hardcode_minus_L - # is not unsupported. This is valid on all known static and - # shared platforms. - if test "$hardcode_direct" != unsupported; then - test -n "$old_library" && linklib="$old_library" - compile_deplibs="$dir/$linklib $compile_deplibs" - finalize_deplibs="$dir/$linklib $finalize_deplibs" - else - compile_deplibs="-l$name -L$dir $compile_deplibs" - finalize_deplibs="-l$name -L$dir $finalize_deplibs" - fi - elif test "$build_libtool_libs" = yes; then - # Not a shared library - if test "$deplibs_check_method" != pass_all; then - # We're trying link a shared library against a static one - # but the system doesn't support it. - - # Just print a warning and add the library to dependency_libs so - # that the program can be linked against the static library. - echo - echo "*** Warning: This library needs some functionality provided by $lib." - echo "*** I have the capability to make that library automatically link in when" - echo "*** you link to this library. But I can only do this if you have a" - echo "*** shared version of the library, which you do not appear to have." - if test "$module" = yes; then - echo "*** Therefore, libtool will create a static module, that should work " - echo "*** as long as the dlopening application is linked with the -dlopen flag." - if test -z "$global_symbol_pipe"; then - echo - echo "*** However, this would only work if libtool was able to extract symbol" - echo "*** lists from a program, using \`nm' or equivalent, but libtool could" - echo "*** not find such a program. So, this module is probably useless." - echo "*** \`nm' from GNU binutils and a full rebuild may help." - fi - if test "$build_old_libs" = no; then - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - fi - else - convenience="$convenience $dir/$old_library" - old_convenience="$old_convenience $dir/$old_library" - deplibs="$dir/$old_library $deplibs" - link_static=yes - fi - fi # link shared/static library? - - if test $linkmode = lib; then - if test -n "$dependency_libs" && - { test $hardcode_into_libs != yes || test $build_old_libs = yes || - test $link_static = yes; }; then - # Extract -R from dependency_libs - temp_deplibs= - for libdir in $dependency_libs; do - case $libdir in - -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'` - case " $xrpath " in - *" $temp_xrpath "*) ;; - *) xrpath="$xrpath $temp_xrpath";; - esac;; - *) temp_deplibs="$temp_deplibs $libdir";; - esac - done - dependency_libs="$temp_deplibs" - fi - - newlib_search_path="$newlib_search_path $absdir" - # Link against this library - test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" - # ... and its dependency_libs - tmp_libs= - for deplib in $dependency_libs; do - newdependency_libs="$deplib $newdependency_libs" - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - tmp_libs="$tmp_libs $deplib" - done - - if test $link_all_deplibs != no; then - # Add the search paths of all dependency libraries - for deplib in $dependency_libs; do - case $deplib in - -L*) path="$deplib" ;; - *.la) - dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'` - test "X$dir" = "X$deplib" && dir="." - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; - *) - absdir=`cd "$dir" && pwd` - if test -z "$absdir"; then - $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 - absdir="$dir" - fi - ;; - esac - if grep "^installed=no" $deplib > /dev/null; then - path="-L$absdir/$objdir" - else - eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - if test -z "$libdir"; then - $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 - exit 1 - fi - if test "$absdir" != "$libdir"; then - $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 - fi - path="-L$absdir" - fi - ;; - *) continue ;; - esac - case " $deplibs " in - *" $path "*) ;; - *) deplibs="$path $deplibs" ;; - esac - done - fi # link_all_deplibs != no - fi # linkmode = lib - done # for deplib in $libs - if test $pass = dlpreopen; then - # Link the dlpreopened libraries before other libraries - for deplib in $save_deplibs; do - deplibs="$deplib $deplibs" - done - fi - if test $pass != dlopen; then - test $pass != scan && dependency_libs="$newdependency_libs" - if test $pass != conv; then - # Make sure lib_search_path contains only unique directories. - lib_search_path= - for dir in $newlib_search_path; do - case "$lib_search_path " in - *" $dir "*) ;; - *) lib_search_path="$lib_search_path $dir" ;; - esac - done - newlib_search_path= - fi - - if test "$linkmode,$pass" != "prog,link"; then - vars="deplibs" - else - vars="compile_deplibs finalize_deplibs" - fi - for var in $vars dependency_libs; do - # Add libraries to $var in reverse order - eval tmp_libs=\"\$$var\" - new_libs= - for deplib in $tmp_libs; do - case $deplib in - -L*) new_libs="$deplib $new_libs" ;; - *) - case " $specialdeplibs " in - *" $deplib "*) new_libs="$deplib $new_libs" ;; - *) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$deplib $new_libs" ;; - esac - ;; - esac - ;; - esac - done - tmp_libs= - for deplib in $new_libs; do - case $deplib in - -L*) - case " $tmp_libs " in - *" $deplib "*) ;; - *) tmp_libs="$tmp_libs $deplib" ;; - esac - ;; - *) tmp_libs="$tmp_libs $deplib" ;; - esac - done - eval $var=\"$tmp_libs\" - done # for var - fi - if test "$pass" = "conv" && - { test "$linkmode" = "lib" || test "$linkmode" = "prog"; }; then - libs="$deplibs" # reset libs - deplibs= - fi - done # for pass - if test $linkmode = prog; then - dlfiles="$newdlfiles" - dlprefiles="$newdlprefiles" - fi - - case $linkmode in - oldlib) - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 - fi - - if test -n "$rpath"; then - $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2 - fi - - if test -n "$xrpath"; then - $echo "$modename: warning: \`-R' is ignored for archives" 1>&2 - fi - - if test -n "$vinfo"; then - $echo "$modename: warning: \`-version-info' is ignored for archives" 1>&2 - fi - - if test -n "$release"; then - $echo "$modename: warning: \`-release' is ignored for archives" 1>&2 - fi - - if test -n "$export_symbols" || test -n "$export_symbols_regex"; then - $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2 - fi - - # Now set the variables for building old libraries. - build_libtool_libs=no - oldlibs="$output" - objs="$objs$old_deplibs" - ;; - - lib) - # Make sure we only generate libraries of the form `libNAME.la'. - case $outputname in - lib*) - name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` - eval libname=\"$libname_spec\" - ;; - *) - if test "$module" = no; then - $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 - $echo "$help" 1>&2 - exit 1 - fi - if test "$need_lib_prefix" != no; then - # Add the "lib" prefix for modules if required - name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` - eval libname=\"$libname_spec\" - else - libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` - fi - ;; - esac - - if test -n "$objs"; then - if test "$deplibs_check_method" != pass_all; then - $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1 - exit 1 - else - echo - echo "*** Warning: Linking the shared library $output against the non-libtool" - echo "*** objects $objs is not portable!" - libobjs="$libobjs $objs" - fi - fi - - if test "$dlself" != no; then - $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2 - fi - - set dummy $rpath - if test $# -gt 2; then - $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 - fi - install_libdir="$2" - - oldlibs= - if test -z "$rpath"; then - if test "$build_libtool_libs" = yes; then - # Building a libtool convenience library. - # Some compilers have problems with a `.al' extension so - # convenience libraries should have the same extension an - # archive normally would. - oldlibs="$output_objdir/$libname.$libext $oldlibs" - build_libtool_libs=convenience - build_old_libs=yes - fi - - if test -n "$vinfo"; then - $echo "$modename: warning: \`-version-info' is ignored for convenience libraries" 1>&2 - fi - - if test -n "$release"; then - $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2 - fi - else - - # Parse the version information argument. - IFS="${IFS= }"; save_ifs="$IFS"; IFS=':' - set dummy $vinfo 0 0 0 - IFS="$save_ifs" - - if test -n "$8"; then - $echo "$modename: too many parameters to \`-version-info'" 1>&2 - $echo "$help" 1>&2 - exit 1 - fi - - current="$2" - revision="$3" - age="$4" - - # Check that each of the things are valid numbers. - case $current in - 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;; - *) - $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit 1 - ;; - esac - - case $revision in - 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;; - *) - $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit 1 - ;; - esac - - case $age in - 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;; - *) - $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit 1 - ;; - esac - - if test $age -gt $current; then - $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit 1 - fi - - # Calculate the version variables. - major= - versuffix= - verstring= - case $version_type in - none) ;; - - darwin) - # Like Linux, but with the current version available in - # verstring for coding it into the library header - major=.`expr $current - $age` - versuffix="$major.$age.$revision" - # Darwin ld doesn't like 0 for these options... - minor_current=`expr $current + 1` - verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" - ;; - - freebsd-aout) - major=".$current" - versuffix=".$current.$revision"; - ;; - - freebsd-elf) - major=".$current" - versuffix=".$current"; - ;; - - irix) - major=`expr $current - $age + 1` - verstring="sgi$major.$revision" - - # Add in all the interfaces that we are compatible with. - loop=$revision - while test $loop != 0; do - iface=`expr $revision - $loop` - loop=`expr $loop - 1` - verstring="sgi$major.$iface:$verstring" - done - - # Before this point, $major must not contain `.'. - major=.$major - versuffix="$major.$revision" - ;; - - linux) - major=.`expr $current - $age` - versuffix="$major.$age.$revision" - ;; - - osf) - major=`expr $current - $age` - versuffix=".$current.$age.$revision" - verstring="$current.$age.$revision" - - # Add in all the interfaces that we are compatible with. - loop=$age - while test $loop != 0; do - iface=`expr $current - $loop` - loop=`expr $loop - 1` - verstring="$verstring:${iface}.0" - done - - # Make executables depend on our current version. - verstring="$verstring:${current}.0" - ;; - - sunos) - major=".$current" - versuffix=".$current.$revision" - ;; - - windows) - # Use '-' rather than '.', since we only want one - # extension on DOS 8.3 filesystems. - major=`expr $current - $age` - versuffix="-$major" - ;; - - *) - $echo "$modename: unknown library version type \`$version_type'" 1>&2 - echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 - exit 1 - ;; - esac - - # Clear the version info if we defaulted, and they specified a release. - if test -z "$vinfo" && test -n "$release"; then - major= - verstring="0.0" - if test "$need_version" = no; then - versuffix= - else - versuffix=".0.0" - fi - fi - - # Remove version info from name if versioning should be avoided - if test "$avoid_version" = yes && test "$need_version" = no; then - major= - versuffix= - verstring="" - fi - - # Check to see if the archive will have undefined symbols. - if test "$allow_undefined" = yes; then - if test "$allow_undefined_flag" = unsupported; then - $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2 - build_libtool_libs=no - build_old_libs=yes - fi - else - # Don't allow undefined symbols. - allow_undefined_flag="$no_undefined_flag" - fi - fi - - if test "$mode" != relink; then - # Remove our outputs, but don't remove object files since they - # may have been created when compiling PIC objects. - removelist= - tempremovelist=`echo "$output_objdir/*"` - for p in $tempremovelist; do - case $p in - *.$objext) - ;; - $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) - removelist="$removelist $p" - ;; - *) ;; - esac - done - if test -n "$removelist"; then - $show "${rm}r $removelist" - $run ${rm}r $removelist - fi - fi - - # Now set the variables for building old libraries. - if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then - oldlibs="$oldlibs $output_objdir/$libname.$libext" - - # Transform .lo files to .o files. - oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` - fi - - # Eliminate all temporary directories. - for path in $notinst_path; do - lib_search_path=`echo "$lib_search_path " | sed -e 's% $path % %g'` - deplibs=`echo "$deplibs " | sed -e 's% -L$path % %g'` - dependency_libs=`echo "$dependency_libs " | sed -e 's% -L$path % %g'` - done - - if test -n "$xrpath"; then - # If the user specified any rpath flags, then add them. - temp_xrpath= - for libdir in $xrpath; do - temp_xrpath="$temp_xrpath -R$libdir" - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" ;; - esac - done - if test $hardcode_into_libs != yes || test $build_old_libs = yes; then - dependency_libs="$temp_xrpath $dependency_libs" - fi - fi - - # Make sure dlfiles contains only unique files that won't be dlpreopened - old_dlfiles="$dlfiles" - dlfiles= - for lib in $old_dlfiles; do - case " $dlprefiles $dlfiles " in - *" $lib "*) ;; - *) dlfiles="$dlfiles $lib" ;; - esac - done - - # Make sure dlprefiles contains only unique files - old_dlprefiles="$dlprefiles" - dlprefiles= - for lib in $old_dlprefiles; do - case "$dlprefiles " in - *" $lib "*) ;; - *) dlprefiles="$dlprefiles $lib" ;; - esac - done - - if test "$build_libtool_libs" = yes; then - if test -n "$rpath"; then - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*) - # these systems don't actually have a c library (as such)! - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C library is in the System framework - deplibs="$deplibs -framework System" - ;; - *-*-netbsd*) - # Don't link with libc until the a.out ld.so is fixed. - ;; - *) - # Add libc to deplibs on all other systems if necessary. - if test $build_libtool_need_lc = "yes"; then - deplibs="$deplibs -lc" - fi - ;; - esac - fi - - # Transform deplibs into only deplibs that can be linked in shared. - name_save=$name - libname_save=$libname - release_save=$release - versuffix_save=$versuffix - major_save=$major - # I'm not sure if I'm treating the release correctly. I think - # release should show up in the -l (ie -lgmp5) so we don't want to - # add it in twice. Is that correct? - release="" - versuffix="" - major="" - newdeplibs= - droppeddeps=no - case $deplibs_check_method in - pass_all) - # Don't check for shared/static. Everything works. - # This might be a little naive. We might want to check - # whether the library exists or not. But this is on - # osf3 & osf4 and I'm not really sure... Just - # implementing what was already the behaviour. - newdeplibs=$deplibs - ;; - test_compile) - # This code stresses the "libraries are programs" paradigm to its - # limits. Maybe even breaks it. We compile a program, linking it - # against the deplibs as a proxy for the library. Then we can check - # whether they linked in statically or dynamically with ldd. - $rm conftest.c - cat > conftest.c </dev/null` - for potent_lib in $potential_libs; do - # Follow soft links. - if ls -lLd "$potent_lib" 2>/dev/null \ - | grep " -> " >/dev/null; then - continue - fi - # The statement above tries to avoid entering an - # endless loop below, in case of cyclic links. - # We might still enter an endless loop, since a link - # loop can be closed while we follow links, - # but so what? - potlib="$potent_lib" - while test -h "$potlib" 2>/dev/null; do - potliblink=`ls -ld $potlib | sed 's/.* -> //'` - case $potliblink in - [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; - *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; - esac - done - if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ - | sed 10q \ - | egrep "$file_magic_regex" > /dev/null; then - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - break 2 - fi - done - done - if test -n "$a_deplib" ; then - droppeddeps=yes - echo - echo "*** Warning: This library needs some functionality provided by $a_deplib." - echo "*** I have the capability to make that library automatically link in when" - echo "*** you link to this library. But I can only do this if you have a" - echo "*** shared version of the library, which you do not appear to have." - fi - else - # Add a -L argument. - newdeplibs="$newdeplibs $a_deplib" - fi - done # Gone through all deplibs. - ;; - match_pattern*) - set dummy $deplibs_check_method - match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` - for a_deplib in $deplibs; do - name="`expr $a_deplib : '-l\(.*\)'`" - # If $name is empty we are operating on a -L argument. - if test -n "$name" && test "$name" != "0"; then - libname=`eval \\$echo \"$libname_spec\"` - for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do - potential_libs=`ls $i/$libname[.-]* 2>/dev/null` - for potent_lib in $potential_libs; do - if eval echo \"$potent_lib\" 2>/dev/null \ - | sed 10q \ - | egrep "$match_pattern_regex" > /dev/null; then - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - break 2 - fi - done - done - if test -n "$a_deplib" ; then - droppeddeps=yes - echo - echo "*** Warning: This library needs some functionality provided by $a_deplib." - echo "*** I have the capability to make that library automatically link in when" - echo "*** you link to this library. But I can only do this if you have a" - echo "*** shared version of the library, which you do not appear to have." - fi - else - # Add a -L argument. - newdeplibs="$newdeplibs $a_deplib" - fi - done # Gone through all deplibs. - ;; - none | unknown | *) - newdeplibs="" - if $echo "X $deplibs" | $Xsed -e 's/ -lc$//' \ - -e 's/ -[LR][^ ]*//g' -e 's/[ ]//g' | - grep . >/dev/null; then - echo - if test "X$deplibs_check_method" = "Xnone"; then - echo "*** Warning: inter-library dependencies are not supported in this platform." - else - echo "*** Warning: inter-library dependencies are not known to be supported." - fi - echo "*** All declared inter-library dependencies are being dropped." - droppeddeps=yes - fi - ;; - esac - versuffix=$versuffix_save - major=$major_save - release=$release_save - libname=$libname_save - name=$name_save - - case $host in - *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library is the System framework - newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'` - ;; - esac - - if test "$droppeddeps" = yes; then - if test "$module" = yes; then - echo - echo "*** Warning: libtool could not satisfy all declared inter-library" - echo "*** dependencies of module $libname. Therefore, libtool will create" - echo "*** a static module, that should work as long as the dlopening" - echo "*** application is linked with the -dlopen flag." - if test -z "$global_symbol_pipe"; then - echo - echo "*** However, this would only work if libtool was able to extract symbol" - echo "*** lists from a program, using \`nm' or equivalent, but libtool could" - echo "*** not find such a program. So, this module is probably useless." - echo "*** \`nm' from GNU binutils and a full rebuild may help." - fi - if test "$build_old_libs" = no; then - oldlibs="$output_objdir/$libname.$libext" - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - else - echo "*** The inter-library dependencies that have been dropped here will be" - echo "*** automatically added whenever a program is linked with this library" - echo "*** or is declared to -dlopen it." - - if test $allow_undefined = no; then - echo - echo "*** Since this library must not contain undefined symbols," - echo "*** because either the platform does not support them or" - echo "*** it was explicitly requested with -no-undefined," - echo "*** libtool will only create a static version of it." - if test "$build_old_libs" = no; then - oldlibs="$output_objdir/$libname.$libext" - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - fi - fi - fi - # Done checking deplibs! - deplibs=$newdeplibs - fi - - # All the library-specific variables (install_libdir is set above). - library_names= - old_library= - dlname= - - # Test again, we may have decided not to build it any more - if test "$build_libtool_libs" = yes; then - if test $hardcode_into_libs = yes; then - # Hardcode the library paths - hardcode_libdirs= - dep_rpath= - rpath="$finalize_rpath" - test "$mode" != relink && rpath="$compile_rpath$rpath" - for libdir in $rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - dep_rpath="$dep_rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; - *) perm_rpath="$perm_rpath $libdir" ;; - esac - fi - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - eval dep_rpath=\"$hardcode_libdir_flag_spec\" - fi - if test -n "$runpath_var" && test -n "$perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do - rpath="$rpath$dir:" - done - eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" - fi - test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" - fi - - shlibpath="$finalize_shlibpath" - test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" - if test -n "$shlibpath"; then - eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" - fi - - # Get the real and link names of the library. - eval library_names=\"$library_names_spec\" - set dummy $library_names - realname="$2" - shift; shift - - if test -n "$soname_spec"; then - eval soname=\"$soname_spec\" - else - soname="$realname" - fi - test -z "$dlname" && dlname=$soname - - lib="$output_objdir/$realname" - for link - do - linknames="$linknames $link" - done - -# # Ensure that we have .o objects for linkers which dislike .lo -# # (e.g. aix) in case we are running --disable-static -# for obj in $libobjs; do -# xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` -# if test "X$xdir" = "X$obj"; then -# xdir="." -# else -# xdir="$xdir" -# fi -# baseobj=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` -# oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"` -# if test ! -f $xdir/$oldobj && test "$baseobj" != "$oldobj"; then -# $show "(cd $xdir && ${LN_S} $baseobj $oldobj)" -# $run eval '(cd $xdir && ${LN_S} $baseobj $oldobj)' || exit $? -# fi -# done - - # Use standard objects if they are pic - test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then - $show "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" - $run $rm $export_symbols - eval cmds=\"$export_symbols_cmds\" - IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - if test -n "$export_symbols_regex"; then - $show "egrep -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"" - $run eval 'egrep -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' - $show "$mv \"${export_symbols}T\" \"$export_symbols\"" - $run eval '$mv "${export_symbols}T" "$export_symbols"' - fi - fi - fi - - if test -n "$export_symbols" && test -n "$include_expsyms"; then - $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"' - fi - - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec"; then - save_libobjs=$libobjs - eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - else - gentop="$output_objdir/${outputname}x" - $show "${rm}r $gentop" - $run ${rm}r "$gentop" - $show "$mkdir $gentop" - $run $mkdir "$gentop" - status=$? - if test $status -ne 0 && test ! -d "$gentop"; then - exit $status - fi - generated="$generated $gentop" - - for xlib in $convenience; do - # Extract the objects. - case $xlib in - [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; - *) xabs=`pwd`"/$xlib" ;; - esac - xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` - xdir="$gentop/$xlib" - - $show "${rm}r $xdir" - $run ${rm}r "$xdir" - $show "$mkdir $xdir" - $run $mkdir "$xdir" - status=$? - if test $status -ne 0 && test ! -d "$xdir"; then - exit $status - fi - $show "(cd $xdir && $AR x $xabs)" - $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? - - libobjs="$libobjs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` - done - fi - fi - - if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then - eval flag=\"$thread_safe_flag_spec\" - linker_flags="$linker_flags $flag" - fi - - # Make a backup of the uninstalled library when relinking - if test "$mode" = relink; then - $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $? - fi - - # Do each of the archive commands. - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - eval cmds=\"$archive_expsym_cmds\" - else - eval cmds=\"$archive_cmds\" - fi - if len=`expr "X$cmds" : ".*"` && - test $len -le $max_cmd_len; then - : - else - # The command line is too long to link in one step, link piecewise. - $echo "creating reloadable object files..." - - # Save the value of $output and $libobjs because we want to - # use them later. If we have whole_archive_flag_spec, we - # want to use save_libobjs as it was before - # whole_archive_flag_spec was expanded, because we can't - # assume the linker understands whole_archive_flag_spec. - # This may have to be revisited, in case too many - # convenience libraries get linked in and end up exceeding - # the spec. - if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then - save_libobjs=$libobjs - fi - save_output=$output - - # Clear the reloadable object creation command queue and - # initialize k to one. - test_cmds= - concat_cmds= - objlist= - delfiles= - last_robj= - k=1 - output=$output_objdir/$save_output-${k}.$objext - # Loop over the list of objects to be linked. - for obj in $save_libobjs - do - eval test_cmds=\"$reload_cmds $objlist $last_robj\" - if test "X$objlist" = X || - { len=`expr "X$test_cmds" : ".*"` && - test $len -le $max_cmd_len; }; then - objlist="$objlist $obj" - else - # The command $test_cmds is almost too long, add a - # command to the queue. - if test $k -eq 1 ; then - # The first file doesn't have a previous command to add. - eval concat_cmds=\"$reload_cmds $objlist $last_robj\" - else - # All subsequent reloadable object files will link in - # the last one created. - eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\" - fi - last_robj=$output_objdir/$save_output-${k}.$objext - k=`expr $k + 1` - output=$output_objdir/$save_output-${k}.$objext - objlist=$obj - len=1 - fi - done - # Handle the remaining objects by creating one last - # reloadable object file. All subsequent reloadable object - # files will link in the last one created. - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" - - # Set up a command to remove the reloadale object files - # after they are used. - i=0 - while test $i -lt $k - do - i=`expr $i + 1` - delfiles="$delfiles $output_objdir/$save_output-${i}.$objext" - done - - $echo "creating a temporary reloadable object file: $output" - - # Loop through the commands generated above and execute them. - IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' - for cmd in $concat_cmds; do - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - - libobjs=$output - # Restore the value of output. - output=$save_output - - if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then - eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - fi - # Expand the library linking commands again to reset the - # value of $libobjs for piecewise linking. - - # Do each of the archive commands. - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - eval cmds=\"$archive_expsym_cmds\" - else - eval cmds=\"$archive_cmds\" - fi - - # Append the command to remove the reloadable object files - # to the just-reset $cmds. - eval cmds=\"\$cmds~$rm $delfiles\" - fi - IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - - # Restore the uninstalled library and exit - if test "$mode" = relink; then - $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $? - exit 0 - fi - - # Create links to the real library. - for linkname in $linknames; do - if test "$realname" != "$linkname"; then - $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)" - $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $? - fi - done - - # If -module or -export-dynamic was specified, set the dlname. - if test "$module" = yes || test "$export_dynamic" = yes; then - # On all known operating systems, these are identical. - dlname="$soname" - fi - fi - ;; - - obj) - if test -n "$deplibs"; then - $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 - fi - - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2 - fi - - if test -n "$rpath"; then - $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2 - fi - - if test -n "$xrpath"; then - $echo "$modename: warning: \`-R' is ignored for objects" 1>&2 - fi - - if test -n "$vinfo"; then - $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2 - fi - - if test -n "$release"; then - $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 - fi - - case $output in - *.lo) - if test -n "$objs$old_deplibs"; then - $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 - exit 1 - fi - libobj="$output" - obj=`$echo "X$output" | $Xsed -e "$lo2o"` - ;; - *) - libobj= - obj="$output" - ;; - esac - - # Delete the old objects. - $run $rm $obj $libobj - - # Objects from convenience libraries. This assumes - # single-version convenience libraries. Whenever we create - # different ones for PIC/non-PIC, this we'll have to duplicate - # the extraction. - reload_conv_objs= - gentop= - # reload_cmds runs $LD directly, so let us get rid of - # -Wl from whole_archive_flag_spec - wl= - - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec"; then - eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\" - else - gentop="$output_objdir/${obj}x" - $show "${rm}r $gentop" - $run ${rm}r "$gentop" - $show "$mkdir $gentop" - $run $mkdir "$gentop" - status=$? - if test $status -ne 0 && test ! -d "$gentop"; then - exit $status - fi - generated="$generated $gentop" - - for xlib in $convenience; do - # Extract the objects. - case $xlib in - [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; - *) xabs=`pwd`"/$xlib" ;; - esac - xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` - xdir="$gentop/$xlib" - - $show "${rm}r $xdir" - $run ${rm}r "$xdir" - $show "$mkdir $xdir" - $run $mkdir "$xdir" - status=$? - if test $status -ne 0 && test ! -d "$xdir"; then - exit $status - fi - $show "(cd $xdir && $AR x $xabs)" - $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? - - reload_conv_objs="$reload_objs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` - done - fi - fi - - # Create the old-style object. - reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test - - output="$obj" - eval cmds=\"$reload_cmds\" - IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - - # Exit if we aren't doing a library object file. - if test -z "$libobj"; then - if test -n "$gentop"; then - $show "${rm}r $gentop" - $run ${rm}r $gentop - fi - - exit 0 - fi - - if test "$build_libtool_libs" != yes; then - if test -n "$gentop"; then - $show "${rm}r $gentop" - $run ${rm}r $gentop - fi - - # Create an invalid libtool object if no PIC, so that we don't - # accidentally link it into a program. - # $show "echo timestamp > $libobj" - # $run eval "echo timestamp > $libobj" || exit $? - exit 0 - fi - - if test -n "$pic_flag" || test "$pic_mode" != default; then - # Only do commands if we really have different PIC objects. - reload_objs="$libobjs $reload_conv_objs" - output="$libobj" - eval cmds=\"$reload_cmds\" - IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" -# else -# # Just create a symlink. -# $show $rm $libobj -# $run $rm $libobj -# xdir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'` -# if test "X$xdir" = "X$libobj"; then -# xdir="." -# else -# xdir="$xdir" -# fi -# baseobj=`$echo "X$libobj" | $Xsed -e 's%^.*/%%'` -# oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"` -# $show "(cd $xdir && $LN_S $oldobj $baseobj)" -# $run eval '(cd $xdir && $LN_S $oldobj $baseobj)' || exit $? - fi - - if test -n "$gentop"; then - $show "${rm}r $gentop" - $run ${rm}r $gentop - fi - - exit 0 - ;; - - prog) - case $host in - *cygwin*) output=`echo $output | sed -e 's,.exe$,,;s,$,.exe,'` ;; - esac - if test -n "$vinfo"; then - $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 - fi - - if test -n "$release"; then - $echo "$modename: warning: \`-release' is ignored for programs" 1>&2 - fi - - if test "$preload" = yes; then - if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown && - test "$dlopen_self_static" = unknown; then - $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support." - fi - fi - - case $host in - *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library is the System framework - compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'` - finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'` - ;; - esac - - compile_command="$compile_command $compile_deplibs" - finalize_command="$finalize_command $finalize_deplibs" - - if test -n "$rpath$xrpath"; then - # If the user specified any rpath flags, then add them. - for libdir in $rpath $xrpath; do - # This is the magic to use -rpath. - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" ;; - esac - done - fi - - # Now hardcode the library paths - rpath= - hardcode_libdirs= - for libdir in $compile_rpath $finalize_rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - rpath="$rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; - *) perm_rpath="$perm_rpath $libdir" ;; - esac - fi - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) - case :$dllsearchpath: in - *":$libdir:"*) ;; - *) dllsearchpath="$dllsearchpath:$libdir";; - esac - ;; - esac - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - eval rpath=\" $hardcode_libdir_flag_spec\" - fi - compile_rpath="$rpath" - - rpath= - hardcode_libdirs= - for libdir in $finalize_rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - rpath="$rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$finalize_perm_rpath " in - *" $libdir "*) ;; - *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; - esac - fi - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - eval rpath=\" $hardcode_libdir_flag_spec\" - fi - finalize_rpath="$rpath" - - dlsyms= - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - if test -n "$NM" && test -n "$global_symbol_pipe"; then - dlsyms="${outputname}S.c" - else - $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2 - fi - fi - - if test -n "$dlsyms"; then - case $dlsyms in - "") ;; - *.c) - # Discover the nlist of each of the dlfiles. - nlist="$output_objdir/${outputname}.nm" - - $show "$rm $nlist ${nlist}S ${nlist}T" - $run $rm "$nlist" "${nlist}S" "${nlist}T" - - # Parse the name list into a source file. - $show "creating $output_objdir/$dlsyms" - - test -z "$run" && $echo > "$output_objdir/$dlsyms" "\ -/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */ -/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */ - -#ifdef __cplusplus -extern \"C\" { -#endif - -/* Prevent the only kind of declaration conflicts we can make. */ -#define lt_preloaded_symbols some_other_symbol - -/* External symbol declarations for the compiler. */\ -" - - if test "$dlself" = yes; then - $show "generating symbol list for \`$output'" - - test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist" - - # Add our own program objects to the symbol list. - progfiles="$objs$old_deplibs" - for arg in $progfiles; do - $show "extracting global C symbols from \`$arg'" - $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" - done - - if test -n "$exclude_expsyms"; then - $run eval 'egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' - $run eval '$mv "$nlist"T "$nlist"' - fi - - if test -n "$export_symbols_regex"; then - $run eval 'egrep -e "$export_symbols_regex" "$nlist" > "$nlist"T' - $run eval '$mv "$nlist"T "$nlist"' - fi - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - export_symbols="$output_objdir/$output.exp" - $run $rm $export_symbols - $run eval "sed -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' - else - $run eval "sed -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"' - $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T' - $run eval 'mv "$nlist"T "$nlist"' - fi - fi - - for arg in $dlprefiles; do - $show "extracting global C symbols from \`$arg'" - name=`echo "$arg" | sed -e 's%^.*/%%'` - $run eval 'echo ": $name " >> "$nlist"' - $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" - done - - if test -z "$run"; then - # Make sure we have at least an empty file. - test -f "$nlist" || : > "$nlist" - - if test -n "$exclude_expsyms"; then - egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T - $mv "$nlist"T "$nlist" - fi - - # Try sorting and uniquifying the output. - if grep -v "^: " < "$nlist" | sort +2 | uniq > "$nlist"S; then - : - else - grep -v "^: " < "$nlist" > "$nlist"S - fi - - if test -f "$nlist"S; then - eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"' - else - echo '/* NONE */' >> "$output_objdir/$dlsyms" - fi - - $echo >> "$output_objdir/$dlsyms" "\ - -#undef lt_preloaded_symbols - -#if defined (__STDC__) && __STDC__ -# define lt_ptr_t void * -#else -# define lt_ptr_t char * -# define const -#endif - -/* The mapping between symbol names and symbols. */ -const struct { - const char *name; - lt_ptr_t address; -} -lt_preloaded_symbols[] = -{\ -" - - sed -n -e 's/^: \([^ ]*\) $/ {\"\1\", (lt_ptr_t) 0},/p' \ - -e 's/^. \([^ ]*\) \([^ ]*\)$/ {"\2", (lt_ptr_t) \&\2},/p' \ - < "$nlist" >> "$output_objdir/$dlsyms" - - $echo >> "$output_objdir/$dlsyms" "\ - {0, (lt_ptr_t) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif\ -" - fi - - pic_flag_for_symtable= - case $host in - # compiling the symbol table file with pic_flag works around - # a FreeBSD bug that causes programs to crash when -lm is - # linked before any other PIC object. But we must not use - # pic_flag when linking with -static. The problem exists in - # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. - *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) - case "$compile_command " in - *" -static "*) ;; - *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";; - esac;; - *-*-hpux*) - case "$compile_command " in - *" -static "*) ;; - *) pic_flag_for_symtable=" $pic_flag";; - esac - esac - - # Now compile the dynamic symbol file. - $show "(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" - $run eval '(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? - - # Clean up the generated files. - $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" - $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" - - # Transform the symbol file into the correct name. - compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` - finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` - ;; - *) - $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 - exit 1 - ;; - esac - else - # We keep going just in case the user didn't refer to - # lt_preloaded_symbols. The linker will fail if global_symbol_pipe - # really was required. - - # Nullify the symbol file. - compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` - finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` - fi - - if test $need_relink = no || test "$build_libtool_libs" != yes; then - # Replace the output file specification. - compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` - link_command="$compile_command$compile_rpath" - - # We have no uninstalled library dependencies, so finalize right now. - $show "$link_command" - $run eval "$link_command" - status=$? - - # Delete the generated files. - if test -n "$dlsyms"; then - $show "$rm $output_objdir/${outputname}S.${objext}" - $run $rm "$output_objdir/${outputname}S.${objext}" - fi - - exit $status - fi - - if test -n "$shlibpath_var"; then - # We should set the shlibpath_var - rpath= - for dir in $temp_rpath; do - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) - # Absolute path. - rpath="$rpath$dir:" - ;; - *) - # Relative path: add a thisdir entry. - rpath="$rpath\$thisdir/$dir:" - ;; - esac - done - temp_rpath="$rpath" - fi - - if test -n "$compile_shlibpath$finalize_shlibpath"; then - compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" - fi - if test -n "$finalize_shlibpath"; then - finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" - fi - - compile_var= - finalize_var= - if test -n "$runpath_var"; then - if test -n "$perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do - rpath="$rpath$dir:" - done - compile_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi - if test -n "$finalize_perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $finalize_perm_rpath; do - rpath="$rpath$dir:" - done - finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi - fi - - if test "$no_install" = yes; then - # We don't need to create a wrapper script. - link_command="$compile_var$compile_command$compile_rpath" - # Replace the output file specification. - link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` - # Delete the old output file. - $run $rm $output - # Link the executable and exit - $show "$link_command" - $run eval "$link_command" || exit $? - exit 0 - fi - - if test "$hardcode_action" = relink; then - # Fast installation is not supported - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" - - $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2 - $echo "$modename: \`$output' will be relinked during installation" 1>&2 - else - if test "$fast_install" != no; then - link_command="$finalize_var$compile_command$finalize_rpath" - if test "$fast_install" = yes; then - relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` - else - # fast_install is set to needless - relink_command= - fi - else - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" - fi - fi - - # Replace the output file specification. - link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` - - # Delete the old output files. - $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname - - $show "$link_command" - $run eval "$link_command" || exit $? - - # Now create the wrapper script. - $show "creating $output" - - # Quote the relink command for shipping. - if test -n "$relink_command"; then - # Preserve any variables that may affect compiler behavior - for var in $variables_saved_for_relink; do - if eval test -z \"\${$var+set}\"; then - relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" - elif eval var_value=\$$var; test -z "$var_value"; then - relink_command="$var=; export $var; $relink_command" - else - var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` - relink_command="$var=\"$var_value\"; export $var; $relink_command" - fi - done - relink_command="cd `pwd`; $relink_command" - relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` - fi - - # Quote $echo for shipping. - if test "X$echo" = "X$SHELL $0 --fallback-echo"; then - case $0 in - [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $0 --fallback-echo";; - *) qecho="$SHELL `pwd`/$0 --fallback-echo";; - esac - qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"` - else - qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"` - fi - - # Only actually do things if our run command is non-null. - if test -z "$run"; then - # win32 will think the script is a binary if it has - # a .exe suffix, so we strip it off here. - case $output in - *.exe) output=`echo $output|sed 's,.exe$,,'` ;; - esac - # test for cygwin because mv fails w/o .exe extensions - case $host in - *cygwin*) exeext=.exe ;; - *) exeext= ;; - esac - $rm $output - trap "$rm $output; exit 1" 1 2 15 - - $echo > $output "\ -#! $SHELL - -# $output - temporary wrapper script for $objdir/$outputname -# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP -# -# The $output program cannot be directly executed until all the libtool -# libraries that it depends on are installed. -# -# This wrapper script should never be moved out of the build directory. -# If it is, it will not operate correctly. - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -Xsed='sed -e 1s/^X//' -sed_quote_subst='$sed_quote_subst' - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi - -relink_command=\"$relink_command\" - -# This environment variable determines our operation mode. -if test \"\$libtool_install_magic\" = \"$magic\"; then - # install mode needs the following variable: - notinst_deplibs='$notinst_deplibs' -else - # When we are sourced in execute mode, \$file and \$echo are already set. - if test \"\$libtool_execute_magic\" != \"$magic\"; then - echo=\"$qecho\" - file=\"\$0\" - # Make sure echo works. - if test \"X\$1\" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift - elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then - # Yippee, \$echo works! - : - else - # Restart under the correct shell, and then maybe \$echo will work. - exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} - fi - fi\ -" - $echo >> $output "\ - - # Find the directory that this script lives in. - thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` - test \"x\$thisdir\" = \"x\$file\" && thisdir=. - - # Follow symbolic links until we get to the real thisdir. - file=\`ls -ld \"\$file\" | sed -n 's/.*-> //p'\` - while test -n \"\$file\"; do - destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` - - # If there was a directory component, then change thisdir. - if test \"x\$destdir\" != \"x\$file\"; then - case \"\$destdir\" in - [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; - *) thisdir=\"\$thisdir/\$destdir\" ;; - esac - fi - - file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\` - file=\`ls -ld \"\$thisdir/\$file\" | sed -n 's/.*-> //p'\` - done - - # Try to get the absolute directory name. - absdir=\`cd \"\$thisdir\" && pwd\` - test -n \"\$absdir\" && thisdir=\"\$absdir\" -" - - if test "$fast_install" = yes; then - echo >> $output "\ - program=lt-'$outputname'$exeext - progdir=\"\$thisdir/$objdir\" - - if test ! -f \"\$progdir/\$program\" || \\ - { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | sed 1q\`; \\ - test \"X\$file\" != \"X\$progdir/\$program\"; }; then - - file=\"\$\$-\$program\" - - if test ! -d \"\$progdir\"; then - $mkdir \"\$progdir\" - else - $rm \"\$progdir/\$file\" - fi" - - echo >> $output "\ - - # relink executable if necessary - if test -n \"\$relink_command\"; then - if relink_command_output=\`eval \$relink_command 2>&1\`; then : - else - $echo \"\$relink_command_output\" >&2 - $rm \"\$progdir/\$file\" - exit 1 - fi - fi - - $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || - { $rm \"\$progdir/\$program\"; - $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; } - $rm \"\$progdir/\$file\" - fi" - else - echo >> $output "\ - program='$outputname' - progdir=\"\$thisdir/$objdir\" -" - fi - - echo >> $output "\ - - if test -f \"\$progdir/\$program\"; then" - - # Export our shlibpath_var if we have one. - if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then - $echo >> $output "\ - # Add our own library path to $shlibpath_var - $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" - - # Some systems cannot cope with colon-terminated $shlibpath_var - # The second colon is a workaround for a bug in BeOS R4 sed - $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` - - export $shlibpath_var -" - fi - - # fixup the dll searchpath if we need to. - if test -n "$dllsearchpath"; then - $echo >> $output "\ - # Add the dll search path components to the executable PATH - PATH=$dllsearchpath:\$PATH -" - fi - - $echo >> $output "\ - if test \"\$libtool_execute_magic\" != \"$magic\"; then - # Run the actual program with our arguments. -" - case $host in - # win32 systems need to use the prog path for dll - # lookup to work - *-*-cygwin* | *-*-pw32*) - $echo >> $output "\ - exec \$progdir/\$program \${1+\"\$@\"} -" - ;; - - # Backslashes separate directories on plain windows - *-*-mingw | *-*-os2*) - $echo >> $output "\ - exec \$progdir\\\\\$program \${1+\"\$@\"} -" - ;; - - *) - $echo >> $output "\ - # Export the path to the program. - PATH=\"\$progdir:\$PATH\" - export PATH - - exec \$program \${1+\"\$@\"} -" - ;; - esac - $echo >> $output "\ - \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\" - exit 1 - fi - else - # The program doesn't exist. - \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2 - \$echo \"This script is just a wrapper for \$program.\" 1>&2 - echo \"See the $PACKAGE documentation for more information.\" 1>&2 - exit 1 - fi -fi\ -" - chmod +x $output - fi - exit 0 - ;; - esac - - # See if we need to build an old-fashioned archive. - for oldlib in $oldlibs; do - - if test "$build_libtool_libs" = convenience; then - oldobjs="$libobjs_save" - addlibs="$convenience" - build_libtool_libs=no - else - if test "$build_libtool_libs" = module; then - oldobjs="$libobjs_save" - build_libtool_libs=no - else - oldobjs="$objs$old_deplibs $non_pic_objects" - fi - addlibs="$old_convenience" - fi - - if test -n "$addlibs"; then - gentop="$output_objdir/${outputname}x" - $show "${rm}r $gentop" - $run ${rm}r "$gentop" - $show "$mkdir $gentop" - $run $mkdir "$gentop" - status=$? - if test $status -ne 0 && test ! -d "$gentop"; then - exit $status - fi - generated="$generated $gentop" - - # Add in members from convenience archives. - for xlib in $addlibs; do - # Extract the objects. - case $xlib in - [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; - *) xabs=`pwd`"/$xlib" ;; - esac - xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` - xdir="$gentop/$xlib" - - $show "${rm}r $xdir" - $run ${rm}r "$xdir" - $show "$mkdir $xdir" - $run $mkdir "$xdir" - status=$? - if test $status -ne 0 && test ! -d "$xdir"; then - exit $status - fi - $show "(cd $xdir && $AR x $xabs)" - $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? - - oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print | $NL2SP` - done - fi - - # Do each command in the archive commands. - if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then - eval cmds=\"$old_archive_from_new_cmds\" - else -# # Ensure that we have .o objects in place in case we decided -# # not to build a shared library, and have fallen back to building -# # static libs even though --disable-static was passed! -# for oldobj in $oldobjs; do -# if test ! -f $oldobj; then -# xdir=`$echo "X$oldobj" | $Xsed -e 's%/[^/]*$%%'` -# if test "X$xdir" = "X$oldobj"; then -# xdir="." -# else -# xdir="$xdir" -# fi -# baseobj=`$echo "X$oldobj" | $Xsed -e 's%^.*/%%'` -# obj=`$echo "X$baseobj" | $Xsed -e "$o2lo"` -# $show "(cd $xdir && ${LN_S} $obj $baseobj)" -# $run eval '(cd $xdir && ${LN_S} $obj $baseobj)' || exit $? -# fi -# done - - eval cmds=\"$old_archive_cmds\" - - if len=`expr "X$cmds" : ".*"` && - test $len -le $max_cmd_len; then - : - else - # the command line is too long to link in one step, link in parts - $echo "using piecewise archive linking..." - save_RANLIB=$RANLIB - RANLIB=: - objlist= - concat_cmds= - save_oldobjs=$oldobjs - # GNU ar 2.10+ was changed to match POSIX; thus no paths are - # encoded into archives. This makes 'ar r' malfunction in - # this piecewise linking case whenever conflicting object - # names appear in distinct ar calls; check, warn and compensate. - if (for obj in $save_oldobjs - do - $echo "X$obj" | $Xsed -e 's%^.*/%%' - done | sort | sort -uc >/dev/null 2>&1); then - : - else - $echo "$modename: warning: object name conflicts; overriding AR_FLAGS to 'cq'" 1>&2 - $echo "$modename: warning: to ensure that POSIX-compatible ar will work" 1>&2 - AR_FLAGS=cq - fi - for obj in $save_oldobjs - do - oldobjs="$objlist $obj" - objlist="$objlist $obj" - eval test_cmds=\"$old_archive_cmds\" - if len=`expr "X$test_cmds" : ".*"` && - test $len -le $max_cmd_len; then - : - else - # the above command should be used before it gets too long - oldobjs=$objlist - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" - objlist= - fi - done - RANLIB=$save_RANLIB - oldobjs=$objlist - eval cmds=\"\$concat_cmds~$old_archive_cmds\" - fi - fi - IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - done - - if test -n "$generated"; then - $show "${rm}r$generated" - $run ${rm}r$generated - fi - - # Now create the libtool archive. - case $output in - *.la) - old_library= - test "$build_old_libs" = yes && old_library="$libname.$libext" - $show "creating $output" - - # Preserve any variables that may affect compiler behavior - for var in $variables_saved_for_relink; do - if eval test -z \"\${$var+set}\"; then - relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" - elif eval var_value=\$$var; test -z "$var_value"; then - relink_command="$var=; export $var; $relink_command" - else - var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` - relink_command="$var=\"$var_value\"; export $var; $relink_command" - fi - done - # Quote the link command for shipping. - tagopts= - for tag in $taglist; do - tagopts="$tagopts --tag $tag" - done - relink_command="(cd `pwd`; $SHELL $0$tagopts --mode=relink $libtool_args)" - relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` - - # Only create the output if not a dry run. - if test -z "$run"; then - for installed in no yes; do - if test "$installed" = yes; then - if test -z "$install_libdir"; then - break - fi - output="$output_objdir/$outputname"i - # Replace all uninstalled libtool libraries with the installed ones - newdependency_libs= - for deplib in $dependency_libs; do - case $deplib in - *.la) - name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` - eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - if test -z "$libdir"; then - $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 - exit 1 - fi - newdependency_libs="$newdependency_libs $libdir/$name" - ;; - *) newdependency_libs="$newdependency_libs $deplib" ;; - esac - done - dependency_libs="$newdependency_libs" - newdlfiles= - for lib in $dlfiles; do - name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` - eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - if test -z "$libdir"; then - $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 - exit 1 - fi - newdlfiles="$newdlfiles $libdir/$name" - done - dlfiles="$newdlfiles" - newdlprefiles= - for lib in $dlprefiles; do - name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` - eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - if test -z "$libdir"; then - $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 - exit 1 - fi - newdlprefiles="$newdlprefiles $libdir/$name" - done - dlprefiles="$newdlprefiles" - fi - $rm $output - # place dlname in correct position for cygwin - tdlname=$dlname - case $host,$output,$installed,$module,$dlname in - *cygwin*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; - esac - $echo > $output "\ -# $outputname - a libtool library file -# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='$tdlname' - -# Names of this library. -library_names='$library_names' - -# The name of the static archive. -old_library='$old_library' - -# Libraries that this one depends upon. -dependency_libs='$dependency_libs' - -# Version information for $libname. -current=$current -age=$age -revision=$revision - -# Is this an already installed library? -installed=$installed - -# Files to dlopen/dlpreopen -dlopen='$dlfiles' -dlpreopen='$dlprefiles' - -# Directory that this library needs to be installed in: -libdir='$install_libdir'" - if test "$installed" = no && test $need_relink = yes; then - $echo >> $output "\ -relink_command=\"$relink_command\"" - fi - done - fi - - # Do a symbolic link so that the libtool archive can be found in - # LD_LIBRARY_PATH before the program is installed. - $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" - $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $? - ;; - esac - exit 0 - ;; - - # libtool install mode - install) - modename="$modename: install" - - # There may be an optional sh(1) argument at the beginning of - # install_prog (especially on Windows NT). - if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || - # Allow the use of GNU shtool's install command. - $echo "X$nonopt" | $Xsed | grep shtool > /dev/null; then - # Aesthetically quote it. - arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) - arg="\"$arg\"" - ;; - esac - install_prog="$arg " - arg="$1" - shift - else - install_prog= - arg="$nonopt" - fi - - # The real first argument should be the name of the installation program. - # Aesthetically quote it. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) - arg="\"$arg\"" - ;; - esac - install_prog="$install_prog$arg" - - # We need to accept at least all the BSD install flags. - dest= - files= - opts= - prev= - install_type= - isdir=no - stripme= - for arg - do - if test -n "$dest"; then - files="$files $dest" - dest="$arg" - continue - fi - - case $arg in - -d) isdir=yes ;; - -f) prev="-f" ;; - -g) prev="-g" ;; - -m) prev="-m" ;; - -o) prev="-o" ;; - -s) - stripme=" -s" - continue - ;; - -*) ;; - - *) - # If the previous option needed an argument, then skip it. - if test -n "$prev"; then - prev= - else - dest="$arg" - continue - fi - ;; - esac - - # Aesthetically quote the argument. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) - arg="\"$arg\"" - ;; - esac - install_prog="$install_prog $arg" - done - - if test -z "$install_prog"; then - $echo "$modename: you must specify an install program" 1>&2 - $echo "$help" 1>&2 - exit 1 - fi - - if test -n "$prev"; then - $echo "$modename: the \`$prev' option requires an argument" 1>&2 - $echo "$help" 1>&2 - exit 1 - fi - - if test -z "$files"; then - if test -z "$dest"; then - $echo "$modename: no file or destination specified" 1>&2 - else - $echo "$modename: you must specify a destination" 1>&2 - fi - $echo "$help" 1>&2 - exit 1 - fi - - # Strip any trailing slash from the destination. - dest=`$echo "X$dest" | $Xsed -e 's%/$%%'` - - # Check to see that the destination is a directory. - test -d "$dest" && isdir=yes - if test "$isdir" = yes; then - destdir="$dest" - destname= - else - destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'` - test "X$destdir" = "X$dest" && destdir=. - destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'` - - # Not a directory, so check to see that there is only one file specified. - set dummy $files - if test $# -gt 2; then - $echo "$modename: \`$dest' is not a directory" 1>&2 - $echo "$help" 1>&2 - exit 1 - fi - fi - case $destdir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - for file in $files; do - case $file in - *.lo) ;; - *) - $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 - $echo "$help" 1>&2 - exit 1 - ;; - esac - done - ;; - esac - - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic="$magic" - - staticlibs= - future_libdirs= - current_libdirs= - for file in $files; do - - # Do each installation. - case $file in - *.$libext) - # Do the static libraries later. - staticlibs="$staticlibs $file" - ;; - - *.la) - # Check to see that this really is a libtool archive. - if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : - else - $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 - $echo "$help" 1>&2 - exit 1 - fi - - library_names= - old_library= - relink_command= - # If there is no directory component, then add one. - case $file in - */* | *\\*) . $file ;; - *) . ./$file ;; - esac - - # Add the libdir to current_libdirs if it is the destination. - if test "X$destdir" = "X$libdir"; then - case "$current_libdirs " in - *" $libdir "*) ;; - *) current_libdirs="$current_libdirs $libdir" ;; - esac - else - # Note the libdir as a future libdir. - case "$future_libdirs " in - *" $libdir "*) ;; - *) future_libdirs="$future_libdirs $libdir" ;; - esac - fi - - dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/ - test "X$dir" = "X$file/" && dir= - dir="$dir$objdir" - - if test -n "$relink_command"; then - $echo "$modename: warning: relinking \`$file'" 1>&2 - $show "$relink_command" - if $run eval "$relink_command"; then : - else - $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 - exit 1 - fi - fi - - # See the names of the shared library. - set dummy $library_names - if test -n "$2"; then - realname="$2" - shift - shift - - srcname="$realname" - test -n "$relink_command" && srcname="$realname"T - - # Install the shared library and build the symlinks. - $show "$install_prog $dir/$srcname $destdir/$realname" - $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $? - if test -n "$stripme" && test -n "$striplib"; then - $show "$striplib $destdir/$realname" - $run eval "$striplib $destdir/$realname" || exit $? - fi - - if test $# -gt 0; then - # Delete the old symlinks, and create new ones. - for linkname - do - if test "$linkname" != "$realname"; then - $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)" - $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)" - fi - done - fi - - # Do each command in the postinstall commands. - lib="$destdir/$realname" - eval cmds=\"$postinstall_cmds\" - IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - fi - - # Install the pseudo-library for information purposes. - name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - instname="$dir/$name"i - $show "$install_prog $instname $destdir/$name" - $run eval "$install_prog $instname $destdir/$name" || exit $? - - # Maybe install the static library, too. - test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" - ;; - - *.lo) - # Install (i.e. copy) a libtool object. - - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile="$destdir/$destname" - else - destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - destfile="$destdir/$destfile" - fi - - # Deduce the name of the destination old-style object file. - case $destfile in - *.lo) - staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"` - ;; - *.$objext) - staticdest="$destfile" - destfile= - ;; - *) - $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 - $echo "$help" 1>&2 - exit 1 - ;; - esac - - # Install the libtool object if requested. - if test -n "$destfile"; then - $show "$install_prog $file $destfile" - $run eval "$install_prog $file $destfile" || exit $? - fi - - # Install the old object if enabled. - if test "$build_old_libs" = yes; then - # Deduce the name of the old-style object file. - staticobj=`$echo "X$file" | $Xsed -e "$lo2o"` - - $show "$install_prog $staticobj $staticdest" - $run eval "$install_prog \$staticobj \$staticdest" || exit $? - fi - exit 0 - ;; - - *) - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile="$destdir/$destname" - else - destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - destfile="$destdir/$destfile" - fi - - # Do a test to see if this is really a libtool program. - if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - notinst_deplibs= - relink_command= - - # If there is no directory component, then add one. - case $file in - */* | *\\*) . $file ;; - *) . ./$file ;; - esac - - # Check the variables that should have been set. - if test -z "$notinst_deplibs"; then - $echo "$modename: invalid libtool wrapper script \`$file'" 1>&2 - exit 1 - fi - - finalize=yes - for lib in $notinst_deplibs; do - # Check to see that each library is installed. - libdir= - if test -f "$lib"; then - # If there is no directory component, then add one. - case $lib in - */* | *\\*) . $lib ;; - *) . ./$lib ;; - esac - fi - libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test - if test -n "$libdir" && test ! -f "$libfile"; then - $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 - finalize=no - fi - done - - relink_command= - # If there is no directory component, then add one. - case $file in - */* | *\\*) . $file ;; - *) . ./$file ;; - esac - - outputname= - if test "$fast_install" = no && test -n "$relink_command"; then - if test "$finalize" = yes && test -z "$run"; then - tmpdir="/tmp" - test -n "$TMPDIR" && tmpdir="$TMPDIR" - tmpdir="$tmpdir/libtool-$$" - if $mkdir -p "$tmpdir" && chmod 700 "$tmpdir"; then : - else - $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2 - continue - fi - file=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - outputname="$tmpdir/$file" - # Replace the output file specification. - relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` - - $show "$relink_command" - if $run eval "$relink_command"; then : - else - $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 - ${rm}r "$tmpdir" - continue - fi - file="$outputname" - else - $echo "$modename: warning: cannot relink \`$file'" 1>&2 - fi - else - # Install the binary that we compiled earlier. - file=`$echo "X$file" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` - fi - fi - - - # remove .exe since cygwin /usr/bin/install will append another - # one anyways - case $install_prog,$host in - */usr/bin/install*,*cygwin*) - case $file:$destfile in - *.exe:*.exe) - # this is ok - ;; - *.exe:*) - destfile=$destfile.exe - ;; - *:*.exe) - destfile=`echo $destfile | sed -e 's,.exe$,,'` - ;; - esac - ;; - esac - - $show "$install_prog$stripme $file $destfile" - $run eval "$install_prog\$stripme \$file \$destfile" || exit $? - test -n "$outputname" && ${rm}r "$tmpdir" - ;; - esac - done - - for file in $staticlibs; do - name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - - # Set up the ranlib parameters. - oldlib="$destdir/$name" - - $show "$install_prog $file $oldlib" - $run eval "$install_prog \$file \$oldlib" || exit $? - - if test -n "$stripme" && test -n "$striplib"; then - $show "$old_striplib $oldlib" - $run eval "$old_striplib $oldlib" || exit $? - fi - - # Do each command in the postinstall commands. - eval cmds=\"$old_postinstall_cmds\" - IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - done - - if test -n "$future_libdirs"; then - $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2 - fi - - if test -n "$current_libdirs"; then - # Maybe just do a dry run. - test -n "$run" && current_libdirs=" -n$current_libdirs" - exec_cmd='$SHELL $0 --finish$current_libdirs' - else - exit 0 - fi - ;; - - # libtool finish mode - finish) - modename="$modename: finish" - libdirs="$nonopt" - admincmds= - - if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then - for dir - do - libdirs="$libdirs $dir" - done - - for libdir in $libdirs; do - if test -n "$finish_cmds"; then - # Do each command in the finish commands. - eval cmds=\"$finish_cmds\" - IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" || admincmds="$admincmds - $cmd" - done - IFS="$save_ifs" - fi - if test -n "$finish_eval"; then - # Do the single finish_eval. - eval cmds=\"$finish_eval\" - $run eval "$cmds" || admincmds="$admincmds - $cmds" - fi - done - fi - - # Exit here if they wanted silent mode. - test "$show" = ":" && exit 0 - - echo "----------------------------------------------------------------------" - echo "Libraries have been installed in:" - for libdir in $libdirs; do - echo " $libdir" - done - echo - echo "If you ever happen to want to link against installed libraries" - echo "in a given directory, LIBDIR, you must either use libtool, and" - echo "specify the full pathname of the library, or use the \`-LLIBDIR'" - echo "flag during linking and do at least one of the following:" - if test -n "$shlibpath_var"; then - echo " - add LIBDIR to the \`$shlibpath_var' environment variable" - echo " during execution" - fi - if test -n "$runpath_var"; then - echo " - add LIBDIR to the \`$runpath_var' environment variable" - echo " during linking" - fi - if test -n "$hardcode_libdir_flag_spec"; then - libdir=LIBDIR - eval flag=\"$hardcode_libdir_flag_spec\" - - echo " - use the \`$flag' linker flag" - fi - if test -n "$admincmds"; then - echo " - have your system administrator run these commands:$admincmds" - fi - if test -f /etc/ld.so.conf; then - echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" - fi - echo - echo "See any operating system documentation about shared libraries for" - echo "more information, such as the ld(1) and ld.so(8) manual pages." - echo "----------------------------------------------------------------------" - exit 0 - ;; - - # libtool execute mode - execute) - modename="$modename: execute" - - # The first argument is the command name. - cmd="$nonopt" - if test -z "$cmd"; then - $echo "$modename: you must specify a COMMAND" 1>&2 - $echo "$help" - exit 1 - fi - - # Handle -dlopen flags immediately. - for file in $execute_dlfiles; do - if test ! -f "$file"; then - $echo "$modename: \`$file' is not a file" 1>&2 - $echo "$help" 1>&2 - exit 1 - fi - - dir= - case $file in - *.la) - # Check to see that this really is a libtool archive. - if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : - else - $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 - $echo "$help" 1>&2 - exit 1 - fi - - # Read the libtool library. - dlname= - library_names= - - # If there is no directory component, then add one. - case $file in - */* | *\\*) . $file ;; - *) . ./$file ;; - esac - - # Skip this library if it cannot be dlopened. - if test -z "$dlname"; then - # Warn if it was a shared library. - test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'" - continue - fi - - dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` - test "X$dir" = "X$file" && dir=. - - if test -f "$dir/$objdir/$dlname"; then - dir="$dir/$objdir" - else - $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 - exit 1 - fi - ;; - - *.lo) - # Just add the directory containing the .lo file. - dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` - test "X$dir" = "X$file" && dir=. - ;; - - *) - $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2 - continue - ;; - esac - - # Get the absolute pathname. - absdir=`cd "$dir" && pwd` - test -n "$absdir" && dir="$absdir" - - # Now add the directory to shlibpath_var. - if eval "test -z \"\$$shlibpath_var\""; then - eval "$shlibpath_var=\"\$dir\"" - else - eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" - fi - done - - # This variable tells wrapper scripts just to set shlibpath_var - # rather than running their programs. - libtool_execute_magic="$magic" - - # Check if any of the arguments is a wrapper script. - args= - for file - do - case $file in - -*) ;; - *) - # Do a test to see if this is really a libtool program. - if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - # If there is no directory component, then add one. - case $file in - */* | *\\*) . $file ;; - *) . ./$file ;; - esac - - # Transform arg to wrapped name. - file="$progdir/$program" - fi - ;; - esac - # Quote arguments (to preserve shell metacharacters). - file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"` - args="$args \"$file\"" - done - - if test -z "$run"; then - if test -n "$shlibpath_var"; then - # Export the shlibpath_var. - eval "export $shlibpath_var" - fi - - # Restore saved enviroment variables - if test "${save_LC_ALL+set}" = set; then - LC_ALL="$save_LC_ALL"; export LC_ALL - fi - if test "${save_LANG+set}" = set; then - LANG="$save_LANG"; export LANG - fi - - # Now prepare to actually exec the command. - exec_cmd='"$cmd"$args' - else - # Display what would be done. - if test -n "$shlibpath_var"; then - eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\"" - $echo "export $shlibpath_var" - fi - $echo "$cmd$args" - exit 0 - fi - ;; - - # libtool clean and uninstall mode - clean | uninstall) - modename="$modename: $mode" - rm="$nonopt" - files= - rmforce= - exit_status=0 - - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic="$magic" - - for arg - do - case $arg in - -f) rm="$rm $arg"; rmforce=yes ;; - -*) rm="$rm $arg" ;; - *) files="$files $arg" ;; - esac - done - - if test -z "$rm"; then - $echo "$modename: you must specify an RM program" 1>&2 - $echo "$help" 1>&2 - exit 1 - fi - - rmdirs= - - for file in $files; do - dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` - if test "X$dir" = "X$file"; then - dir=. - objdir="$objdir" - else - objdir="$dir/$objdir" - fi - name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - test $mode = uninstall && objdir="$dir" - - # Remember objdir for removal later, being careful to avoid duplicates - if test $mode = clean; then - case " $rmdirs " in - *" $objdir "*) ;; - *) rmdirs="$rmdirs $objdir" ;; - esac - fi - - # Don't error if the file doesn't exist and rm -f was used. - if (test -L "$file") >/dev/null 2>&1 \ - || (test -h "$file") >/dev/null 2>&1 \ - || test -f "$file"; then - : - elif test -d "$file"; then - exit_status=1 - continue - elif test "$rmforce" = yes; then - continue - fi - - rmfiles="$file" - - case $name in - *.la) - # Possibly a libtool archive, so verify it. - if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - . $dir/$name - - # Delete the libtool libraries and symlinks. - for n in $library_names; do - rmfiles="$rmfiles $objdir/$n" - done - test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" - test $mode = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" - - if test $mode = uninstall; then - if test -n "$library_names"; then - # Do each command in the postuninstall commands. - eval cmds=\"$postuninstall_cmds\" - IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" - if test $? != 0 && test "$rmforce" != yes; then - exit_status=1 - fi - done - IFS="$save_ifs" - fi - - if test -n "$old_library"; then - # Do each command in the old_postuninstall commands. - eval cmds=\"$old_postuninstall_cmds\" - IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" - if test $? != 0 && test "$rmforce" != yes; then - exit_status=1 - fi - done - IFS="$save_ifs" - fi - # FIXME: should reinstall the best remaining shared library. - fi - fi - ;; - - *.lo) - # Possibly a libtool object, so verify it. - if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - - # Read the .lo file - . $dir/$name - - # Add PIC object to the list of files to remove. - if test -n "$pic_object" \ - && test "$pic_object" != none; then - rmfiles="$rmfiles $dir/$pic_object" - fi - - # Add non-PIC object to the list of files to remove. - if test -n "$non_pic_object" \ - && test "$non_pic_object" != none; then - rmfiles="$rmfiles $dir/$non_pic_object" - fi - fi - ;; - - *) - # Do a test to see if this is a libtool program. - if test $mode = clean && - (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - relink_command= - . $dir/$file - - rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" - if test "$fast_install" = yes && test -n "$relink_command"; then - rmfiles="$rmfiles $objdir/lt-$name" - fi - fi - ;; - esac - $show "$rm $rmfiles" - $run $rm $rmfiles || exit_status=1 - done - - # Try to remove the ${objdir}s in the directories where we deleted files - for dir in $rmdirs; do - if test -d "$dir"; then - $show "rmdir $dir" - $run rmdir $dir >/dev/null 2>&1 - fi - done - - exit $exit_status - ;; - - "") - $echo "$modename: you must specify a MODE" 1>&2 - $echo "$generic_help" 1>&2 - exit 1 - ;; - esac - - if test -z "$exec_cmd"; then - $echo "$modename: invalid operation mode \`$mode'" 1>&2 - $echo "$generic_help" 1>&2 - exit 1 - fi -fi # test -z "$show_help" - -if test -n "$exec_cmd"; then - eval exec $exec_cmd - exit 1 -fi - -# We need to display help for each of the modes. -case $mode in -"") $echo \ -"Usage: $modename [OPTION]... [MODE-ARG]... - -Provide generalized library-building support services. - - --config show all configuration variables - --debug enable verbose shell tracing --n, --dry-run display commands without modifying any files - --features display basic configuration information and exit - --finish same as \`--mode=finish' - --help display this help message and exit - --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] - --quiet same as \`--silent' - --silent don't print informational messages - --tag=TAG use configuration variables from tag TAG - --version print version information - -MODE must be one of the following: - - clean remove files from the build directory - compile compile a source file into a libtool object - execute automatically set library path, then run a program - finish complete the installation of libtool libraries - install install libraries or executables - link create a library or an executable - uninstall remove libraries from an installed directory - -MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for -a more detailed description of MODE." - exit 0 - ;; - -clean) - $echo \ -"Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE... - -Remove files from the build directory. - -RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed -to RM. - -If FILE is a libtool library, object or program, all the files associated -with it are deleted. Otherwise, only FILE itself is deleted using RM." - ;; - -compile) - $echo \ -"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE - -Compile a source file into a libtool library object. - -This mode accepts the following additional options: - - -o OUTPUT-FILE set the output file name to OUTPUT-FILE - -prefer-pic try to building PIC objects only - -prefer-non-pic try to building non-PIC objects only - -static always build a \`.o' file suitable for static linking - -COMPILE-COMMAND is a command to be used in creating a \`standard' object file -from the given SOURCEFILE. - -The output file name is determined by removing the directory component from -SOURCEFILE, then substituting the C source code suffix \`.c' with the -library object suffix, \`.lo'." - ;; - -execute) - $echo \ -"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]... - -Automatically set library path, then run a program. - -This mode accepts the following additional options: - - -dlopen FILE add the directory containing FILE to the library path - -This mode sets the library path environment variable according to \`-dlopen' -flags. - -If any of the ARGS are libtool executable wrappers, then they are translated -into their corresponding uninstalled binary, and any of their required library -directories are added to the library path. - -Then, COMMAND is executed, with ARGS as arguments." - ;; - -finish) - $echo \ -"Usage: $modename [OPTION]... --mode=finish [LIBDIR]... - -Complete the installation of libtool libraries. - -Each LIBDIR is a directory that contains libtool libraries. - -The commands that this mode executes may require superuser privileges. Use -the \`--dry-run' option if you just want to see what would be executed." - ;; - -install) - $echo \ -"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND... - -Install executables or libraries. - -INSTALL-COMMAND is the installation command. The first component should be -either the \`install' or \`cp' program. - -The rest of the components are interpreted as arguments to that command (only -BSD-compatible install options are recognized)." - ;; - -link) - $echo \ -"Usage: $modename [OPTION]... --mode=link LINK-COMMAND... - -Link object files or libraries together to form another library, or to -create an executable program. - -LINK-COMMAND is a command using the C compiler that you would use to create -a program from several object files. - -The following components of LINK-COMMAND are treated specially: - - -all-static do not do any dynamic linking at all - -avoid-version do not add a version suffix if possible - -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime - -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols - -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) - -export-symbols SYMFILE - try to export only the symbols listed in SYMFILE - -export-symbols-regex REGEX - try to export only the symbols matching REGEX - -LLIBDIR search LIBDIR for required installed libraries - -lNAME OUTPUT-FILE requires the installed library libNAME - -module build a library that can dlopened - -no-fast-install disable the fast-install mode - -no-install link a not-installable executable - -no-undefined declare that a library does not refer to external symbols - -o OUTPUT-FILE create OUTPUT-FILE from the specified objects - -objectlist FILE Use a list of object files found in FILE to specify objects - -release RELEASE specify package release information - -rpath LIBDIR the created library will eventually be installed in LIBDIR - -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries - -static do not do any dynamic linking of libtool libraries - -version-info CURRENT[:REVISION[:AGE]] - specify library version info [each variable defaults to 0] - -All other options (arguments beginning with \`-') are ignored. - -Every other argument is treated as a filename. Files ending in \`.la' are -treated as uninstalled libtool libraries, other files are standard or library -object files. - -If the OUTPUT-FILE ends in \`.la', then a libtool library is created, -only library objects (\`.lo' files) may be specified, and \`-rpath' is -required, except when creating a convenience library. - -If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created -using \`ar' and \`ranlib', or on Windows using \`lib'. - -If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file -is created, otherwise an executable program is created." - ;; - -uninstall) - $echo \ -"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... - -Remove libraries from an installation directory. - -RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed -to RM. - -If FILE is a libtool library, all the files associated with it are deleted. -Otherwise, only FILE itself is deleted using RM." - ;; - -*) - $echo "$modename: invalid operation mode \`$mode'" 1>&2 - $echo "$help" 1>&2 - exit 1 - ;; -esac - -echo -$echo "Try \`$modename --help' for more information about other modes." - -exit 0 - -# The TAGs below are defined such that we never get into a situation -# in which we disable both kinds of libraries. Given conflicting -# choices, we go for a static library, that is the most portable, -# since we can't tell whether shared libraries were disabled because -# the user asked for that or because the platform doesn't support -# them. This is particularly important on AIX, because we don't -# support having both static and shared libraries enabled at the same -# time on that platform, so we default to a shared-only configuration. -# If a disable-shared tag is given, we'll fallback to a static-only -# configuration. But we'll never go from static-only to shared-only. - -### BEGIN LIBTOOL TAG CONFIG: disable-shared -build_libtool_libs=no -build_old_libs=yes -### END LIBTOOL TAG CONFIG: disable-shared - -### BEGIN LIBTOOL TAG CONFIG: disable-static -build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` -### END LIBTOOL TAG CONFIG: disable-static - -# Local Variables: -# mode:shell-script -# sh-indentation:2 -# End: diff --git a/contrib/gcc/missing b/contrib/gcc/missing deleted file mode 100755 index 7789652..0000000 --- a/contrib/gcc/missing +++ /dev/null @@ -1,190 +0,0 @@ -#! /bin/sh -# Common stub for a few missing GNU programs while installing. -# Copyright (C) 1996, 1997 Free Software Foundation, Inc. -# Franc,ois Pinard , 1996. - -# 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. - -if test $# -eq 0; then - echo 1>&2 "Try \`$0 --help' for more information" - exit 1 -fi - -case "$1" in - - -h|--h|--he|--hel|--help) - echo "\ -$0 [OPTION]... PROGRAM [ARGUMENT]... - -Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an -error status if there is no known handling for PROGRAM. - -Options: - -h, --help display this help and exit - -v, --version output version information and exit - -Supported PROGRAM values: - aclocal touch file \`aclocal.m4' - autoconf touch file \`configure' - autoheader touch file \`config.h.in' - automake touch all \`Makefile.in' files - bison create \`y.tab.[ch]', if possible, from existing .[ch] - flex create \`lex.yy.c', if possible, from existing .c - lex create \`lex.yy.c', if possible, from existing .c - makeinfo touch the output file - yacc create \`y.tab.[ch]', if possible, from existing .[ch]" - ;; - - -v|--v|--ve|--ver|--vers|--versi|--versio|--version) - echo "missing - GNU libit 0.0" - ;; - - -*) - echo 1>&2 "$0: Unknown \`$1' option" - echo 1>&2 "Try \`$0 --help' for more information" - exit 1 - ;; - - aclocal) - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified \`acinclude.m4' or \`configure.in'. You might want - to install the \`Automake' and \`Perl' packages. Grab them from - any GNU archive site." - touch aclocal.m4 - ;; - - autoconf) - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified \`configure.in'. You might want to install the - \`Autoconf' and \`GNU m4' packages. Grab them from any GNU - archive site." - touch configure - ;; - - autoheader) - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified \`acconfig.h' or \`configure.in'. You might want - to install the \`Autoconf' and \`GNU m4' packages. Grab them - from any GNU archive site." - files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' configure.in` - test -z "$files" && files="config.h" - touch_files= - for f in $files; do - case "$f" in - *:*) touch_files="$touch_files "`echo "$f" | - sed -e 's/^[^:]*://' -e 's/:.*//'`;; - *) touch_files="$touch_files $f.in";; - esac - done - touch $touch_files - ;; - - automake) - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified \`Makefile.am', \`acinclude.m4' or \`configure.in'. - You might want to install the \`Automake' and \`Perl' packages. - Grab them from any GNU archive site." - find . -type f -name Makefile.am -print | - sed 's/\.am$/.in/' | - while read f; do touch "$f"; done - ;; - - bison|yacc) - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified a \`.y' file. You may need the \`Bison' package - in order for those modifications to take effect. You can get - \`Bison' from any GNU archive site." - rm -f y.tab.c y.tab.h - if [ $# -ne 1 ]; then - eval LASTARG="\${$#}" - case "$LASTARG" in - *.y) - SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` - if [ -f "$SRCFILE" ]; then - cp "$SRCFILE" y.tab.c - fi - SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` - if [ -f "$SRCFILE" ]; then - cp "$SRCFILE" y.tab.h - fi - ;; - esac - fi - if [ ! -f y.tab.h ]; then - echo >y.tab.h - fi - if [ ! -f y.tab.c ]; then - echo 'main() { return 0; }' >y.tab.c - fi - ;; - - lex|flex) - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified a \`.l' file. You may need the \`Flex' package - in order for those modifications to take effect. You can get - \`Flex' from any GNU archive site." - rm -f lex.yy.c - if [ $# -ne 1 ]; then - eval LASTARG="\${$#}" - case "$LASTARG" in - *.l) - SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` - if [ -f "$SRCFILE" ]; then - cp "$SRCFILE" lex.yy.c - fi - ;; - esac - fi - if [ ! -f lex.yy.c ]; then - echo 'main() { return 0; }' >lex.yy.c - fi - ;; - - makeinfo) - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified a \`.texi' or \`.texinfo' file, or any other file - indirectly affecting the aspect of the manual. The spurious - call might also be the consequence of using a buggy \`make' (AIX, - DU, IRIX). You might want to install the \`Texinfo' package or - the \`GNU make' package. Grab either from any GNU archive site." - file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` - if test -z "$file"; then - file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` - file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` - fi - touch $file - ;; - - *) - echo 1>&2 "\ -WARNING: \`$1' is needed, and you do not seem to have it handy on your - system. You might have modified some files without having the - proper tools for further handling them. Check the \`README' file, - it often tells you about the needed prerequirements for installing - this package. You may also peek at any GNU archive site, in case - some other package would contain this missing \`$1' program." - exit 1 - ;; -esac - -exit 0 diff --git a/contrib/gcc/mkdep b/contrib/gcc/mkdep deleted file mode 100755 index 3c5b508..0000000 --- a/contrib/gcc/mkdep +++ /dev/null @@ -1,87 +0,0 @@ -#!/bin/sh - -# -# Copyright (c) 1987 Regents of the University of California. -# All rights reserved. -# -# Redistribution and use in source and binary forms are permitted -# provided that the above copyright notice and this paragraph are -# duplicated in all such forms and that any documentation, -# advertising materials, and other materials related to such -# distribution and use acknowledge that the software was developed -# by the University of California, Berkeley. The name of the -# University may not be used to endorse or promote products derived -# from this software without specific prior written permission. -# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED -# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. -# -# @(#)mkdep.sh 5.12 (Berkeley) 6/30/88 -# - -MAKE=Makefile # default makefile name is "Makefile" - -while : - do case "$1" in - # -f allows you to select a makefile name - -f) - MAKE=$2 - shift; shift ;; - - # the -p flag produces "program: program.c" style dependencies - # so .o's don't get produced - -p) - SED='s;\.o;;' - shift ;; - *) - break ;; - esac -done - -if [ $# = 0 ] ; then - echo 'usage: mkdep [-p] [-f makefile] [flags] file ...' - exit 1 -fi - -if [ ! -w $MAKE ]; then - echo "mkdep: no writeable file \"$MAKE\"" - exit 1 -fi - -TMP=/tmp/mkdep$$ - -trap 'rm -f $TMP ; exit 1' 1 2 3 13 15 - -cp $MAKE ${MAKE}.bak - -sed -e '/DO NOT DELETE THIS LINE/,$d' < $MAKE > $TMP - -cat << _EOF_ >> $TMP -# DO NOT DELETE THIS LINE -- mkdep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -_EOF_ - -# If your compiler doesn't have -M, add it. If you can't, the next two -# lines will try and replace the "cc -M". The real problem is that this -# hack can't deal with anything that requires a search path, and doesn't -# even try for anything using bracket (<>) syntax. -# -# egrep '^#include[ ]*".*"' /dev/null $* | -# sed -e 's/:[^"]*"\([^"]*\)".*/: \1/' -e 's/\.c/.o/' | - -gcc -MM $* | -sed " - s; \./; ;g - $SED" >> $TMP - -cat << _EOF_ >> $TMP - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY -_EOF_ - -# copy to preserve permissions -cp $TMP $MAKE -rm -f ${MAKE}.bak $TMP -exit 0 - - diff --git a/contrib/gcc/mkinstalldirs b/contrib/gcc/mkinstalldirs deleted file mode 100755 index cc8783e..0000000 --- a/contrib/gcc/mkinstalldirs +++ /dev/null @@ -1,36 +0,0 @@ -#! /bin/sh -# mkinstalldirs --- make directory hierarchy -# Author: Noah Friedman -# Created: 1993-05-16 -# Last modified: 1994-03-25 -# Public domain - -errstatus=0 - -for file in ${1+"$@"} ; do - set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` - shift - - pathcomp= - for d in ${1+"$@"} ; do - pathcomp="$pathcomp$d" - case "$pathcomp" in - -* ) pathcomp=./$pathcomp ;; - esac - - if test ! -d "$pathcomp"; then - echo "mkdir $pathcomp" 1>&2 - mkdir "$pathcomp" > /dev/null 2>&1 || lasterr=$? - fi - - if test ! -d "$pathcomp"; then - errstatus=$lasterr - fi - - pathcomp="$pathcomp/" - done -done - -exit $errstatus - -# mkinstalldirs ends here diff --git a/contrib/gcc/symlink-tree b/contrib/gcc/symlink-tree deleted file mode 100755 index 5b18cab..0000000 --- a/contrib/gcc/symlink-tree +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/sh -# Create a symlink tree. -# -# Syntax: symlink-tree srcdir "ignore1 ignore2 ..." -# -# where srcdir is the directory to create a symlink tree to, -# and "ignoreN" is a list of files/directories to ignore. - -prog=$0 -srcdir=$1 -ignore="$2" - -if test $# -lt 1; then - echo "symlink-tree error: Usage: symlink-tree srcdir \"ignore1 ignore2 ...\"" - exit 1 -fi - -ignore_additional=". .. CVS" - -# If we were invoked with a relative path name, adjust ${prog} to work -# in subdirs. -case ${prog} in -/* | [A-Za-z]:[\\/]*) ;; -*) prog=../${prog} ;; -esac - -# Set newsrcdir to something subdirectories can use. -case ${srcdir} in -/* | [A-Za-z]:[\\/]*) newsrcdir=${srcdir} ;; -*) newsrcdir=../${srcdir} ;; -esac - -for f in `ls -a ${srcdir}`; do - if [ -d ${srcdir}/$f ]; then - found= - for i in ${ignore} ${ignore_additional}; do - if [ "$f" = "$i" ]; then - found=yes - fi - done - if [ -z "${found}" ]; then - echo "$f ..working in" - if [ -d $f ]; then true; else mkdir $f; fi - (cd $f; ${prog} ${newsrcdir}/$f "${ignore}") - fi - else - echo "$f ..linked" - rm -f $f - ln -s ${srcdir}/$f . - fi -done - -exit 0 diff --git a/contrib/gcc/ylwrap b/contrib/gcc/ylwrap deleted file mode 100755 index 2288ccd..0000000 --- a/contrib/gcc/ylwrap +++ /dev/null @@ -1,123 +0,0 @@ -#! /bin/sh -# ylwrap - wrapper for lex/yacc invocations. -# Copyright (C) 1996, 1997 Free Software Foundation, Inc. -# Written by Tom Tromey . -# -# 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. - -# Usage: -# ylwrap PROGRAM INPUT [OUTPUT DESIRED]... -- [ARGS]... -# * PROGRAM is program to run. -# * INPUT is the input file -# * OUTPUT is file PROG generates -# * DESIRED is file we actually want -# * ARGS are passed to PROG -# Any number of OUTPUT,DESIRED pairs may be used. - -# The program to run. -prog="$1" -shift -# Make any relative path in $prog absolute. -case "$prog" in - /* | [A-Za-z]:\\*) ;; - */*) prog="`pwd`/$prog" ;; -esac - -# The input. -input="$1" -shift -case "$input" in - /* | [A-Za-z]:\\*) - # Absolute path; do nothing. - ;; - *) - # Relative path. Make it absolute. Why? Because otherwise any - # debugging info in the generated file will point to the wrong - # place. This is really gross. - input="`pwd`/$input" - ;; -esac - -# We don't want to use the absolute path if the input in the current -# directory like when making a tar ball. -input_base=`echo $input | sed -e 's|.*/||'` -if test -f $input_base && cmp $input_base $input >/dev/null 2>&1; then - input=$input_base -fi - -pairlist= -while test "$#" -ne 0; do - if test "$1" = "--"; then - shift - break - fi - pairlist="$pairlist $1" - shift -done - -# FIXME: add hostname here for parallel makes that run commands on -# other machines. But that might take us over the 14-char limit. -dirname=ylwrap$$ -trap "cd `pwd`; rm -rf $dirname > /dev/null 2>&1" 1 2 3 15 -mkdir $dirname || exit 1 - -cd $dirname -case "$input" in - /* | [A-Za-z]:\\*) - # Absolute path; do nothing. - ;; - *) - # Make a symbolic link, hard link or hardcopy. - ln -s ../"$input" . > /dev/null 2>&1 || ln ../"$input" . > /dev/null 2>&1 || cp ../"$input" . - ;; -esac -$prog ${1+"$@"} "$input" -status=$? - -if test $status -eq 0; then - set X $pairlist - shift - first=yes - while test "$#" -ne 0; do - if test -f "$1"; then - # If $2 is an absolute path name, then just use that, - # otherwise prepend `../'. - case "$2" in - /* | [A-Za-z]:\\*) target="$2";; - *) target="../$2";; - esac - mv "$1" "$target" || status=$? - else - # A missing file is only an error for the first file. This - # is a blatant hack to let us support using "yacc -d". If -d - # is not specified, we don't want an error when the header - # file is "missing". - if test $first = yes; then - status=1 - fi - fi - shift - shift - first=no - done -else - status=$? -fi - -# Remove the directory. -cd .. -rm -rf $dirname - -exit $status -- cgit v1.1 From b2a8872fbe1ec1c49094559ac7b78e6ea4ab7180 Mon Sep 17 00:00:00 2001 From: kan Date: Fri, 11 Jul 2003 03:40:53 +0000 Subject: Gcc 3.3.1-pre as of 2003-07-11. --- contrib/gcc/ChangeLog | 22759 ++++++++++++++++----------- contrib/gcc/ChangeLog.0 | 12 +- contrib/gcc/ChangeLog.1 | 32 +- contrib/gcc/ChangeLog.2 | 34 +- contrib/gcc/ChangeLog.3 | 50 +- contrib/gcc/ChangeLog.4 | 54 +- contrib/gcc/ChangeLog.5 | 42 +- contrib/gcc/ChangeLog.6 | 40 +- contrib/gcc/ChangeLog.7 | 21543 +++++++++++++++++++++++++ contrib/gcc/FSFChangeLog.10 | 10 +- contrib/gcc/FSFChangeLog.11 | 42 +- contrib/gcc/LANGUAGES | 2 +- contrib/gcc/Makefile.in | 1187 +- contrib/gcc/ONEWS | 98 +- contrib/gcc/README.Portability | 51 +- contrib/gcc/aclocal.m4 | 448 +- contrib/gcc/alias.c | 485 +- contrib/gcc/ansidecl.h | 35 +- contrib/gcc/attribs.c | 1093 +- contrib/gcc/basic-block.h | 200 +- contrib/gcc/bb-reorder.c | 71 +- contrib/gcc/bitmap.c | 187 +- contrib/gcc/bitmap.h | 103 +- contrib/gcc/builtin-attrs.def | 90 +- contrib/gcc/builtin-types.def | 47 +- contrib/gcc/builtins.c | 578 +- contrib/gcc/builtins.def | 536 +- contrib/gcc/c-aux-info.c | 4 +- contrib/gcc/c-common.c | 3579 ++++- contrib/gcc/c-common.def | 30 +- contrib/gcc/c-common.h | 521 +- contrib/gcc/c-config-lang.in | 26 + contrib/gcc/c-convert.c | 12 +- contrib/gcc/c-decl.c | 1370 +- contrib/gcc/c-dump.c | 196 + contrib/gcc/c-errors.c | 9 +- contrib/gcc/c-format.c | 201 +- contrib/gcc/c-lang.c | 117 +- contrib/gcc/c-lex.c | 856 +- contrib/gcc/c-objc-common.c | 86 +- contrib/gcc/c-opts.c | 1799 +++ contrib/gcc/c-parse.in | 532 +- contrib/gcc/c-pragma.c | 68 +- contrib/gcc/c-pragma.h | 10 + contrib/gcc/c-pretty-print.c | 1493 ++ contrib/gcc/c-pretty-print.h | 165 + contrib/gcc/c-semantics.c | 22 +- contrib/gcc/c-tree.h | 154 +- contrib/gcc/c-typeck.c | 547 +- contrib/gcc/caller-save.c | 35 +- contrib/gcc/calls.c | 292 +- contrib/gcc/cfg.c | 241 +- contrib/gcc/cfganal.c | 368 +- contrib/gcc/cfgbuild.c | 218 +- contrib/gcc/cfgcleanup.c | 429 +- contrib/gcc/cfglayout.c | 581 +- contrib/gcc/cfglayout.h | 11 +- contrib/gcc/cfgloop.c | 1085 +- contrib/gcc/cfgrtl.c | 715 +- contrib/gcc/collect2.c | 43 +- contrib/gcc/collect2.h | 1 - contrib/gcc/combine.c | 1150 +- contrib/gcc/config.gcc | 1731 +- contrib/gcc/config.in | 138 +- contrib/gcc/config/alpha/alpha-interix.h | 79 +- contrib/gcc/config/alpha/alpha-protos.h | 79 +- contrib/gcc/config/alpha/alpha.c | 2046 ++- contrib/gcc/config/alpha/alpha.h | 350 +- contrib/gcc/config/alpha/alpha.md | 1925 ++- contrib/gcc/config/alpha/elf.h | 261 +- contrib/gcc/config/alpha/ev4.md | 147 + contrib/gcc/config/alpha/ev5.md | 190 + contrib/gcc/config/alpha/ev6.md | 173 + contrib/gcc/config/alpha/freebsd.h | 25 +- contrib/gcc/config/alpha/gnu.h | 30 + contrib/gcc/config/alpha/linux-elf.h | 14 +- contrib/gcc/config/alpha/linux.h | 27 +- contrib/gcc/config/alpha/netbsd.h | 63 +- contrib/gcc/config/alpha/openbsd.h | 11 +- contrib/gcc/config/alpha/osf.h | 38 +- contrib/gcc/config/alpha/osf5.h | 13 +- contrib/gcc/config/alpha/t-crtfm | 3 +- contrib/gcc/config/alpha/unicosmk.h | 122 +- contrib/gcc/config/alpha/vms-cc.c | 20 +- contrib/gcc/config/alpha/vms-crt0-64.c | 2 +- contrib/gcc/config/alpha/vms-crt0.c | 2 +- contrib/gcc/config/alpha/vms-ld.c | 3 +- contrib/gcc/config/alpha/vms-psxcrt0-64.c | 2 +- contrib/gcc/config/alpha/vms-psxcrt0.c | 2 +- contrib/gcc/config/alpha/vms.h | 47 +- contrib/gcc/config/alpha/vxworks.h | 12 +- contrib/gcc/config/arm/README-interworking | 2 +- contrib/gcc/config/arm/aof.h | 12 +- contrib/gcc/config/arm/aout.h | 27 +- contrib/gcc/config/arm/arm-modes.def | 46 + contrib/gcc/config/arm/arm-protos.h | 21 +- contrib/gcc/config/arm/arm.c | 810 +- contrib/gcc/config/arm/arm.h | 373 +- contrib/gcc/config/arm/arm.md | 321 +- contrib/gcc/config/arm/coff.h | 38 +- contrib/gcc/config/arm/conix-elf.h | 8 +- contrib/gcc/config/arm/crti.asm | 2 +- contrib/gcc/config/arm/crtn.asm | 2 +- contrib/gcc/config/arm/elf.h | 55 +- contrib/gcc/config/arm/freebsd.h | 3 - contrib/gcc/config/arm/linux-elf.h | 22 +- contrib/gcc/config/arm/linux-gas.h | 2 +- contrib/gcc/config/arm/netbsd-elf.h | 177 + contrib/gcc/config/arm/netbsd.h | 54 +- contrib/gcc/config/arm/pe.c | 24 +- contrib/gcc/config/arm/pe.h | 31 +- contrib/gcc/config/arm/rtems-elf.h | 8 +- contrib/gcc/config/arm/semi.h | 4 +- contrib/gcc/config/arm/semiaof.h | 7 +- contrib/gcc/config/arm/t-arm-elf | 6 +- contrib/gcc/config/arm/t-pe | 3 +- contrib/gcc/config/arm/unknown-elf-oabi.h | 5 +- contrib/gcc/config/arm/unknown-elf.h | 10 +- contrib/gcc/config/arm/vxarm.h | 6 +- contrib/gcc/config/arm/xscale-coff.h | 2 +- contrib/gcc/config/arm/xscale-elf.h | 2 +- contrib/gcc/config/darwin-c.c | 3 +- contrib/gcc/config/darwin-crt2.c | 151 + contrib/gcc/config/darwin-protos.h | 57 +- contrib/gcc/config/darwin.c | 297 +- contrib/gcc/config/darwin.h | 561 +- contrib/gcc/config/dbx.h | 4 +- contrib/gcc/config/dbxcoff.h | 5 +- contrib/gcc/config/dbxelf.h | 3 +- contrib/gcc/config/elfos.h | 264 +- contrib/gcc/config/fp-bit.c | 450 +- contrib/gcc/config/fp-bit.h | 176 +- contrib/gcc/config/freebsd-spec.h | 51 +- contrib/gcc/config/freebsd.h | 16 +- contrib/gcc/config/frv/cmovd.c | 47 + contrib/gcc/config/frv/cmovh.c | 43 + contrib/gcc/config/frv/cmovw.c | 47 + contrib/gcc/config/frv/frv-abi.h | 181 + contrib/gcc/config/frv/frv-asm.h | 49 + contrib/gcc/config/frv/frv-modes.def | 30 + contrib/gcc/config/frv/frv-protos.h | 247 + contrib/gcc/config/frv/frv.c | 9788 ++++++++++++ contrib/gcc/config/frv/frv.h | 3592 +++++ contrib/gcc/config/frv/frv.md | 7441 +++++++++ contrib/gcc/config/frv/frvbegin.c | 150 + contrib/gcc/config/frv/frvend.c | 63 + contrib/gcc/config/frv/lib1funcs.asm | 275 + contrib/gcc/config/frv/modi.c | 4 + contrib/gcc/config/frv/t-frv | 93 + contrib/gcc/config/frv/uitod.c | 4 + contrib/gcc/config/frv/uitof.c | 4 + contrib/gcc/config/frv/ulltod.c | 4 + contrib/gcc/config/frv/ulltof.c | 4 + contrib/gcc/config/frv/umodi.c | 4 + contrib/gcc/config/gnu.h | 1 + contrib/gcc/config/gofast.h | 22 +- contrib/gcc/config/i386/athlon.md | 206 + contrib/gcc/config/i386/att.h | 7 +- contrib/gcc/config/i386/beos-elf.h | 52 +- contrib/gcc/config/i386/biarch64.h | 4 +- contrib/gcc/config/i386/bsd.h | 26 +- contrib/gcc/config/i386/crtdll.h | 7 +- contrib/gcc/config/i386/cygwin.h | 162 +- contrib/gcc/config/i386/darwin.h | 120 + contrib/gcc/config/i386/djgpp.h | 67 +- contrib/gcc/config/i386/freebsd-aout.h | 134 +- contrib/gcc/config/i386/freebsd.h | 37 +- contrib/gcc/config/i386/freebsd64.h | 5 +- contrib/gcc/config/i386/gas.h | 44 +- contrib/gcc/config/i386/gnu.h | 27 +- contrib/gcc/config/i386/gstabs.h | 4 +- contrib/gcc/config/i386/gthr-win32.c | 174 + contrib/gcc/config/i386/i386-aout.h | 12 +- contrib/gcc/config/i386/i386-coff.h | 45 +- contrib/gcc/config/i386/i386-interix.h | 168 +- contrib/gcc/config/i386/i386-interix3.h | 10 +- contrib/gcc/config/i386/i386-modes.def | 46 + contrib/gcc/config/i386/i386-protos.h | 42 +- contrib/gcc/config/i386/i386.c | 4231 +++-- contrib/gcc/config/i386/i386.h | 1139 +- contrib/gcc/config/i386/i386.md | 5785 ++++--- contrib/gcc/config/i386/i386elf.h | 10 +- contrib/gcc/config/i386/k6.md | 136 + contrib/gcc/config/i386/linux-aout.h | 29 +- contrib/gcc/config/i386/linux.h | 49 +- contrib/gcc/config/i386/linux64.h | 41 +- contrib/gcc/config/i386/lynx-ng.h | 51 +- contrib/gcc/config/i386/lynx.h | 49 +- contrib/gcc/config/i386/mach.h | 17 +- contrib/gcc/config/i386/mingw32.h | 95 +- contrib/gcc/config/i386/mmintrin.h | 43 + contrib/gcc/config/i386/moss.h | 16 +- contrib/gcc/config/i386/netbsd-elf.h | 51 +- contrib/gcc/config/i386/netbsd.h | 32 +- contrib/gcc/config/i386/netbsd64.h | 59 +- contrib/gcc/config/i386/openbsd.h | 26 +- contrib/gcc/config/i386/pentium.md | 312 + contrib/gcc/config/i386/ppro.md | 150 + contrib/gcc/config/i386/ptx4-i.h | 17 +- contrib/gcc/config/i386/rtemself.h | 21 +- contrib/gcc/config/i386/sco5.h | 196 +- contrib/gcc/config/i386/sol2.h | 124 +- contrib/gcc/config/i386/svr3dbx.h | 8 +- contrib/gcc/config/i386/svr3gas.h | 75 +- contrib/gcc/config/i386/sysv3.h | 29 +- contrib/gcc/config/i386/sysv4-cpp.h | 32 + contrib/gcc/config/i386/sysv4.h | 12 +- contrib/gcc/config/i386/sysv5.h | 2 +- contrib/gcc/config/i386/t-cygwin | 2 +- contrib/gcc/config/i386/t-interix | 4 +- contrib/gcc/config/i386/t-linux64 | 6 + contrib/gcc/config/i386/t-mingw32 | 3 + contrib/gcc/config/i386/t-sco5gas | 2 +- contrib/gcc/config/i386/unix.h | 22 +- contrib/gcc/config/i386/uwin.h | 29 +- contrib/gcc/config/i386/vsta.h | 19 +- contrib/gcc/config/i386/vxi386.h | 52 +- contrib/gcc/config/i386/win32.h | 104 +- contrib/gcc/config/i386/winnt.c | 85 +- contrib/gcc/config/i386/x86-64.h | 15 +- contrib/gcc/config/i386/xm-vsta.h | 9 + contrib/gcc/config/i386/xmmintrin.h | 1519 +- contrib/gcc/config/ia64/aix.h | 151 +- contrib/gcc/config/ia64/crtbegin.asm | 15 +- contrib/gcc/config/ia64/crtend.asm | 12 +- contrib/gcc/config/ia64/elf.h | 6 - contrib/gcc/config/ia64/freebsd.h | 3 - contrib/gcc/config/ia64/hpux.h | 160 +- contrib/gcc/config/ia64/hpux_longdouble.h | 14 +- contrib/gcc/config/ia64/ia64-c.c | 191 + contrib/gcc/config/ia64/ia64-modes.def | 29 + contrib/gcc/config/ia64/ia64-protos.h | 22 +- contrib/gcc/config/ia64/ia64.c | 1427 +- contrib/gcc/config/ia64/ia64.h | 329 +- contrib/gcc/config/ia64/ia64.md | 1207 +- contrib/gcc/config/ia64/linux.h | 13 +- contrib/gcc/config/ia64/quadlib.c | 19 +- contrib/gcc/config/ia64/sysv4.h | 162 +- contrib/gcc/config/ia64/t-aix | 6 +- contrib/gcc/config/ia64/t-hpux | 33 + contrib/gcc/config/ia64/t-ia64 | 28 +- contrib/gcc/config/ia64/unwind-ia64.c | 27 +- contrib/gcc/config/interix.h | 9 +- contrib/gcc/config/libgloss.h | 2 +- contrib/gcc/config/linux-aout.h | 8 +- contrib/gcc/config/linux.h | 18 +- contrib/gcc/config/lynx-ng.h | 10 +- contrib/gcc/config/lynx.h | 34 +- contrib/gcc/config/netbsd-aout.h | 84 +- contrib/gcc/config/netbsd-elf.h | 59 +- contrib/gcc/config/netbsd.h | 154 +- contrib/gcc/config/openbsd-oldgas.h | 23 + contrib/gcc/config/openbsd.h | 67 +- contrib/gcc/config/psos.h | 6 +- contrib/gcc/config/ptx4.h | 31 +- contrib/gcc/config/rs6000/aix.h | 53 +- contrib/gcc/config/rs6000/aix31.h | 52 +- contrib/gcc/config/rs6000/aix41.h | 23 +- contrib/gcc/config/rs6000/aix43.h | 76 +- contrib/gcc/config/rs6000/aix51.h | 98 +- contrib/gcc/config/rs6000/aix52.h | 191 + contrib/gcc/config/rs6000/altivec.h | 16 +- contrib/gcc/config/rs6000/altivec.md | 1915 +++ contrib/gcc/config/rs6000/beos.h | 18 +- contrib/gcc/config/rs6000/darwin-tramp.asm | 2 +- contrib/gcc/config/rs6000/darwin.h | 66 +- contrib/gcc/config/rs6000/eabi.asm | 4 +- contrib/gcc/config/rs6000/eabi.h | 24 +- contrib/gcc/config/rs6000/eabiaix.h | 3 - contrib/gcc/config/rs6000/eabisim.h | 16 +- contrib/gcc/config/rs6000/eabispe.h | 51 + contrib/gcc/config/rs6000/freebsd.h | 11 +- contrib/gcc/config/rs6000/gnu.h | 2 +- contrib/gcc/config/rs6000/linux.h | 44 +- contrib/gcc/config/rs6000/linux64.h | 81 +- contrib/gcc/config/rs6000/lynx.h | 25 +- contrib/gcc/config/rs6000/mach.h | 15 +- contrib/gcc/config/rs6000/netbsd.h | 113 +- contrib/gcc/config/rs6000/ppc-asm.h | 39 - contrib/gcc/config/rs6000/ppc64-fp.c | 146 + contrib/gcc/config/rs6000/rs6000-c.c | 128 + contrib/gcc/config/rs6000/rs6000-modes.def | 31 + contrib/gcc/config/rs6000/rs6000-protos.h | 39 +- contrib/gcc/config/rs6000/rs6000.c | 4748 ++++-- contrib/gcc/config/rs6000/rs6000.h | 685 +- contrib/gcc/config/rs6000/rs6000.md | 4137 ++--- contrib/gcc/config/rs6000/rtems.h | 14 +- contrib/gcc/config/rs6000/spe.h | 1096 ++ contrib/gcc/config/rs6000/spe.md | 2488 +++ contrib/gcc/config/rs6000/sysv4.h | 333 +- contrib/gcc/config/rs6000/sysv4le.h | 3 - contrib/gcc/config/rs6000/t-aix43 | 19 +- contrib/gcc/config/rs6000/t-aix52 | 52 + contrib/gcc/config/rs6000/t-darwin | 33 +- contrib/gcc/config/rs6000/t-linux64 | 3 + contrib/gcc/config/rs6000/t-netbsd | 42 + contrib/gcc/config/rs6000/t-ppccomm | 1 + contrib/gcc/config/rs6000/t-ppcendian | 12 + contrib/gcc/config/rs6000/t-rs6000-c-rule | 4 + contrib/gcc/config/rs6000/vxppc.h | 23 +- contrib/gcc/config/rs6000/windiss.h | 47 + contrib/gcc/config/rs6000/xcoff.h | 179 +- contrib/gcc/config/s390/fixdfdi.h | 7 + contrib/gcc/config/s390/libgcc-glibc.ver | 20 + contrib/gcc/config/s390/linux.h | 302 +- contrib/gcc/config/s390/s390-modes.def | 38 + contrib/gcc/config/s390/s390-protos.h | 27 +- contrib/gcc/config/s390/s390.c | 3690 ++++- contrib/gcc/config/s390/s390.h | 1354 +- contrib/gcc/config/s390/s390.md | 3350 ++-- contrib/gcc/config/s390/t-crtstuff | 4 + contrib/gcc/config/s390/t-linux64 | 9 + contrib/gcc/config/sol2.h | 207 + contrib/gcc/config/sparc/aout.h | 34 +- contrib/gcc/config/sparc/cypress.md | 51 + contrib/gcc/config/sparc/freebsd.h | 14 +- contrib/gcc/config/sparc/gmon-sol2.c | 4 +- contrib/gcc/config/sparc/hypersparc.md | 83 + contrib/gcc/config/sparc/lb1spc.asm | 8 +- contrib/gcc/config/sparc/lb1spl.asm | 2 +- contrib/gcc/config/sparc/linux-aout.h | 2 +- contrib/gcc/config/sparc/linux.h | 10 +- contrib/gcc/config/sparc/linux64.h | 24 +- contrib/gcc/config/sparc/litecoff.h | 14 +- contrib/gcc/config/sparc/liteelf.h | 6 +- contrib/gcc/config/sparc/lynx.h | 3 +- contrib/gcc/config/sparc/netbsd-elf.h | 120 +- contrib/gcc/config/sparc/netbsd.h | 27 +- contrib/gcc/config/sparc/openbsd.h | 6 +- contrib/gcc/config/sparc/pbd.h | 6 +- contrib/gcc/config/sparc/sol2-bi.h | 81 +- contrib/gcc/config/sparc/sol2.h | 177 +- contrib/gcc/config/sparc/sol26-sld.h | 6 + contrib/gcc/config/sparc/sp64-elf.h | 2 +- contrib/gcc/config/sparc/sp86x-elf.h | 6 +- contrib/gcc/config/sparc/sparc-modes.def | 42 + contrib/gcc/config/sparc/sparc-protos.h | 6 +- contrib/gcc/config/sparc/sparc.c | 1564 +- contrib/gcc/config/sparc/sparc.h | 407 +- contrib/gcc/config/sparc/sparc.md | 3030 ++-- contrib/gcc/config/sparc/sparclet.md | 44 + contrib/gcc/config/sparc/sunos4.h | 2 + contrib/gcc/config/sparc/supersparc.md | 93 + contrib/gcc/config/sparc/sysv4.h | 34 +- contrib/gcc/config/sparc/ultra1_2.md | 252 + contrib/gcc/config/sparc/ultra3.md | 169 + contrib/gcc/config/sparc/vxsim.h | 4 +- contrib/gcc/config/sparc/vxsparc64.h | 4 +- contrib/gcc/config/svr3.h | 81 +- contrib/gcc/config/svr4.h | 27 +- contrib/gcc/config/t-darwin | 22 + contrib/gcc/config/t-libc-ok | 2 +- contrib/gcc/config/t-linux | 4 +- contrib/gcc/config/t-linux-gnulibc1 | 2 +- contrib/gcc/config/t-netbsd | 3 + contrib/gcc/configure | 3077 ++-- contrib/gcc/configure.in | 777 +- contrib/gcc/conflict.c | 17 +- contrib/gcc/convert.c | 57 +- contrib/gcc/cp-demangle.c | 54 +- contrib/gcc/cp/ChangeLog | 4233 ++++- contrib/gcc/cp/ChangeLog.1 | 4 +- contrib/gcc/cp/ChangeLog.2 | 4 +- contrib/gcc/cp/Make-lang.in | 82 +- contrib/gcc/cp/NEWS | 4 +- contrib/gcc/cp/call.c | 1810 ++- contrib/gcc/cp/cfns.gperf | 108 +- contrib/gcc/cp/class.c | 2197 +-- contrib/gcc/cp/config-lang.in | 2 + contrib/gcc/cp/cp-lang.c | 207 +- contrib/gcc/cp/cp-tree.def | 66 +- contrib/gcc/cp/cp-tree.h | 1318 +- contrib/gcc/cp/cvt.c | 159 +- contrib/gcc/cp/decl.c | 3710 +++-- contrib/gcc/cp/decl.h | 8 +- contrib/gcc/cp/decl2.c | 1862 +-- contrib/gcc/cp/dump.c | 30 +- contrib/gcc/cp/error.c | 290 +- contrib/gcc/cp/except.c | 173 +- contrib/gcc/cp/expr.c | 27 +- contrib/gcc/cp/friend.c | 50 +- contrib/gcc/cp/g++spec.c | 29 +- contrib/gcc/cp/init.c | 1259 +- contrib/gcc/cp/lang-options.h | 4 +- contrib/gcc/cp/lang-specs.h | 25 +- contrib/gcc/cp/lex.c | 294 +- contrib/gcc/cp/lex.h | 6 +- contrib/gcc/cp/mangle.c | 424 +- contrib/gcc/cp/method.c | 245 +- contrib/gcc/cp/operators.def | 4 +- contrib/gcc/cp/optimize.c | 34 +- contrib/gcc/cp/parse.y | 953 +- contrib/gcc/cp/pt.c | 1222 +- contrib/gcc/cp/ptree.c | 18 +- contrib/gcc/cp/repo.c | 25 +- contrib/gcc/cp/rtti.c | 87 +- contrib/gcc/cp/search.c | 635 +- contrib/gcc/cp/semantics.c | 512 +- contrib/gcc/cp/spew.c | 530 +- contrib/gcc/cp/tree.c | 341 +- contrib/gcc/cp/typeck.c | 1838 +-- contrib/gcc/cp/typeck2.c | 280 +- contrib/gcc/cplus-dem.c | 367 +- contrib/gcc/cppdefault.h | 42 - contrib/gcc/cpperror.c | 250 +- contrib/gcc/cppexp.c | 2038 ++- contrib/gcc/cppfiles.c | 178 +- contrib/gcc/cpphash.c | 3 +- contrib/gcc/cpphash.h | 247 +- contrib/gcc/cppinit.c | 1109 +- contrib/gcc/cpplex.c | 778 +- contrib/gcc/cpplib.c | 432 +- contrib/gcc/cpplib.h | 295 +- contrib/gcc/cppmacro.c | 761 +- contrib/gcc/cppmain.c | 360 +- contrib/gcc/cppspec.c | 36 +- contrib/gcc/cpptrad.c | 1216 ++ contrib/gcc/crtstuff.c | 85 +- contrib/gcc/cse.c | 378 +- contrib/gcc/cselib.c | 98 +- contrib/gcc/cselib.h | 16 +- contrib/gcc/dbxout.c | 103 +- contrib/gcc/debug.c | 6 +- contrib/gcc/debug.h | 30 +- contrib/gcc/defaults.h | 237 +- contrib/gcc/demangle.h | 12 +- contrib/gcc/df.c | 542 +- contrib/gcc/df.h | 13 +- contrib/gcc/diagnostic.c | 1207 +- contrib/gcc/diagnostic.def | 16 +- contrib/gcc/diagnostic.h | 261 +- contrib/gcc/doc/bugreport.texi | 322 +- contrib/gcc/doc/c-tree.texi | 47 +- contrib/gcc/doc/collect2.texi | 2 +- contrib/gcc/doc/compat.texi | 4 +- contrib/gcc/doc/contrib.texi | 200 +- contrib/gcc/doc/cpp.texi | 588 +- contrib/gcc/doc/cppenv.texi | 24 +- contrib/gcc/doc/cppopts.texi | 114 +- contrib/gcc/doc/extend.texi | 1055 +- contrib/gcc/doc/frontends.texi | 7 +- contrib/gcc/doc/gcc.texi | 65 +- contrib/gcc/doc/gccint.texi | 58 +- contrib/gcc/doc/gcov.texi | 268 +- contrib/gcc/doc/gty.texi | 328 + contrib/gcc/doc/headerdirs.texi | 2 +- contrib/gcc/doc/include/fdl.texi | 223 +- contrib/gcc/doc/include/gcc-common.texi | 7 +- contrib/gcc/doc/include/gpl.texi | 9 +- contrib/gcc/doc/include/texinfo.tex | 859 +- contrib/gcc/doc/interface.texi | 2 +- contrib/gcc/doc/invoke.texi | 2962 ++-- contrib/gcc/doc/makefile.texi | 14 +- contrib/gcc/doc/md.texi | 933 +- contrib/gcc/doc/objc.texi | 40 +- contrib/gcc/doc/passes.texi | 42 +- contrib/gcc/doc/rtl.texi | 213 +- contrib/gcc/doc/service.texi | 8 +- contrib/gcc/doc/sourcebuild.texi | 354 +- contrib/gcc/doc/standards.texi | 19 +- contrib/gcc/doc/tm.texi | 1456 +- contrib/gcc/doc/trouble.texi | 169 +- contrib/gcc/doloop.c | 69 +- contrib/gcc/dominance.c | 372 +- contrib/gcc/doschk.c | 6 +- contrib/gcc/dummy-conditions.c | 34 + contrib/gcc/dwarf2.h | 6 +- contrib/gcc/dwarf2asm.c | 19 +- contrib/gcc/dwarf2asm.h | 28 +- contrib/gcc/dwarf2out.c | 944 +- contrib/gcc/dwarf2out.h | 2 - contrib/gcc/dwarfout.c | 237 +- contrib/gcc/emit-rtl.c | 1818 ++- contrib/gcc/errors.h | 2 +- contrib/gcc/et-forest.c | 680 + contrib/gcc/et-forest.h | 83 + contrib/gcc/except.c | 746 +- contrib/gcc/except.h | 25 +- contrib/gcc/explow.c | 132 +- contrib/gcc/expmed.c | 190 +- contrib/gcc/expr.c | 2040 ++- contrib/gcc/expr.h | 50 +- contrib/gcc/f/ChangeLog | 552 +- contrib/gcc/f/ChangeLog.0 | 4 +- contrib/gcc/f/Make-lang.in | 54 +- contrib/gcc/f/bad.c | 7 +- contrib/gcc/f/bit.c | 1 - contrib/gcc/f/bld.c | 1 + contrib/gcc/f/bugs.texi | 7 +- contrib/gcc/f/com.c | 680 +- contrib/gcc/f/com.h | 54 +- contrib/gcc/f/config-lang.in | 4 +- contrib/gcc/f/data.c | 31 +- contrib/gcc/f/expr.c | 19 + contrib/gcc/f/ffe.texi | 4 +- contrib/gcc/f/g77.texi | 486 +- contrib/gcc/f/g77spec.c | 36 +- contrib/gcc/f/intdoc.in | 75 +- contrib/gcc/f/intdoc.texi | 73 +- contrib/gcc/f/invoke.texi | 28 +- contrib/gcc/f/lang-specs.h | 9 +- contrib/gcc/f/lex.c | 50 +- contrib/gcc/f/news.texi | 74 +- contrib/gcc/f/parse.c | 11 +- contrib/gcc/f/root.texi | 9 +- contrib/gcc/f/stc.c | 15 +- contrib/gcc/f/std.c | 6 +- contrib/gcc/f/ste.c | 48 +- contrib/gcc/f/target.c | 20 +- contrib/gcc/f/target.h | 349 +- contrib/gcc/f/top.c | 1 - contrib/gcc/f/where.c | 134 +- contrib/gcc/f/where.h | 6 +- contrib/gcc/fibheap.c | 2 +- contrib/gcc/fibheap.h | 4 +- contrib/gcc/final.c | 544 +- contrib/gcc/fix-header.c | 29 +- contrib/gcc/fixproto | 4 +- contrib/gcc/flags.h | 91 +- contrib/gcc/flow.c | 373 +- contrib/gcc/fold-const.c | 1788 +-- contrib/gcc/function.c | 799 +- contrib/gcc/function.h | 110 +- contrib/gcc/gbl-ctors.h | 9 +- contrib/gcc/gcc.c | 970 +- contrib/gcc/gcc.h | 33 + contrib/gcc/gccbug.in | 2 +- contrib/gcc/gccspec.c | 8 +- contrib/gcc/gcov-io.h | 133 +- contrib/gcc/gcov.c | 1370 +- contrib/gcc/gcse.c | 2041 ++- contrib/gcc/gdbinit.in | 13 +- contrib/gcc/genattr.c | 141 +- contrib/gcc/genattrtab.c | 263 +- contrib/gcc/genattrtab.h | 43 + contrib/gcc/genautomata.c | 9742 ++++++++++++ contrib/gcc/gencodes.c | 24 +- contrib/gcc/genconditions.c | 240 + contrib/gcc/genconfig.c | 4 +- contrib/gcc/genemit.c | 67 +- contrib/gcc/genflags.c | 67 +- contrib/gcc/gengenrtl.c | 114 +- contrib/gcc/gengtype-lex.l | 328 + contrib/gcc/gengtype-yacc.y | 300 + contrib/gcc/gengtype.c | 2625 +++ contrib/gcc/gengtype.h | 181 + contrib/gcc/genopinit.c | 2 + contrib/gcc/genpreds.c | 2 +- contrib/gcc/genrecog.c | 44 +- contrib/gcc/gensupport.c | 409 +- contrib/gcc/gensupport.h | 42 +- contrib/gcc/getopt.c | 6 +- contrib/gcc/getopt.h | 19 +- contrib/gcc/getruntime.c | 116 + contrib/gcc/ggc-common.c | 716 +- contrib/gcc/ggc-none.c | 15 + contrib/gcc/ggc-page.c | 521 +- contrib/gcc/ggc-simple.c | 46 +- contrib/gcc/ggc.h | 159 +- contrib/gcc/ginclude/float.h | 162 + contrib/gcc/ginclude/stdarg.h | 15 +- contrib/gcc/ginclude/varargs.h | 141 +- contrib/gcc/glimits.h | 98 +- contrib/gcc/global.c | 133 +- contrib/gcc/graph.c | 9 +- contrib/gcc/graph.h | 2 +- contrib/gcc/gthr-dce.h | 104 +- contrib/gcc/gthr-posix.h | 212 +- contrib/gcc/gthr-rtems.h | 2 +- contrib/gcc/gthr-single.h | 46 +- contrib/gcc/gthr-solaris.h | 101 +- contrib/gcc/gthr-vxworks.h | 58 +- contrib/gcc/gthr-win32.h | 263 +- contrib/gcc/gthr.h | 2 +- contrib/gcc/haifa-sched.c | 813 +- contrib/gcc/hard-reg-set.h | 15 +- contrib/gcc/hashtab.c | 88 +- contrib/gcc/hashtab.h | 41 +- contrib/gcc/hashtable.c | 8 +- contrib/gcc/hashtable.h | 7 +- contrib/gcc/hex.c | 81 +- contrib/gcc/hooks.c | 81 +- contrib/gcc/hooks.h | 19 +- contrib/gcc/hwint.h | 15 +- contrib/gcc/ifcvt.c | 973 +- contrib/gcc/input.h | 1 - contrib/gcc/insn-addr.h | 4 +- contrib/gcc/integrate.c | 171 +- contrib/gcc/integrate.h | 2 - contrib/gcc/jump.c | 92 +- contrib/gcc/langhooks-def.h | 123 +- contrib/gcc/langhooks.c | 189 +- contrib/gcc/langhooks.h | 219 +- contrib/gcc/lbasename.c | 16 +- contrib/gcc/lcm.c | 470 +- contrib/gcc/libfuncs.h | 2 +- contrib/gcc/libgcc-std.ver | 9 + contrib/gcc/libgcc2.c | 593 +- contrib/gcc/libgcc2.h | 19 +- contrib/gcc/libiberty.h | 20 +- contrib/gcc/line-map.h | 2 +- contrib/gcc/lists.c | 37 +- contrib/gcc/local-alloc.c | 93 +- contrib/gcc/location.h | 38 + contrib/gcc/longlong.h | 413 +- contrib/gcc/loop.c | 815 +- contrib/gcc/loop.h | 16 +- contrib/gcc/machmode.def | 21 +- contrib/gcc/machmode.h | 9 + contrib/gcc/mbchar.c | 4 +- contrib/gcc/md5.c | 114 +- contrib/gcc/mkconfig.sh | 16 +- contrib/gcc/mkheaders.in | 101 + contrib/gcc/mklibgcc.in | 23 +- contrib/gcc/mkmap-symver.awk | 14 +- contrib/gcc/objc/Make-lang.in | 13 +- contrib/gcc/objc/config-lang.in | 2 + contrib/gcc/objc/lang-specs.h | 14 +- contrib/gcc/objc/objc-act.c | 865 +- contrib/gcc/objc/objc-act.h | 21 +- contrib/gcc/objc/objc-lang.c | 100 +- contrib/gcc/optabs.c | 795 +- contrib/gcc/optabs.h | 15 +- contrib/gcc/output.h | 82 +- contrib/gcc/params.c | 9 +- contrib/gcc/params.def | 168 +- contrib/gcc/params.h | 18 +- contrib/gcc/partition.h | 8 +- contrib/gcc/physmem.c | 305 + contrib/gcc/predict.c | 804 +- contrib/gcc/predict.def | 19 +- contrib/gcc/predict.h | 3 + contrib/gcc/prefix.c | 76 +- contrib/gcc/pretty-print.h | 100 + contrib/gcc/print-rtl.c | 109 +- contrib/gcc/print-tree.c | 68 +- contrib/gcc/profile.c | 477 +- contrib/gcc/profile.h | 54 + contrib/gcc/protoize.c | 1548 +- contrib/gcc/ra-build.c | 3274 ++++ contrib/gcc/ra-colorize.c | 2742 ++++ contrib/gcc/ra-debug.c | 1120 ++ contrib/gcc/ra-rewrite.c | 1987 +++ contrib/gcc/ra.c | 899 ++ contrib/gcc/ra.h | 624 + contrib/gcc/read-rtl.c | 23 +- contrib/gcc/real.c | 9798 +++++------- contrib/gcc/real.h | 680 +- contrib/gcc/recog.c | 376 +- contrib/gcc/recog.h | 5 + contrib/gcc/reg-stack.c | 179 +- contrib/gcc/regclass.c | 368 +- contrib/gcc/regmove.c | 71 +- contrib/gcc/regrename.c | 198 +- contrib/gcc/regs.h | 11 +- contrib/gcc/reload.c | 346 +- contrib/gcc/reload.h | 4 +- contrib/gcc/reload1.c | 356 +- contrib/gcc/reorg.c | 64 +- contrib/gcc/resource.c | 69 +- contrib/gcc/rtl-error.c | 23 +- contrib/gcc/rtl.c | 141 +- contrib/gcc/rtl.def | 209 +- contrib/gcc/rtl.h | 731 +- contrib/gcc/rtlanal.c | 591 +- contrib/gcc/sbitmap.c | 388 +- contrib/gcc/sbitmap.h | 55 +- contrib/gcc/scan-decls.c | 4 +- contrib/gcc/scan.c | 4 +- contrib/gcc/sched-deps.c | 49 +- contrib/gcc/sched-ebb.c | 35 +- contrib/gcc/sched-int.h | 12 +- contrib/gcc/sched-rgn.c | 307 +- contrib/gcc/sched-vis.c | 44 +- contrib/gcc/sdbout.c | 71 +- contrib/gcc/sibcall.c | 52 +- contrib/gcc/simplify-rtx.c | 777 +- contrib/gcc/splay-tree.c | 6 +- contrib/gcc/splay-tree.h | 4 +- contrib/gcc/ssa-ccp.c | 76 +- contrib/gcc/ssa-dce.c | 55 +- contrib/gcc/ssa.c | 344 +- contrib/gcc/ssa.h | 5 +- contrib/gcc/stab.def | 10 +- contrib/gcc/stmt.c | 816 +- contrib/gcc/stor-layout.c | 540 +- contrib/gcc/stringpool.c | 4 +- contrib/gcc/system.h | 45 +- contrib/gcc/target-def.h | 126 +- contrib/gcc/target.h | 130 +- contrib/gcc/timevar.c | 45 +- contrib/gcc/timevar.def | 5 + contrib/gcc/timevar.h | 9 +- contrib/gcc/tlink.c | 242 +- contrib/gcc/toplev.c | 1430 +- contrib/gcc/toplev.h | 17 +- contrib/gcc/tracer.c | 378 + contrib/gcc/tree-dump.c | 204 +- contrib/gcc/tree-dump.h | 16 +- contrib/gcc/tree-inline.c | 579 +- contrib/gcc/tree-inline.h | 4 +- contrib/gcc/tree.c | 687 +- contrib/gcc/tree.def | 33 +- contrib/gcc/tree.h | 475 +- contrib/gcc/tsystem.h | 11 +- contrib/gcc/unroll.c | 534 +- contrib/gcc/unwind-c.c | 186 + contrib/gcc/unwind-dw2-fde-darwin.c | 241 + contrib/gcc/unwind-dw2-fde-glibc.c | 8 +- contrib/gcc/unwind-dw2-fde.c | 123 +- contrib/gcc/unwind-dw2-fde.h | 18 +- contrib/gcc/unwind-dw2.c | 243 +- contrib/gcc/unwind-pe.h | 16 +- contrib/gcc/unwind-sjlj.c | 24 +- contrib/gcc/unwind.h | 40 +- contrib/gcc/unwind.inc | 72 +- contrib/gcc/varasm.c | 2172 +-- contrib/gcc/varray.c | 72 +- contrib/gcc/varray.h | 167 +- contrib/gcc/version.c | 16 +- contrib/gcc/version.h | 3 +- contrib/gcc/vmsdbg.h | 4 +- contrib/gcc/vmsdbgout.c | 222 +- contrib/gcc/xcoffout.c | 5 +- contrib/gcc/xcoffout.h | 29 +- contrib/gcc/xmemdup.c | 38 + 726 files changed, 202576 insertions(+), 86656 deletions(-) create mode 100644 contrib/gcc/ChangeLog.7 create mode 100644 contrib/gcc/c-config-lang.in create mode 100644 contrib/gcc/c-dump.c create mode 100644 contrib/gcc/c-opts.c create mode 100644 contrib/gcc/c-pretty-print.c create mode 100644 contrib/gcc/c-pretty-print.h create mode 100644 contrib/gcc/config/alpha/ev4.md create mode 100644 contrib/gcc/config/alpha/ev5.md create mode 100644 contrib/gcc/config/alpha/ev6.md create mode 100644 contrib/gcc/config/alpha/gnu.h create mode 100644 contrib/gcc/config/arm/arm-modes.def create mode 100644 contrib/gcc/config/arm/netbsd-elf.h create mode 100644 contrib/gcc/config/darwin-crt2.c create mode 100644 contrib/gcc/config/frv/cmovd.c create mode 100644 contrib/gcc/config/frv/cmovh.c create mode 100644 contrib/gcc/config/frv/cmovw.c create mode 100644 contrib/gcc/config/frv/frv-abi.h create mode 100644 contrib/gcc/config/frv/frv-asm.h create mode 100644 contrib/gcc/config/frv/frv-modes.def create mode 100644 contrib/gcc/config/frv/frv-protos.h create mode 100644 contrib/gcc/config/frv/frv.c create mode 100644 contrib/gcc/config/frv/frv.h create mode 100644 contrib/gcc/config/frv/frv.md create mode 100644 contrib/gcc/config/frv/frvbegin.c create mode 100644 contrib/gcc/config/frv/frvend.c create mode 100644 contrib/gcc/config/frv/lib1funcs.asm create mode 100644 contrib/gcc/config/frv/modi.c create mode 100644 contrib/gcc/config/frv/t-frv create mode 100644 contrib/gcc/config/frv/uitod.c create mode 100644 contrib/gcc/config/frv/uitof.c create mode 100644 contrib/gcc/config/frv/ulltod.c create mode 100644 contrib/gcc/config/frv/ulltof.c create mode 100644 contrib/gcc/config/frv/umodi.c create mode 100644 contrib/gcc/config/i386/athlon.md create mode 100644 contrib/gcc/config/i386/darwin.h create mode 100644 contrib/gcc/config/i386/gthr-win32.c create mode 100644 contrib/gcc/config/i386/i386-modes.def create mode 100644 contrib/gcc/config/i386/k6.md create mode 100644 contrib/gcc/config/i386/pentium.md create mode 100644 contrib/gcc/config/i386/ppro.md create mode 100644 contrib/gcc/config/i386/sysv4-cpp.h create mode 100644 contrib/gcc/config/ia64/ia64-c.c create mode 100644 contrib/gcc/config/ia64/ia64-modes.def create mode 100644 contrib/gcc/config/openbsd-oldgas.h create mode 100644 contrib/gcc/config/rs6000/aix52.h create mode 100644 contrib/gcc/config/rs6000/altivec.md create mode 100644 contrib/gcc/config/rs6000/eabispe.h create mode 100644 contrib/gcc/config/rs6000/ppc64-fp.c create mode 100644 contrib/gcc/config/rs6000/rs6000-c.c create mode 100644 contrib/gcc/config/rs6000/rs6000-modes.def create mode 100644 contrib/gcc/config/rs6000/spe.h create mode 100644 contrib/gcc/config/rs6000/spe.md create mode 100644 contrib/gcc/config/rs6000/t-aix52 create mode 100644 contrib/gcc/config/rs6000/t-netbsd create mode 100644 contrib/gcc/config/rs6000/t-ppcendian create mode 100644 contrib/gcc/config/rs6000/t-rs6000-c-rule create mode 100644 contrib/gcc/config/rs6000/windiss.h create mode 100644 contrib/gcc/config/s390/s390-modes.def create mode 100644 contrib/gcc/config/s390/t-crtstuff create mode 100644 contrib/gcc/config/sol2.h create mode 100644 contrib/gcc/config/sparc/cypress.md create mode 100644 contrib/gcc/config/sparc/hypersparc.md create mode 100644 contrib/gcc/config/sparc/sol26-sld.h create mode 100644 contrib/gcc/config/sparc/sparc-modes.def create mode 100644 contrib/gcc/config/sparc/sparclet.md create mode 100644 contrib/gcc/config/sparc/supersparc.md create mode 100644 contrib/gcc/config/sparc/ultra1_2.md create mode 100644 contrib/gcc/config/sparc/ultra3.md create mode 100644 contrib/gcc/config/t-darwin create mode 100644 contrib/gcc/cpptrad.c create mode 100644 contrib/gcc/doc/gty.texi create mode 100644 contrib/gcc/dummy-conditions.c create mode 100644 contrib/gcc/et-forest.c create mode 100644 contrib/gcc/et-forest.h create mode 100644 contrib/gcc/genattrtab.h create mode 100644 contrib/gcc/genautomata.c create mode 100644 contrib/gcc/genconditions.c create mode 100644 contrib/gcc/gengtype-lex.l create mode 100644 contrib/gcc/gengtype-yacc.y create mode 100644 contrib/gcc/gengtype.c create mode 100644 contrib/gcc/gengtype.h create mode 100644 contrib/gcc/getruntime.c create mode 100644 contrib/gcc/ginclude/float.h create mode 100644 contrib/gcc/location.h create mode 100644 contrib/gcc/mkheaders.in create mode 100644 contrib/gcc/physmem.c create mode 100644 contrib/gcc/pretty-print.h create mode 100644 contrib/gcc/profile.h create mode 100644 contrib/gcc/ra-build.c create mode 100644 contrib/gcc/ra-colorize.c create mode 100644 contrib/gcc/ra-debug.c create mode 100644 contrib/gcc/ra-rewrite.c create mode 100644 contrib/gcc/ra.c create mode 100644 contrib/gcc/ra.h create mode 100644 contrib/gcc/tracer.c create mode 100644 contrib/gcc/unwind-c.c create mode 100644 contrib/gcc/unwind-dw2-fde-darwin.c create mode 100644 contrib/gcc/xmemdup.c (limited to 'contrib/gcc') diff --git a/contrib/gcc/ChangeLog b/contrib/gcc/ChangeLog index c8f8970..c6496ff 100644 --- a/contrib/gcc/ChangeLog +++ b/contrib/gcc/ChangeLog @@ -1,12039 +1,16664 @@ -2003-02-05 Release Manager +2003-07-09 Mark Mitchell - * GCC 3.2.2 Released. + PR c++/10032 + * doc/invoke.texi (C++ Dialect Options): Change documentation of + -fpermissive. -2003-02-03 Chris Lingard - Dan Osterrath +2003-07-10 Matt Kraai - * configure.in: Handle binutils versions with 4 dot separated - numbers. - * configure: Rebuilt. + * doc/invoke.texi: Fix misspelling of "@item". -2003-02-03 Franz Sirl +2003-07-09 Hans-Peter Nilsson - Backport following patch: + * doc/install.texi (Configuration): Document the valgrind option + to --enable-checking. - 2002-08-01 Richard Henderson +2003-07-08 John David Anglin - * integrate.c (copy_rtx_and_substitute): Squash MEM_EXPR when it - refers to a subroutine parameter. + PR Target/11453 + * pa.md: Disparage all mtsar constraints. + (extzv, extv, insv): Don't fail on length of {32|64}. -2003-02-03 Eric Botcazou +2003-07-08 James E Wilson - PR ice-on-legal-code/9493 - * cfgcleanup.c (try_forward_edges): Check for null insn. + PR target/10021 + * emit-rtl.c (set_mem_attribute_minus_bitpos): When handle ARRAY_REF, + loop over new variable t2 instead of t. -2003-02-03 Franz Sirl - Eric Botcazou +2003-07-08 Stephane Carrez - PR wrong-code/9492 - Backport following patches: + * config/m68hc11/m68hc11.h (HAVE_AS_DWARF2_DEBUG_LINE): Don't define + as .file/.loc directives are incompatible with linker relaxation. - 2002-09-16 Richard Henderson +2003-07-08 Jakub Jelinek - * emit-rtl.c (set_mem_attributes_minus_bitpos): Adjust SIZE - as well as OFFSET for BITPOS. + PR c/11420 + * config/i386/i386.c (ix86_check_movabs): New function. + * config/i386/i386-protos.h (ix86_check_movabs): New prototype. + * config/i386/i386.md (movabs[shqd]i_1_rex64): Kill broken alternative. + (movabs[shqd]i_[12]_rex64): Add ix86_check_movabs check to conditions. - 2002-09-08 Jan Hubicka + * config/i386/i386.md (movdi_1_rex64): Set Y<-m alternative's type + to ssemov. - * emit-rtl.c (set_mem_attributes_minus_bitpos): Fix array_ref - handling. +2003-07-08 Jakub Jelinek - 2002-07-29 Richard Henderson + * unroll.c (reg_dead_after_loop): Check for reg in REG_EQUAL and + REG_EQUIV notes as well. - * 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. +2003-07-07 Dale Johannesen - 2002-07-25 Richard Henderson + PR 10900 + * config/rs6000/darwin-tramp.asm: Fix trampolines. - * emit-rtl.c (set_mem_attributes): Fix size and alignment thinkos - in ARRAY_REF of DECL_P case. +2003-07-07 Andrew Pinski - 2002-07-21 Richard Henderson + PR optimization/11368 + * doc/invoke.texi (-falign-functions): Document that + when n is zero then a machine-dependent default is used. + (-falign-labels): Document that when n is zero then a + machine-dependent default is used and that -falign-labels =1 + is equivalent to -fno-align-labels. + (-falign-loops): Likewise. + (-falign-jumps): Likewise. - * 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. +2003-07-07 Richard Kenner + Eric Botcazou - 2002-06-03 Dan Nicolaescu + PR optimization/11198 + * alias.c (objects_must_conflict_p): Return 1 if the types have + the same alias set, not if the alias sets only conflict. - * alias.c (nonoverlapping_memrefs_p): Fix off by one error. +2003-07-06 Matthias Klose -2003-02-03 Steve Ellcey + Backport from mainline: - * config/pa/pa64-hpux.h (INIT_ENVIRONMENT): New. + 2003-07-04 Zack Weinberg -2003-02-01 Jakub Jelinek + * doc/extend.texi: Delete entire section on multiline strings. - PR preprocessor/9465 - * tradcpp.c (fixup_newlines): Use memchr instead of strchr. +2003-07-04 H.J. Lu -2003-01-31 John David Anglin + * Makefile.in: Replace PWD with PWD_COMMAND. - * 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-07-03 Eric Botcazou -2003-01-31 Jan Hubicka + PR optimization/11304 + Backport from mainline: - PR c/9506 - * i386.c (override_options): Use DEFAULT_PCC_STRUCT_RETURN. + 2003-04-18 Richard Kenner -2003-01-30 Andreas Schwab + * cfgcleanup.c (flow_find_cross_jump): Use INSN_P, not active_insn_p. - * 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-07-03 Roger Sayle -2003-01-30 Ralf Corsepius + PR target/10700 + * fold-const.c (extract_muldiv_1): There's nothing that can be done + if the expression is a SAVE_EXPR. - 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-07-03 Eric Botcazou -2003-01-29 Joel Sherrill + PR optimization/11381 + * simplify-rtx.c (simplify_relational_operation): Check that + two equal operands have no side-effects before simplifying + the comparison. - PR bootstrap/9296 - * gthr-rtems.h: Define __GTHREAD_MUTEX_INIT. Apparently no code - depended on it being defined until now. +2003-07-01 Zack Weinberg -2003-01-29 Joel Sherrill + PR 2873 + * fixinc/inclhack.def (avoid_wchar_t_type): Add bypass + expressions to prevent triggering on recent curses.h, + linux/nls.h, or X11/Xlib.h. + (stdio_va_list): Add _G_va_list to bypass pattern. + (strict_ansi_not): Add bypass pattern for __SCO_VERSION__. + * fixinc/fixincl.x: Regenerate. - PR target/9295 - * config/mips/rtems.h: Predefine __USE_INIT_FINI__ so generic - RTEMS code knows which C++ initialization style the toolset - configuration is using. +2003-07-02 Rainer Orth -2003-01-29 Joel Sherrill + * fixinc/inclhack.def (irix_stdio_va_list): Apply to IRIX 6.5 + too. + (stdio_va_list): Apply to IRIX 6.5 and + too. + Substitute va_list uses in inline definition. + * fixinc/fixincl.x: Regenerate. - PR bootstrap/9293 - * config/m68k/t-crtstuff: Replace spaces with tabs, add - $(MULTILIB_CFLAGS) as compiler option and multilib crtbegin/end.o. +2003-07-01 Richard Henderson + (blame to: Loren James Rittle ) -2003-01-29 Joel Sherrill + * real.h (ieee_extended_intel_96_round_53_format): New. + * real.c (ieee_extended_intel_96_round_53_format): New. + * config/i386/freebsd.h (SUBTARGET_OVERRIDE_OPTIONS): Use it + for XFmode and TFmode. - PR bootstrap/9292 - * config.gcc (hppa1.1-rtems): Did not include t-rtems nor enable - RTEMS threads. - * config/pa/rtems.h (LIB_SPEC): Use -N when linking. +2003-07-01 Kazu Hirata -2003-01-28 Christian Cornelssen + * doc/contrib.texi: Fix typos. + * doc/sourcebuild.texi: Likewise. - * doc/install.texi: Add documentation for installation into - tooldirs and with DESTDIR. +2003-06-29 Aaron W. LaFramboise - * 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. - (install-libgcc, install-multilib): Also pass DESTDIR. - * mklibgcc.in: Prepend $(DESTDIR) to $(libsubdir) in the - installation destination variable ldir. - * 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. + * config/i386/gthr-win32.h (__GTHREAD_HIDE_WIN32API): Define to 1. -2003-01-28 Gerald Pfeifer - Backport patches - - 2002-10-04 Loren J. Rittle +2003-06-27 Gunther Nikl - * gcc/ginclude/stddef.h: Support the FreeBSD 5 typedef system. + PR target/11014 + * config/m68k/m68k.c (m68k_output_mi_thunk): Use correct assembly + syntax for MIT / MOTOROLA. - 2002-08-01 Stan Shebs - Andreas Tobler +2003-06-27 Ulrich Weigand - * 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. + * config/s390/s390.h (SECONDARY_OUTPUT_RELOAD_CLASS): Define. + * config/s390/s390.c (s390_secondary_output_reload_class): New function. + * config/s390/s390-protos.h (s390_secondary_output_reload_class): + Declare it. + * config/s390/s390.md ("reload_outti", "reload_outdi", + "reload_outdf"): New expanders. -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 + * config/s390/s390.md ("movti" + splitters): Handle non-offsettable + memory operands as source. + ("movdi" + splitters): Likewise. + ("movdf" + splitters): Likewise. + * config/s390/s390.c (s390_split_ok_p): New function. + * config/s390/s390-protos.h (s390_split_ok_p): Declare it. - * combine.c (nonzero_bits): Revert 2003-01-25 change. - (num_sign_bit_copies): Likewise. +2003-06-27 Rainer Orth -2003-01-27 Volker Reichelt + * config/mips/mips.md (trap): Use break 0 when !TARGET_GAS. - * doc/passes.texi: Fix typo. + * config/mips/iris6-o32.h (MIPS_ISA_DEFAULT): Remove. + (MIPS_CPU_STRING_DEFAULT): Redefine to mips2. -2003-01-25 Bruce Korb + * config/mips/mips.c (TARGET_ASM_UNALIGNED_DI_OP) [TARGET_IRIX5 && + !TARGET_IRIX6]: Define as NULL. - * fixinc/fixfixes.c(wrap_fix): the wrapper guard must be a function - of *both* the file name and the fix name. + * config/mips/iris5gas.h (MDEBUG_ASM_SPEC): Override to match + DWARF 2 default. -2003-01-25 Eric Botcazou - Christian Ehrhardt + * config/mips/dbxmdebug.h: New file. + * config.gcc (mips-sgi-irix6*o32, mips-sgi-irix5*): Use it with + gas and --with-stabs. - PR optimization/9279 +2003-06-27 Andreas Schwab - Merge from mainline: + * config.gcc (m68k-*-linux*): Don't override extra_parts and + gnu_ld, use the generic *-*-linux* settings instead. - 2002-07-10 Roger Sayle +2003-06-26 Roger Sayle - PR c/2454 - * combine.c (nonzero_bits): LOAD_EXTEND_OP should only apply - to SUBREGs of MEMs. (num_sign_bit_copies): Likewise. + PR optimization/11054 + * rtlanal.c (reg_overlap_mentioned_p): Handle ZERO_EXTRACT + and SIGN_EXTRACT. -2003-01-25 Jan Hubicka +2003-06-25 Zack Weinberg - PR fortran/9258 - * global.c (struct allocno): Add no_stack_reg. - (global_conflicts): Set no_stack_reg. - (find_reg): Use it. + PR bootstrap/3163 + * aclocal.m4 (AC_FUNC_MMAP_ANYWHERE, AC_FUNC_MMAP_FILE): Delete. + (gcc_AC_FUNC_MMAP_BLACKLIST): New. + * configure.in: Check for sys/mman.h and mmap in AC_CHECK_HEADERS + and AC_CHECK_FUNCS lists, respectively. Use + gcc_AC_FUNC_MMAP_BLACKLIST, not AC_FUNC_MMAP_ANYWHERE nor + AC_FUNC_MMAP_FILE. + * configure, config.in: Regenerate. -2003-01-24 Volker Reichelt + * ggc-page.c (init_gcc): Call fatal_io_error, not abort, + if opening /dev/zero fails. - * doc/passes.texi: Fix typo. +2003-06-25 Roger Sayle -2003-01-24 John David Anglin + * builtins.c (expand_builtin_strcpy): Construct new argument list + manually instead of using chainon to modify the original arglist. + (expand_builtin_strcmp): Likewise. - * 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-06-25 David O'Brien -2003-01-23 Franz Sirl + * config/i386/i386.h (builtin_define): Remove duplicate __amd64 + and __amd64__. - 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-06-25 Dhananjay Deshpande - * config/rs6000/rs6000.c (rs6000_binds_local_p): New functiion. - (rs6000_encode_section_info): Use it. + * config/sh/sh.c (sh_register_move_cost): + Add case for moving between MAC_REGS. -2003-01-23 Volker Reichelt +2003-06-24 Jerry Quinn - PR other/7341 - * invoke.texi (ftest-coverage): Fix broken cross-reference. - Change @code to @command for gcov command. + PR other/11280 + * gcc/doc/invoke.texi (Optimization Options): Remove -Os from + -freorder-functions description. - * gcc.texi: Adjust title of gcov section. - * gcov.texi: Likewise. +2003-06-25 Richard Sandiford -2003-01-23 Volker Reichelt + PR target/11084 + * config/mips/mips.c (mips_expand_prologue): Fix setting of regno + for the end of a variable argument list. - PR other/7448 - * doc/passes.texi (fssa-ccp): Remove misplaced line. +2003-06-25 Josef Zlomek -2003-01-21 Christian Ehrhardt + * dwarf2out.c (gen_field_die): Return if type of decl is error mark. - PR opt/7507 - * calls.c (fix_unsafe_tree): Split out from ... - (expand_call): ... here. Use it on the function address too. +2003-06-24 Falk Hueffner -2003-01-19 Roger Sayle + PR target/11260 + * config/alpha/alpha.md (sqrtdf2): Fix operand substitution. - * config/pa/pa.md (muldi3): Avoid invalid sharing of SUBREG RTXs. +2003-06-24 Jakub Jelinek -2003-01-19 John David Anglin + * builtins.c (expand_builtin_strcpy): Don't evaluate side-effects in + src twice. - * pa-linux.h (DWARF2_UNWIND_INFO, INCOMING_RETURN_ADDR_RTX, - DWARF_FRAME_RETURN_COLUMN): Delete defines. - (FUNCTION_OK_FOR_SIBCALL): Define to 1. +2003-06-23 Jakub Jelinek -2003-01-17 Jim Wilson + * config/s390/s390.c (s390_output_mi_thunk): Avoid .plt in -m31 + mode, as it requires pic register loaded. - * dbxout.c (dbxout_fptype_value): New. - (dbxout_type, case COMPLEX_TYPE): Call it. Use 'R' instead of 'r'. +2003-06-23 Kazu Hirata -2003-01-15 Stephane Carrez + * doc/extend.texi: Fix typos. + * doc/md.texi: Likewise. - * config/m68hc11/m68hc11.md ("return"): Use emit_jump_insn to emit - the return code. +2003-06-23 Roger Sayle + Gerald Pfeifer -2003-01-12 Alan Modra + * doc/contrib.texi (Contributors): Add a note on testing and + remove duplicates from testers list. - * expr.c (expand_expr ): Correct recursive call args. +2003-06-23 Kazu Hirata -2003-01-10 Josef Zlomek + * doc/invoke.texi: Document dump options, dT and dW. - * 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-06-23 Andreas Schwab -2003-01-10 Josef Zlomek + * doc/invoke.texi: Remove leading `-' from options in index. - * 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-06-22 Kazu Hirata -2003-01-09 Eric Botcazou + * doc/invoke.texi: Document dump, .cfg. - 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-06-22 Kazu Hirata -2003-01-09 Eric Botcazou + * doc/invoke.texi: Alphabetize dump options. - 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-06-22 Kazu Hirata -2003-01-07 Janis Johnson + * doc/invoke.texi: Remove a duplicate -dk. - PR other/8947 - * doc/invoke.texi (-malign-double): Explain that the option breaks - binary compatibility. +2003-06-22 Kazu Hirata -2003-01-07 Benjamin Kosnik - Sunil Davasam + * doc/rtl.texi: Fix the @findex for pre_modify. - PR libstdc++/9076 - * unwind-dw2.c (execute_cfa_program): DW_CFA_undefined, - DW_CFA_same_value, read next and ignore. +Sat Jun 21 13:37:52 CEST 2003 Jan Hubicka -2003-01-07 Richard Henderson + * i386.c (ix86_va_arg): Fix allocation of temporary slot. - * cfganal.c (flow_call_edges_add): Don't crash on noreturn call. +2003-06-21 Gerald Pfeifer -2003-01-01 Neil Booth + * doc/contrib.texi (Contributors): Use Windows instead of Win32. - PR preprocessor/8880 - * gcc.c (cpp_unique_options): Handle -fshort-wchar later so it - overrides any target CPU specs. + Update Andreas Jaeger's entry. -2002-12-28 John David Anglin + Merge the two entries of Kaveh Ghazi, David Edelsohn, and + Loren J. Rittle. - * 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. +2003-06-20 Geoffrey Keating -2002-12-21 Eric Botcazou + PR c++/9393 + * doc/invoke.texi (Debugging Options): Document -frandom-seed. + * configure.in: Check for gettimeofday. + * tree.c (flag_random_seed): Define. + (default_flag_random_seed): New. + (append_random_chars): Use flag_random_seed rather than trying + to acquire randomness here. + * tree.h (default_flag_random_seed): Declare. + * toplev.c (display_help): Add -frandom-seed and -fstack-limit-* + descriptions. + (decode_f_option): Handle -frandom-seed. + (print_switch_values): Call default_flag_random_seed. + * flags.h (flag_random_seed): Declare. + * configure: Regenerate. + * config.in: Regenerate. - PR optimization/8599 - * doloop.c (doloop_modify_runtime): Fix loop count computation - for preconditioned unrolled loops. +2003-06-20 Mark Mitchell -2002-12-21 Eric Botcazou + PR c++/10888 + * tree-inline.c (expand_call_inline): Do not warn about failing to + inline functions declared in system headers. + * doc/invoke.texi (-Winline): Expand on documentation. - PR optimization/8599 - * doloop.c (doloop_modify_runtime): Revert 2002-11-22 change. - * loop.c (loop_invariant_p): Likewise. +2003-06-20 Rainer Orth -2002-12-19 Eric Botcazou + * configure.in (gcc_cv_as_gstabs_flag): Disable if assembler warns. + * configure: Regenerate. + Fixes PR driver/9362. + +2003-06-19 Vladimir Makarov + + * haifa-sched.c (max_isse): Backport from the mainline. + (choice_entry): New structure. + (choice_stack, cycle_issued_insns, max_lookahead_tries, + cached_first_cycle_multipass_dfa_lookahead, cached_issue_rate): + New variables. + (choose_ready): Calculate max_lookahead_tries. Initiate + ready_try. + (schedule_block): Allocate/deallocate choice_stack. Change + cycle_issued_insns value as necessary. + (sched_init): Check cached_issue_rate. + +2003-06-20 Daniel Egger + Gerald Pfeifer - PR optimization/8988 - * loop.c (maybe_eliminate_biv): Kill REG_EQUAL notes mentioning - the biv when eliminating. + * doc/install.texi (Building): Correct and improve statement + about parallel builds. -2002-12-17 Jakub Jelinek +2003-06-20 Eric Botcazou - 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. + * doc/install.texi (--with-gnu-as): Mention SPARC/Solaris and + SPARC64/Solaris as platforms where --with-gnu-as makes a difference. + (--with-as): Add @anchor. + (--with-gnu-ld): Fix typo. + (--with-ld): Add @uref to --with-as. -2002-12-12 John David Anglin +2003-06-19 Kazu Hirata - * 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. + * flow.c (initialize_uninitialized_subregs): Use + emit_move_insn instead of emitting a hardcoded move. -2002-12-10 Janis Johnson +2003-06-19 David Edelsohn - PR other/8882 - * doc/tm.texi (PUSH_ARGS): Remove misplaced line. + * config/rs6000/rs6000.c (init_cumulative_args): Limit CALL_LIBCALL + to ABI_V4. -2002-12-05 Dale Johannesen +2003-06-19 DJ Delorie - * tree.c (unsafe_for_reeval): Consider callee child of CALL_EXPR. + PR preprocessor/11022 + * cppmacro.c (warn_of_redefinition): Handle cases where the two + definitions have different numbers of tokens. -2002-12-05 Danny Smith +2003-06-18 Richard Henderson - * config/i386/cygwin.h (SUBTARGET_PROLOGUE): Replace with - PROFILE_HOOK. - * config/i386/mingw32.h (SUBTARGET_PROLOGUE): Don't undef. + * config/ia64/unwind-ia64.c (_Unwind_GetCFA): New. + (_Unwind_FindEnclosingFunction): Implement. -2002-12-05 Nick Clifton +2003-06-18 Franz Sirl - * config/fr30/fr30.h (GO_IF_LEGITIMATE_ADDRESS): Check for frame - pointer and arg pointer by examining the register number. + * config/rs6000/rs6000.c (init_cumulative_args): Add and handle LIBCALL + argument. + (function_arg): Handle CALL_LIBCALL flag. + * config/rs6000/rs6000-protos.h (init_cumulative_args): Update + prototype. + * config/rs6000/rs6000.h (CALL_LIBCALL): New macro. + (INIT_CUMULATIVE_LIBCALL_ARGS): New macro. + (INIT_CUMULATIVE_ARGS): Add LIBCALL argument. + (INIT_CUMULATIVE_INCOMING_ARGS): Likewise. -2002-12-05 Matthias Klose +2003-06-17 Jason Merrill - * doc/invoke.texi: Remove last reference to -a. + PR c++/10929 + * tree-inline.c (expand_call_inline): Don't warn about failing to + inline a function which was made inline by -finline-functions. -2002-12-04 Eric Botcazou +2003-06-17 Ranjit Mathew - PR c/7622 - * c-semantics (genrtl_scope_stmt): Do not output inlined - nested functions that contain no code. + * install.texi (Testing): Add information on how to run Java + runtime tests separately. -2002-12-04 Jakub Jelinek +2003-06-17 Christopher Faylor - * fold-const.c (associate_trees): Only optimize NEGATE_EXPR in one - of the operands into MINUS_EXPR if code is PLUS_EXPR. + * doc/install.texi: Add msvc rebuild caveat. -2002-12-02 Bob Wilson +2003-06-17 Kazu Hirata - * config/xtensa/xtensa.c (xtensa_emit_call): Use a static buffer. - * config/xtensa/xtensa.h (MAX_WCHAR_TYPE_SIZE): Delete. + * doc/contrib.texi: Replace Hitachi with Renesas. + * doc/install.texi: Likewise. + * doc/invoke.texi: Likewise. -2002-12-01 Mark Mitchell +2003-06-17 Franz Sirl - * 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 + * config/rs6000/linux.h (MD_FALLBACK_FRAME_STATE_FOR): Partly revert + 2003-01-23 patch. Corrected to handle kernels with changed ucontext. - 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. + * config/rs6000/sysv4.h (SUBTARGET_OVERRIDE_OPTIONS): Error on invalid + -msdata=eabi usages. -2002-11-26 David Edelsohn +2003-06-14 Richard Earnshaw - * 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 optimization/10842 + From trunk: + 2003-01-20 Nick Clifton - PR 8362 - * config/rs6000/rs6000.c (rs6000_outout_load_multiple): New function. - * config/rs6000/rs6000.md (ldmsi[3-8]): New patterns. + * config/arm/arm.md (sibcall_epilogue): Add an + UNSPEC_PROLOGUE_USE to prevent the link register from being + considered dead. -2002-11-25 Christian Ehrhardt + 2003-02-02 Richard Earnshaw - PR c/8639 - * fold-const.c (extract_muldiv): Don't propagate division unless - both arguments are multiples of C. + * arm.md (sibcall_epilogue): Set the "conds" to "clob". + (epilogue_insns): Likewise. -2002-11-24 Eric Botcazou +2003-06-14 Richard Earnshaw - PR optimization/8275 + PR target/11183 + * arm.c (output_move_double): Pass SImode to adjust_address. - Merge from mainline: - 2002-09-19 Dale Johannesen +2003-06-13 Janis Johnson - * combine.c (make_extraction): Don't create - invalid subreg. + * doc/install.texi (m32r-*-elf): Change company to Renesas. -2002-11-23 Marek Michalkiewicz +2003-06-13 Richard Earnshaw - 2002-09-26 Theodore A. Roth - * config/avr/avr.c: Eliminate use of _PC_ in pc relative insns. - * config/avr/avr.md: Ditto. + * arm.c (output_call_mem): If the address references the link-register + use an instruction sequence that avoids early-clobbering IP. + (eliminate_lr2ip): Delete. -2002-11-23 Eric Botcazou +2003-06-12 Richard Henderson - PR c/8588 - * optabs.c (expand_binop): Convert CONST_INTs in shift - operations too. + PR target/11089 + * config/i386/i386.md (sse_movaps): Use an expander to force + one operand to be a register. + (sse_movups): Likewise. -2002-11-23 Eric Botcazou +2003-06-12 Richard Henderson - PR c/8518 - * c-decl.c (duplicate_decls): Outline the second definition - of an extern inline function in all cases. + PR middle-end/10557 + * rtlanal.c (subreg_offset_representable_p): Relax subreg check. -2002-11-22 Eric Botcazou +2003-06-13 Eric Botcazou + Christian Ehrhardt - PR c/8439 - * recog.c (validate_replace_rtx_1) [PLUS]: Simplify only - if there is something new to be simplified. + PR target/10142 + * config/sparc/sparc.c (function_arg_record_value_parms): Add + new 'stack' field. + (function_arg_record_value_1): Set 'stack' to 1 if we run out of + integer slots for an integer field. + (function_arg_record_value_3): Shift vector index. + (function_arg_record_value_2): Likewise. + (function_arg_record_value): Initialize 'stack' to 0. + Set 'stack' to 1 if we run out of integer slots for an integer field. + Generate (parallel [(expr_list (nil) ...) ...]) if 'stack' is set to 1. -2002-11-22 Toon Moene +2003-06-13 Eric Botcazou - * 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. + PR optimization/10955 + * unroll.c (unroll_loop): Fix off-by-one bug. -2002-11-22 Eric Botcazou +2003-06-12 Richard Henderson - PR optimization/8599 + PR middle-end/10475 + * expmed.c (emit_store_flag): Use simplify_gen_subreg directly + for extracting sub-words. - Merge from mainline: - 2002-11-04 Dale Johannesen +2003-06-12 Richard Henderson - * doloop.c (doloop_modify_runtime): Fix loop count computation - for unrolled loops. - * loop.c (loop_invariant_p): Support calling from unroller. + PR target/7594 + * config/m68k/m68k.md (zero_extendhisi2): Use gen_lowpart_SUBREG. + (zero_extendqihi2, zero_extendqisi2): Likewise. -2002-11-22 Daniel Jacobowitz +2003-06-12 Richard Henderson - * config/sh/sh.md (ashrdi3+1, ashrdi3+2): Predicate on - reload_completed. + PR inline-asm/4823 + * reg-stack.c (any_malformed_asm): New. + (check_asm_stack_operands): Set it. + (convert_regs_1): Check it before aborting. -2002-11-21 Bob Wilson +2003-06-12 Jakub Jelinek - * 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. + * c-decl.c (c_expand_body): Save input_filename and lineno, + set it before tree inlining and restore before return. -2002-11-19 Release Manager +2003-06-12 Ulrich Weigand - * GCC 3.2.1 Released. + * config/s390/s390.c (s390_emit_prologue): Use LA instead of AR + to initialize GOT register. -2002-11-19 Release Manager +2003-06-12 Jakub Jelinek - * GCC 3.2.1 Released. + * c-opts.c (complain_wrong_lang): Add on argument. + Print no- switch if on is false. + (c_common_decode_option): Adjust caller. -2002-11-18 Release Manager +2003-06-11 Richard Henderson - * GCC 3.2.1 Released. + * stmt.c (expand_asm_operands): Don't warn for memories with + queued addresses. -Sat Nov 16 02:54:29 CET 2002 Jan Hubicka +2003-06-11 Andrew Pinski - * jump.c (tablejump_p): New. - * cfgcleanup.c (try_optimize_cfg): Do not merge blocks across tablejump. - * rtl.h (tablejump_p): Declare. + PR target/8787 + * config/i386/djgpp.h (ASM_FILE_START): emit `.intel_syntax' + if -masm=intel. -2002-11-16 Graham Stott +2003-06-10 Andrew Haley - * flow.c (life_analysis): Update LABEL_NUSES before purging - dead jumptables. + * langhooks-def.h (LANG_HOOKS_DECL_OK_FOR_SIBCALL): New. + (LANG_HOOKS_DECLS): Add LANG_HOOKS_DECL_OK_FOR_SIBCALL. + (lhd_decl_ok_for_sibcall): New. + * langhooks.c (lhd_decl_ok_for_sibcall): New. + * langhooks.h (lang_hooks_for_decls.ok_for_sibcall): New field. + * calls.c (expand_call): Check lang_hook before generating a + sibcall. -2002-11-13 Janis Johnson +2003-06-09 Richard Henderson - * doc/install.texi (Testing): Document extra Java testing. - * doc/sourcebuild.texi (Test Suites): Document libgcj testing. + 2003-05-11 Ulrich Weigand + * except.c (EH_RETURN_STACKADJ_RTX): Do not define. + (EH_RETURN_HANDLER_RTX): Likewise. + (expand_builtin_eh_return): Do not copy stack adjustment + if EH_RETURN_STACKADJ_RTX is not defined. + (expand_eh_return): Likewise. Also, do not pass stack + adjustment as argument to the eh_return pattern. + * except.h (MUST_USE_SJLJ_EXCEPTIONS): Do not define just + because EH_RETURN_STACKADJ_RTX is not defined. + * unwind-dw.c (uw_update_context_1): If EH_RETURN_STACKADJ_RTX + is not defined, treat stack pointer like a regular register. + (uw_init_context_1): Set up fake initial stack pointer register. + (uw_install_context_1): Do not compute stack adjustment if + EH_RETURN_STACKADJ_RTX is not defined. -2002-11-12 Franz Sirl + * config/i386/i386.md ("eh_return"): Remove first argument. + * config/mips/mips.md ("eh_return"): Likewise. + * config/rs6000/rs6000.md ("eh_return"): Likewise. + * config/sh/sh.md ("eh_return"): Likewise. - * doc/install.texi (powerpc-*-linux-gnu*): Update binutils requirement. + * config/s390/s390.h (EH_RETURN_STACKADJ_RTX): Remove. -2002-11-12 Gerald Pfeifer +2003-06-08 Richard Henderson - * doc/contrib.texi (Contributors): Use GCJ instead of gcj to refer - to that entire project. + * stmt.c (expand_asm_operands): Re-word warning. -2002-11-12 Rainer Orth +2003-06-08 Richard Henderson - * config/mips/t-iris6 (MULTILIB_OSDIRNAMES): Restore old - directories. + * expr.h (EXPAND_MEMORY): New. + * expr.c (expand_expr): Check it. + * stmt.c (expand_asm_operands): Provide it when the constraint + requires a memory. Warn for memory input constraints without + a memory operand. -2002-11-11 Janis Johnson +2003-06-07 Richard Henderson - * doc/contrib.texi: Merge in the list from the libstdc++ web pages. + * c-common.c (cb_register_builtins): Define __EXCEPTIONS for C also. -2002-11-11 Franz Sirl +2003-06-07 Kelley Cook - PR c/8467 - * stmt.c (tail_recursion_args): Handle DECL_MODE differing from the - mode of DECL_RTL case. + * configure.in (HAVE_LD_RO_RW_SECTION_MIXING): Remove quotes in + section names. + * configure: Regenerate. -2002-11-11 Neil Booth +2003-06-07 Alan Modra - PR preprocessor/4890 - * tradcpp.c (output_line_command): When leaving a file, - system_include_depth has not yet been decremented. + * config/rs6000/linux64.h (CRT_CALL_STATIC_FUNCTION): Define. -2002-11-10 Joel Sherrill +2003-06-06 James E Wilson - * config/m68k/t-crtstuff (crti.o): Use this... - ($(T)crti.o): ... instead. - (crtn.o): Use this... - ($(T)crtn.o): ... instead. + PR inline-asm/10890 + * reload1.c (merge_assigned_reloads): Abort only if two reloads have + different in fields. -2002-11-10 Ralf Corsepius +2003-06-06 Richard Earnshaw - * config/mips/mips.md (movdi_usd): Use %z1 in place of %1. + PR target/11052 + * ifcvt.c (noce_process_if_block): Fail if the destination has + side-effects. -2002-11-11 Graham Stott - Jan Hubicka +2003-06-06 Dan Kegel + Kaz Kojima - PR 8502 - * cfgrtl.c (try_redirect_by_replacing_jump): Do not kill computed - jumps post reload. + PR target/10331 + * config/sh/t-linux (STMP_FIXPROTO): Define. -2002-11-08 H.J. Lu + PR target/11096 + * config/sh/linux.h (CPLUSPLUS_CPP_SPEC): Redefine so to include + -D_GNU_SOURCE. - Fix c/5351 and optimization/7591. +2003-06-05 David Miller + Richard Henderson - * 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. + * optabs.c (HAVE_conditional_trap): Provide default. + (gen_conditional_trap): Likewise. + (init_optabs): Merge init_traps. + (gen_cond_trap): Use prepare_operand. Restructure and avoid ifdef. -2002-11-07 H.J. Lu +2003-06-05 Eric Botcazou - Fix bootstrap/8146 and - gcc.c-torture/execute/20020307-2.c with -march=i686. + * doc/md.texi (Machine Constraints): Correct the meaning of + constraints related to floating-point registers on SPARC. - * calls.c (PUSH_ARGS_REVERSED): Define only if not defined. - * expr.c (PUSH_ARGS_REVERSED): Likewise. +2003-06-05 Eric Botcazou + Paolo Bonzini - * config/i386/i386.h (PUSH_ARGS_REVERSED): Set to 1. + PR target/10663 + * configure.in (HAVE_LD_RO_RW_SECTION_MIXING): Redirect + assembler and linker output to /dev/null. + Use a 'sed' construct instead of 'grep -A1'. + * configure: Regenerate. -2002-11-04 Aldy Hernandez +2003-06-04 David Edelsohn - Fix c/8252. + * doc/install.texi (*-ibm-aix*): Native as and ld required + to bootstrap on AIX 5L. - * config/rs6000/rs6000.c (rs6000_legitimate_address): Disallow - vectors from PRE_INC/DEC. +2003-06-04 Richard Henderson -2002-11-06 Richard Henderson + * c-common.c (handle_cleanup_attribute): New. + (c_common_attributes): Add it. + * c-decl.c (finish_decl): Honor the cleanup attribute. + * doc/extend.texi (Variable Attributes): Document it. - PR optimization/7520 - * cfganal.c (flow_active_insn_p): New. - (forwarder_block_p): Use it. + * unwind-c.c: New file. + * Makefile.in (LIB2ADDEH): Add it. + * config/t-darwin, config/t-linux, config/t-linux-gnulibc1, + config/ia64/t-ia64: Likewise. -2002-11-06 Janis Johnson +2003-06-04 Eric Botcazou - * doc/contrib.texi: Merge in the list from the Java web pages. + PR optimization/11018 + * config/sparc/sparc.c (sparc_v8plus_shift): Use which_alternative + consistently to decide whether the scratch register is really + required. -2002-11-06 David O'Brien +2003-06-04 Eric Botcazou - * config/sparc/freebsd.h: Fix typo. + PR optimization/10876 + * config/sparc/sparc.h (CONST_OK_FOR_LETTER): Add + new 'O' constraint for constant 4096. + (CONST_DOUBLE_OK_FOR_LETTER_P): Likewise. + * config/sparc/sparc.md (adddi3 expander): Canonicalize pattern. + Do not transform into MINUS insn for constant 4096. + (*adddi3_sp64 insn): Canonicalize pattern. Add new alternative + for constant 4096 as third operand. + (addsi3 expander): Remove. + (*addsi3 insn): Rename into 'addsi3'. Canonicalize pattern. Add + new alternative for constant 4096 as third operand. + (subdi3 expander): Do not transform into PLUS insn for constant 4096. + (*subdi3_sp64 insn): Add new alternative for constant 4096 as third + operand. + (subsi3 expander): Remove. + (*subsi3 insn): Rename into 'subsi3'. Add new alternative for + constant 4096 as third operand. + * doc/md.texi (Machine Constraints): Document new 'O' constraint for + the SPARC port. -2002-11-05 Bob Wilson +2003-06-03 Richard Henderson - * config/xtensa/elf.h (LIB_SPEC): Add "-lhal". + * unwind.inc (_Unwind_Resume_or_Rethrow): Fix return type. + * unwind.h (_Unwind_Resume_or_Rethrow): Update. + (_Unwind_SjLj_Resume_or_Rethrow): Likewise. -2002-11-04 Aldy Hernandez +2003-06-03 Douglas B Rupp - Backport patch to fix PR c/8451. + * Makefile.in (TEXI_GCC_FILES): Remove vms.texi entry. + * doc/gcc.texi: Remove vms.texi section. + * doc/vms.texi: Remove obsolete file. - 2002-04-25 Richard Henderson +2003-06-03 Richard Henderson - * expmed.c (extract_bit_field): Fall through to generic code rather - than aborting on subreg special case. + PR target/10673 + * config/i386/i386.c (ix86_split_long_move): Fix base register + mode for XFmode splits for TARGET_64BIT. -2002-11-01 Mark Mitchell +2003-06-02 Kazuhiro Inaoka - PR c++/8391 - * toplev.c (rest_of_compilation): Do not refuse to output code for - an inline function in a local class. + * gcc/config.gcc Add support multilib parts for m32rx processor. -2002-11-01 David O'Brien +2003-06-01 Eric Botcazou - * config/sparc/freebsd.h (CPP_CPU64_DEFAULT_SPEC): Define __arch64__. - Add comment. + PR target/11044 + * config/i386/i386.md (length attribute): Set length to 4 + for instructions of type "fcmp". -2002-11-01 David O'Brien +2003-06-01 Josef Zlomek - * config/sparc/freebsd.h (TRANSFER_FROM_TRAMPOLINE): Define - __enable_execute_stack function. + * rtl.def (CONST_DOUBLE): Update comment. -2002-11-01 Richard Earnshaw (rearnsha@arm.com) +2003-06-01 Seth Arnold + Aldy Hernandez - 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. + PR10871 + * config/rs6000/rs6000.c (rs6000_stack_info): Do not add + vrsave_size twice. -Thu Oct 31 18:31:22 CET 2002 Jan Hubicka +2003-05-31 Eric Botcazou - * 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. + * doc/install.texi (mips-sgi-irix5): Add missing + HTML
marker. -2002-10-30 Mark Mitchell +2003-05-31 Eric Botcazou - * varasm.c (asm_output_aligned_bss): Do not call - ASM_GLOBALIZE_LABEL. + * doc/md.texi (Machine Constraints): Document + missing SPARC constraints. -2002-10-29 Janis Johnson +2003-05-31 Eric Botcazou - * doc/invoke.texi (-profile-arcs): Remove references to -a and -ax. + * doc/md.texi (Automaton pipeline description): Use + "type" instead of "cpu" as the attribute in the examples. -2002-10-29 Eric Botcazou +2003-05-30 Rainer Orth - PR optimization/8334 - * expr.c (expand_expr) [PLUS]: Don't use simplify_binary_operation; - check for zero operands explicitly. + * config/mips/mips.h (SUBTARGET_ASM_DEBUGGING_SPEC): Move + -mdebug/-no-mdebug switches ... + (MDEBUG_ASM_SPEC): ... here. + Use only with gas. + (EXTRA_SPECS): Initialize mdebug_asm_spec. + (CONSTANT_ADDRESS_P): Allow native IRIX 6 O32 assembler. -2002-10-21 Dale Johannesen +2003-05-29 Gabriel Dos Reis - 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. + * diagnostic.h (output_verbatim): Remove printf attribute. + (verbatim): Likewise. + * diagnostic.c (output_pointer): New function. + (output_format): Use it. Handle %p format specifier. -Sun Oct 27 10:12:27 CET 2002 Jan Hubicka +2003-05-27 Denis Chertykov - * linux64.h (DEFAULT_PCC_STRUCT_RETURN): Define. + * cselib.c (cselib_invalidate_regno): Abort if hardreg have a + VOIDmode. + * cselib.c (cselib_process_insn): Pass reg_raw_mode for hardreg in + call of cselib_invalidate_regno. - PR target/6890 - * xmmintrin.h (_MM_TRANSPOSE4_PS): New. +2003-05-25 Gerald Pfeifer -2002-10-25 Zack Weinberg + * doc/contrib.texi (Contributors): Update Kean Johnston. - 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. +Fri May 23 21:19:31 CEST 2003 Jan Hubicka + Andreas Jaeger - * 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. + * i386.h (TARGET_CPU_CPP_BUILTINS): Define __amd64 and __amd64__; + do not use assertion. - * 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. +Fri May 23 20:55:39 CEST 2003 Jan Hubicka -2002-10-22 Jim Wilson + * i386.md (sse_loadss, sse_loadss_1, sse2_loadsd, sse2_loadsd_1): + Rewrite - * config/i386/i386.md (subdi3_1): Add call to ix86_binary_operator_ok. +2003-05-23 Eric Botcazou -2002-10-15 Jim Wilson + * doc/install.texi: Remove sparc64-*-*. Add sparc64-*-solaris2*. + Document sparcv9-*-solaris2* as a synonym for sparc64-*-solaris2*. - PR target/6981 - * config/i386/i386.md (adddi3_1): Add call to ix86_binary_operator_ok. +2003-05-22 Eric Botcazou -2002-10-24 Richard Henderson + PR bootstrap/10805 + * doc/install.texi (sparc-sun-solaris2.7): Document bootstrap + failure with Sun assembler 5.0 Alpha 03/27/98. - PR opt/7944 - * reload.c (find_reloads_toplev): Use simplify_gen_subreg; mode - of X is not important when simplifying subregs of constants. +2003-03-21 Loren James Rittle -2002-10-23 Robert Lipe + * config/sparc/freebsd.h (CPP_CPU64_DEFAULT_SPEC): Add -D__sparcv9 + -D__sparc__ to match system compiler convention. - * config.gcc (i[34567]86-*-sco3.2v5*): Fix tm_file. +2003-05-20 Kevin Ryde + Wolfgang Bangerth -2002-10-23 Roger Sayle + PR c/10355 + * doc/extend.texi: Put a warning into the documentation + of attribute regparm. - 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. +2003-05-20 Ulrich Weigand -2002-10-23 Ulrich Weigand + * config/s390/s390.md ("*iordi3_oi"): Do not mark commutative. + ("*iorsi3_oi"): Likewise. - * config/s390/s390.md ("*movdi_64"): Fix op_type attribute. - ("*movdf_64"): Likewise. - ("*lshrdi3_64"): Likewise. +2003-05-19 John David Anglin -2002-10-21 Matthias Klose + * pa/milli64.S ($$mulI): Fix typo. - * 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 `;'. +2003-05-19 Gabriel Dos Reis -Sat Oct 19 15:49:14 CEST 2002 Jan Hubicka + * hashtable.h (struct ht_identifier): Add new field "hash_value". + * hashtable.c (ht_lookup): Use it. + (ht_expand): Likewise. Avoid doing the same computation twice. + * tree.h (IDENTIFIER_HASH_VALUE): New macro. - * 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. +2003-05-19 Nick Clifton - PR target/7693 - Patch by Shawn Wagner - * mmintrin.h: Replace pi64 by si64. + * config/arm/arm.c (use_return_insn): Do not use a single return + instruction for interrupt handlers which have to create a stack + frame. + (arm_expand_prologue): Do not pre-bias the return address of + interrupt handlers which create a stack frame. -2002-10-18 Zack Weinberg +2003-05-19 Eric Botcazou - * decl.c (start_decl): Point users of the old initialized- - typedef extension at __typeof__. + Backport from mainline: -Thu Oct 17 17:14:07 CEST 2002 Jan Hubicka + 2003-05-10 Alexander Aganichev - PR opt/7630 - * reload.c (reload_inner_reg_of_subreg): New argument output; - (push_reload): Update call. + * config/i386/i386.h (MODES_TIEABLE_P): Fix typo. - PR c++/6419 - * expr.c (expand_expr): Use DECL_RTL_SET_P. +2003-05-16 Wolfgang Bangerth -Wed Apr 24 23:45:37 2002 J"orn Rennecke + * doc/bugreport.texi: Remove most of the preface of the + bugs section. - * calls.c (expand_call): Take current_function_pretend_args_size - into account when setting argblock for sibcalls. +2003-05-16 Nick Clifton -Wed Oct 16 19:43:38 CEST 2002 Jan Hubicka + * config/mcore/mcore.md (jump): Use emit_jump_insn to generate the + jump insn. - PR target/7396 - * i386.c (builtin_description):Drop cmpg[te]s[sd]. - * xmmintrin.h (__mm_cmpg[te]_s[sd]): Rewrite using - swapped alternative. +2003-05-15 Gerald Pfeifer -2002-10-16 Jakub Jelinek + * doc/invoke.texi (Warning Options): Mark -Wmissing-declarations + as a C only option. - * fold-const.c (fold): Fix a typo. +2003-05-15 Wolfgang Bangerth -2002-10-15 Ulrich Weigand + * doc/bugreport.texi: Remove most of the bug reporting + instructions and merge them into bugs.html. - PR target/7370 - * config/s390/s390.md ("*addsi3_inv"): New pattern. +2003-05-14 Kaveh R. Ghazi - PR target/8232 - * config/s390/s390.md ("cmpstrsi"): Convert length operand - from SImode to Pmode. + * sparc.c (print_operand): Fix uninitialized warning. -2002-10-15 Janis Johnson +2003-05-14 Mark Mitchell - * doc/install.texi: Formatting changes for conformance to HTML 4.01. + * version.c: Reset to prerelease format. + * doc/include/gcc-common.texi: Update version number. -2002-10-15 Ulrich Weigand +2003-05-13 Release Manager - PR opt/7409 - * loop.c (loop_regs_scan): Mark registers used for function - argument passing as MAY_NOT_OPTIMIZE. + * GCC 3.3 Released. -2002-10-14 Neil Booth +2003-05-12 Mark Mitchell - PR preprocessor/7862 - PR preprocessor/8190 - * gcc.c (cpp_unique_options): Don't delete .d files. - Remove stray whitespace. + PR other/10745 + * configure.in: Correct detection of GNU ld version number. + * configure: Regenerated. -2002-10-14 Jakub Jelinek +2003-05-08 J"orn Rennecke - * config/i386/i386.h (ASM_OUTPUT_REG_PUSH, ASM_OUTPUT_REG_POP): - Handle TARGET_64BIT. + * sh.c (gen_block_redirect, split_branches): Use + CODE_FOR_jump_compact instead of CODE_FOR_jump -2002-10-14 Mark Mitchell +2003-05-06 Eric Christopher - 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. + * config/mips/linux.h: Fix typo. -2002-10-12 John David Anglin +2003-05-06 Ulrich Weigand - * tree.c (tree_size): Revise expressions using TREE_CODE_LENGTH and - TREE_VEC_LENGTH to ensure values are promoted before doing subtraction. + 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. -2002-10-11 Janis Johnson +2003-05-06 Mark Mitchell - * doc/compat.texi: Add info about C++ libraries. + PR other/10658 + * gcc.c (process_command): Update copyright date. -Thu Oct 10 19:47:41 CEST 2002 Jan Hubicka +2003-05-06 Bruce Korb - PR target/5610 - * invoke.texi (-msse-math): Kill - (-msse): Add note to mfpmath=sse. + * 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 -Thu Oct 10 17:38:29 CEST 2002 Jan Hubicka +2003-05-06 Phil Edwards - 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 + * doc/install.texi (mips-*-*): Add note about libstdc++. -Thu Oct 10 17:05:22 CEST 2002 Jan Hubicka +2003-05-05 Mark Mitchell + Kean Johnston - PR target/7723 - * i386.c (ix86_expand_vector_move): Do not generate const0->mem moves. + * toplev.c (check_global_declarations): Do not warn about unused + static consts. -2002-10-09 Zack Weinberg +2003-05-05 Richard Henderson - 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. + * 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. - * 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." +2003-05-05 David O'Brien -2002-10-02 Richard Henderson + * 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. - PR opt/7124 - * config/i386/i386.c (ix86_register_move_cost): Increase cost - for secondary_memory_needed pairs. +2003-05-05 Jason Merrill -Wed Oct 9 19:09:13 CEST 2002 Jan Hubicka + * stor-layout.c (update_alignment_for_field): Set DECL_ALIGN for + the field. - PR opt/7912 - PR opt/7390 - * i386.c (athlon_cost): Fix the move costs. +2003-05-02 Zack Weinberg -2002-10-09 Alan Modra + 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. - * libgcc2.c (__floatdisf): Properly cure double rounding. +2003-05-03 Falk Hueffner + Gerald Pfeifer -2002-10-09 Gabriel Dos Reis + * doc/contrib.texi (Contributors): Add Zdenek Dvorak, Aldy + Hernandez, and Kazu Hirata. - PR doc/7484 - * doc/invoke.texi (Option Summary): List - -Wmissing-declarations as a C only option. +2003-05-02 Richard Henderson -2002-10-08 Jakub Jelinek + PR c++/10570 + * except.c: Revert 04-01 and 04-02 forced-unwind changes. + * flags.h, toplev.c, doc/invoke.texi: Likewise. - * 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. + * unwind-dw2.c (_Unwind_GetCFA): Fix ptr->int conversion warning. + * unwind.inc (_Unwind_DeleteException): Check for null + exception_cleanup. -2002-09-25 Eric Botcazou - Volker Reichelt + * 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. - PR c/7411 - * expr.c (expand_expr) [PLUS]: Simplify after the operands - have been expanded in EXPAND_NORMAL mode. +2003-05-02 Steven Bosscher -2002-10-06 Richard Henderson + * 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. - * config/rs6000/rs6000.md (load_toc_v4_PIC_2): Fix base constraint. +2003-05-02 Gerald Pfeifer -2002-10-06 Roger Sayle + * doc/contrib.texi (Contributors): Add Daniel Berlin. - 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. +2003-05-01 Rodney Brown -2002-10-06 Neil Booth + * rtl.h (subreg_offset_representable_p): Prototype. - Debian BTS Bug #157416 - * cpplib.c (destringize_and_run): Kludge around getting - tokens from in-progress macros. - (_cpp_do__Pragma): Simplify. +2003-05-01 Roger Sayle -2002-10-06 Frank Ch. Eigler + 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. - * cppinit.c (init_standard_includes, parse_option): Use strncmp. +2003-04-30 Andreas Schwab -2002-10-05 Jakub Jelinek + * doc/extend.texi (Other Builtins): Enclose multiple word data + type in braces for @deftypefn. - * 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. +2003-04-29 Jason Merrill - * 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. + PR middle-end/10336 + * jump.c (never_reached_warning): Really stop looking if we reach + the beginning of the function. - * 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. +Tue Apr 29 21:07:00 CEST 2003 Jan Hubicka -2002-10-05 Neil Booth + * cse.c (count_reg_usage): Revert my previous patch. - PR preprocessor/8120 - * doc/cpp.texi: Update documentation of bad use of ##. +2003-04-29 Alexander Kabaev -Thu Oct 3 23:15:15 CEST 2002 Jan Hubicka + bootstrap/10452 + * gengtype-yacc.y: Improve portability. - * i386.h (CPP_SPECS): fix defines for -msse, -msse2, -mpentium2,3. +2003-04-29 Zack Weinberg -Thu Oct 3 21:35:36 CEST 2002 Jan Hubicka + * config.gcc: Install obsolete target list for GCC 3.3. + * doc/install.texi: Mention in specific-target instructions + that certain configurations are deprecated. - * toplev.c (rest_of_compilation): Dump loops before clobbering - the structure. +2003-04-29 Kriang Lerdsuwanakij - * expr.c (force_operand): Use expand_simple_* to handle more - cases. + * 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. - * i386.c (q_regs_operand): Use ANY_QI_REG_P. +2003-04-29 Danny Smith - * i386.c (override_options): Fix stack alignment. - (classify_argument): Handle variable sized types. - (ix86_expand_int_movcc): Avoid RTL sharing problem. + * config/i386/mingw32.h (LIBGCC_SPEC): Add libmingwex.a. + Update copyright. + * config/i386/cygwin.h (LIBGCC_SPEC): Add libmingwex.a, for + -mno-cygwin case. - * i386.md (prefetch_sse_rex, prefetch_3dnow_rex): New. - (prefetch): Properly handle 64bit case. +2003-04-29 J"orn Rennecke - * i386.c (classify_argument): Properly compute word size of the analyzed object. + * varasm.c (default_assemble_visibility): Use assemble_name. - * jump.c (reg_or_subregno): New function. - * rtl.h (reg_or_subregno): Declare - * unroll.c (find_splittable_givs): Handle subregs. +2003-04-29 David O'Brien - Richard Sandiford : + * 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. - * expr.c (force_operand): Fix reversed move. +2003-04-28 Mark Mitchell - Andreas Jaeger : + PR c++/10180 + * tree-inline.c (expand_call_inline): Call push_srcloc when + encountering EXPR_WITH_FILE_LOCATION. Honor warn_inline. - * config/i386/linux64.h (STARTFILE_PREFIX_SPEC): New. +2003-04-28 Mike Stump - Janis Johnson : + * gdbinit.in: Update to reflect new identifier structure. - * loop.c (emit_prefetch_instructions): Several small fixes. +2003-04-28 Richard Henderson -Thu Sep 5 00:34:33 2002 J"orn Rennecke + * 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. - * 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. +2003-04-28 David O'Brien -2002-10-01 David S. Miller + * config/i386/i386.h (builtin_define): Add __amd64 and __amd64__. - 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. +Mon Apr 28 09:54:56 CEST 2003 Jan Hubicka -2002-10-01 David S. Miller - Jan Hubicka + PR c/10308 + * reload.c (find_reloads_address_1): Reload plus at the place of + index register. - * reload1.c (gen_reload:SECONDARY_MEMORY_NEEDED): Handle SUBREG. - * reload.c (push_reload:SECONDARY_MEMORY_NEEDED): Likewise. +2003-04-26 Richard Henderson -2002-09-30 Bob Wilson + * 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. - * 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. +2003-04-26 Stephane Carrez -2002-08-21 John David Anglin + * doc/install.texi (Binaries): Mention binaries for HC11/HC12. - * cppinit.c (remove_dup_nonsys_dirs): Fix warning and return value. +2003-04-26 Stephane Carrez -2002-08-20 John David Anglin + * doc/extend.texi (Function Attributes): Document "near" and "far" + for 68HC11 and 68HC12. - * 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. +2003-04-25 Bob Wilson -2002-09-30 Richard Earnshaw + * config/xtensa/linux.h (TARGET_OS_CPP_BUILTINS): Back out previous + addition of __PIC__ and __pic__ macros. + * config/xtensa/xtensa.h: Clean up indentation. - * 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. +2003-04-25 Bob Wilson -2002-09-29 David S. Miller - - * config/sparc/linux64.h (STARTFILE_SPEC32, ENDFILE_SPEC32): Kill - hardcoded paths. + * 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. -2002-09-27 Alexander N. Kabaev +2003-04-24 John David Anglin - 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. + 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. -2002-09-26 David S. Miller +2003-04-24 Alexander Kabaev - PR optimization/7335 - * calls.c (emit_library_call_value_1): Passing args by reference - converts a CONST function into a PURE one. + 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. -2002-09-26 Richard Henderson +2003-04-23 Richard Henderson - PR c/7160 - * sched-deps.c (sched_analyze_insn): Make clobber insns depend - on call insns. + 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. -2002-09-27 Alan Modra +2003-04-23 Olivier Hainque - * doloop.c (doloop_modify_runtime ): Adjust - by absolute loop increment, not loop increment. + * config/pa/pa.md (extv, extzv): FAIL if the bitfield length is zero. -2002-09-25 David S. Miller +2003-04-23 James A Morrison - PR target/7842 - * config/sparc/sparc.c (set_extends): SImode ASHIFT does not - extend. + * 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. -2002-09-20 Jeroen Dobbelaere +2003-04-23 Ulrich Weigand - * config/arm/arm.md (sign_extract_onebit, not_signextract_onebit): - Add clobber of the condition code register. + * config/s390/s390.c (s390_expand_cmpstr): Disable CLC loop. -2002-09-18 Richard Earnshaw (rearnsha@arm.com) +2003-04-22 Devang Patel - PR optimization/7967 - * arm.md (ne_zeroextractsi): Add clobber of the condition code - register. + * cpptrad.c (_cpp_replacement_text_len): Add check for macro parameter count. + (_cpp_copy_replacement_text): Same. -2002-09-17 Richard Henderson +2003-04-22 Richard Henderson - * sibcall.c (optimize_sibling_and_tail_recursive_call): Also remove - RTX_UNCHANGING_P markers for successful tail-recursive replacement. + 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. -2002-09-16 Richard Henderson + * cfgrtl.c (try_redirect_by_replacing_jump): Revert last three changes. - PR opt/7515 - * c-objc-common.c (c_cannot_inline_tree_fn): Don't auto-inline - functions that don't bind locally. +2003-04-22 David Turner -2002-09-17 Alan Modra + * gbl-ctors.h: Add special license exception. + * libgcc2.h: Likewise. + * tsystem.h: Likewise. + * gcov-io.h: Likewise. - 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. +2003-04-21 Mark Mitchell - 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. + * 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. -2002-09-16 Jeff Law +2003-04-21 Mark Mitchell - * libgcc2.c: Do not include machmode.h. + * config/i386/winnt.c (i386_pe_mark_dllimport): Revert previous + changes. -2002-09-16 Jason Merrill - Danny Smith +2003-04-21 Mark Mitchell - * config/i386/winnt.c (ix86_handle_dll_attribute): Set - DECL_EXTERN and TREE_PUBLIC for dllimported variables here... - (i386_pe_mark_dllimport): Not here. + * config/i386/winnt.c (i386_pe_mark_dllimport): Make the new RTL + have the same form as the old RTL. -2002-09-14 Stephane Carrez +2003-04-18 Mark Mitchell - * 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. + * cfgrtl.c (try_redirect_by_replacing_jump): Create a basic block + for orphaned jump tables. -2002-09-14 Alan Modra +2003-04-20 John David Anglin - 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. + PR/8705 + * pa.md (movccfp): New expander. + (setccfp0, setccfp1): Rename to movccfp0 and movccfp1, respectively. + Reverse fcmp conditions. - 2002-08-27 David Edelsohn - * config/rs6000/linux64.h (ADJUST_FIELD_ALIGN): Undef before define. +2003-04-20 Marek Michalkiewicz - 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. + * config/avr/avr.md (*cmpqi_sign_extend): Handle negative values + of operand 1 correctly. - 2002-07-27 Alan Modra - * config/rs6000/rs6000.c (output_profile_hook): Don't generate profile - label reference when NO_PROFILE_COUNTERS. +2003-04-19 John David Anglin - 2002-07-11 Alan Modra - * config/rs6000/linux64.h (ASM_SPEC): Define. + * cfgrtl.c (try_redirect_by_replacing_jump): Remove unused variables. + * flow.c (life_analysis): Fix warning. -2002-09-13 Alan Modra +2003-04-18 Gerald Pfeifer - 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. + * doc/contrib.texi (Contributors): Prefer "bug fix" over "bugfix". + Add Segher Boessenkool. - 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. +2003-04-18 Alexander Sotirov - 2002-06-30 Alan Modra - PR optimization/7120 - * unroll.c (loop_iterations): Handle EQ loops. + PR c/9177 + * c-decl.c (c_expand_body): Don't garbage collect the function + body if we are going to dump it later. -2002-09-13 Alan Modra +2003-04-18 Eric Botcazou - * 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. + 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. -2002-09-12 Janis Johnson +2003-04-17 Janis Johnson - * doc/compat.texi: New file with new chapter, Binary Compatibility. + * doc/sourcebuild.texi (Test Suites): Document support for testing + binary compatibility (moved from testsuite/README.compat). -2002-09-12 Jason Merrill +2003-04-17 Simon Law - * calls.c (store_one_arg): Use size_in_bytes to determine the - amount of space to push. + * doc/include/gpl.texi: Fix double-spacing after "MA" to match + the one provided by the FSF. -2002-09-12 Jakub Jelinek +2003-04-17 Gerald Pfeifer - * config/sparc/linux64.h (STARTFILE_SPEC32): Fix a typo. + * doc/install.texi (Binaries): Update URL and list of platforms + provided by ftp.thewrittenword.com. -2002-09-12 Alan Modra +2003-04-17 Eric Botcazou - * 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. + * doc/invoke.texi (inline-limit): Fix pasto. -2002-09-11 Alexander Kabaev +2003-04-16 Mark Mitchell - Wed Apr 24 13:48:25 CEST 2002 Jan Hubicka - * loop.c (canonicalize_condition): Use gen_int_mode. + PR middle-end/8866 + * cfgtrl.c (try_redirect_by_replacing_jump): Do not delete + jumptables. -2002-09-11 Janis Johnson +2003-04-16 John David Anglin - * 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. + 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. - * 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. +2003-04-15 J"orn Rennecke -2002-09-08 Alan Modra + PR target/9594: + * sh.c (barrier_align): Also recognize stuff_delay_slot as + an indicator that a barrier was created by branch splitting. - * reload.c (find_reloads

): Pass operand_mode to - find_reloads_address. + merge from mainline: -2002-09-07 Scott Snyder + 2003-03-05 J"orn Rennecke - PR target/7374 - * config/alpha/alpha.md (abstf2): Fix typo: 'neg' for 'abs'. + * sh.h (OVERRIDE_OPTIONS): For TARGET_SHMEDIA, the minimum value + for align_jumps is 4. -2002-09-07 Glen Nakamura + (SECONDARY_INPUT_RELOAD_CLASS): If reloading a PLUS into FPUL, + use GENERAL_REGS. - 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. + 2003-03-03 J"orn Rennecke -2002-09-07 Alan Modra + * 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. - * config/rs6000/linux64.h (ASM_PREFERRED_EH_DATA_FORMAT): Define. + * 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. -2002-09-06 Jakub Jelinek +2003-04-15 James A. Morrison - * configure.in (HAVE_AS_OFFSETABLE_LO10): Use -xarch=v9 - unconditionally when gcc_cv_as_flags64 checks are gone. - * configure: Rebuilt. + * invoke.texi (Spec Files): Wrap if-exists-else example. + (MCore): Remove duplicate @itemx entries and @opindex entries. -2002-09-04 Eric Botcazou +2003-04-15 Ulrich Weigand - PR c/7102 - * optabs.c (expand_binop): Convert CONST_INTs in all cases. + * unwind.inc (_Unwind_Backtrace): New function. + * unwind.h (_Unwind_Backtrace): Declare it. + * libgcc-std.ver (_Unwind_Backtrace): Export it. -2002-09-04 Jason Thorpe +2003-04-15 Jason Merrill - * config/sparc/t-netbsd64: Disable multilib for now. + PR middle-end/10336, c++/10401 + * jump.c (never_reached_warning): Also stop looking if we reach the + beginning of the function. -2002-09-01 Alexandre Oliva +2003-04-15 Kaveh R. Ghazi - * 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. + PR target/10338 + PR bootstrap/10198 + PR bootstrap/10140 + * fixinc/gnu-regex.c (regerror): Use mempcpy not __mempcpy. -2002-09-01 Marek Michalkiewicz +2003-04-15 Jakub Jelinek - 2002-08-13 Denis Chertykov - * config/avr/avr.md: Call CC_STATUS_INIT in all peepnoles - which can change CC0. + * config/rs6000/rs6000.h (EPILOGUE_USES): Use register 2, + instead of TOC_REGISTER in epilogue in + current_function_calls_eh_return functions. -2002-08-29 Rodney Brown +2003-04-14 Hans-Peter Nilsson - * doc/install.texi (Specific, alpha*-dec-osf*): Add "virtual - memory exhausted" workarounds. + PR target/10377 + * config/cris/cris.md ("*mov_sideqi", "*mov_sidehi") + ("*mov_sidesi", "*mov_sideqi_mem", "*mov_sidehi_mem") + ("*mov_sidesi_mem", "*clear_sidesi", "*clear_sidehi") + ("*clear_sideqi", "*ext_sideqihi", "*ext_sideqisi") + ("*ext_sidehisi", "*op_sideqi", "*op_sidehi", "*op_sidesi") + ("*op_swap_sideqi", "*op_swap_sidehi", "*op_swap_sidesi") + ("*extopqihi_side", "*extopqisi_side", "*extophisi_side") + ("*extopqihi_swap_side", "*extopqisi_swap_side") + ("*extophisi_swap_side", 8th, 9th, 10th, 11th, 14th peepholes): + When next to constraint R, replace constraint i with n. -2002-08-29 John David Anglin +Mon Apr 14 16:14:37 CEST 2003 Jan Hubicka - * install.texi (hppa64-hp-hpux11*): Document installation procedure. + PR opt/10024 + * cfgrtl.c (force_nonfallthru_and_redirect): Use unchecked_make_edge. -2002-08-28 Jason Merrill +2003-04-14 Kriang Lerdsuwanakij - * 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. + * doc/contrib.texi (Contributors): Correct my entry. -2002-08-28 Daniel Berlin +2003-04-12 Stephane Carrez - * tree-inline.c (expand_call_inline): Make the statement - expression we generate have a COMPOUND_STMT. + * 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. -2002-08-27 Mark Mitchell +2003-04-12 Stephane Carrez - * doc/invoke.texi: Document -Wabi. + * 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. -2002-08-23 David Edelsohn +2003-04-12 Stephane Carrez - * config/rs6000/rs6000.c (rs6000_select_section): Treat - DEFAULT_ABI == ABI_AIX like PIC. Test PIC & reloc for readonly - default. - (rs6000_unique_section): Likewise. + * 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. -2002-08-22 Jason Merrill +2003-04-12 Stephane Carrez - * 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. + * 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. -2002-08-23 Alan Modra +2003-04-12 Mark Mitchell - * 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. + PR c++/7910 + * config/i386/winnt.c (i386_pe_mark_dllimport): Fix thinko. -2002-08-20 Andreas Jaeger +2003-04-12 Stephane Carrez - Merge from trunk: - Wed Jul 17 00:20:48 CEST 2002 Jan Hubicka + * 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. - * i386.md (prefetch): Fix for 64bit mode. - (prefetch_sse_rex, prefetch_3dnow_rex): New patterns. +2003-04-12 Stephane Carrez - 2002-08-11 Andreas Jaeger - PR target/7531: - * doc/invoke.texi (i386 and x86-64 Options): Document -mcmodel. + * 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. -2002-06-24 Jeff Law +2003-04-11 Geoffrey Keating - * 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. + * doc/extend.texi (Empty Structures): New. -2002-06-04 Jeff Law - Michael Matz +2003-04-11 Richard Henderson - * 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. + PR c++/10202 + * expr.c (expand_expr): Use COMPLETE_OR_UNBOUND_ARRAY_TYPE_P + not COMPLETE_TYPE_P for re-invoking layout_decl. - * haifa-sched.c (schedule_block): Do not count USE or CLOBBER - insns against the issue rate. +2003-04-11 Simon Law -2002-05-30 Jeff 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. - * 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. +2003-04-11 Richard Henderson -2002-05-29 Jeff Law + PR c/10201 + * expr.c (expand_expr): Move DECL_RTL frobbing ... + * stor-layout.c (layout_decl): ... here. - * flow.c (propagate_one_insn): Do not remove a dead insn if it - contains a REG_RETVAL note. +2003-04-11 John David Anglin - * haifa-sched (sched_analyze): Remove another useless clearing - of SCHED_GROUP_P I missed yesterday. + * 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. -2002-05-28 David Edelsohn - Jeff Law + * 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. - * optabs.c (expand_binop): Fix nwords sign warnings. - generate pseudo for add_optab. +2003-04-08 Jonathan Wakely - * sched-deps.c (sched_analyze): Do not clear SCHED_GROUP_P. - * haifa-sched.c (move_insn): Clear SCHED_GROUP_P after it is used. + * doc/extend.texi (Template Instantiation): Refer to ISO standard, + not Working Paper. + * doc/invoke.texi (C++ Dialect Options): Same. -2002-08-18 Neil Booth +Fri Apr 11 00:12:14 CEST 2003 Jan Hubicka - PR preprocessor/7602 - * cppinit.c (path_include): Treat the system environment - variables as being cxx_aware. + PR inline-asm/8803 + * function.c (instantate_virtual_regs): Verify that all ASM statements + match after the virutal regs instantiation. -2002-08-16 David Edelsohn +2003-04-10 Steve Ellcey - * collect2.c (is_ctor_dtor): Add other possible JOINER values. + * 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. - * config/rs6000/rs6000.c (output_mi_thunk): Return to function - section on TARGET_ELF. +2003-04-10 Steve Ellcey - * doc/install.texi (*-ibm-aix*): Explain AIX shared object versioning. - (Binaries): Update Bull Freeware URL. + * 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. -2002-08-15 Neil Booth +2003-04-10 Ulrich Weigand - 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. + * 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. -2002-08-14 Release Manager +2003-04-10 Andrew Haley - * GCC 3.2 Released. + * tree-inline.c (inlinable_function_p): Disable inlining for + synchronized methods. -2002-08-08 Jakub Jelinek +2003-04-09 Alexandre Oliva - * 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. + * config/fp-bit.c (unpack_d): Handle pair of doubles with + different signs correctly. -2002-08-08 Jakub Jelinek +2003-04-08 Richard Henderson - * 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. + PR target/9886 + * config/ia64/ia64.md (cmovdi_internal): Use 'n' not 'i' constraints. + (cmovsi_internal): Likewise. -2002-08-08 Jakub Jelinek +2003-04-07 Matt Kraai - * stor-layout.c (place_union_field): For bitfields if - PCC_BITFIELD_TYPE_MATTERS and TYPE_USER_ALIGN, set record's - TYPE_USER_ALIGN. + * doc/install.texi: Use @command and @samp for single- and + multi-word commands respectively. + * doc/makefile.texi: Likewise. + * doc/sourcebuild.texi: Likewise. -2002-08-07 Jakub Jelinek +2003-04-07 Christian Ehrhardt 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. + 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. -2002-08-06 Jakub Jelinek +2003-04-07 Glen Nakamura - * config/i386/mmintrin.h (__m64): Make the type 64-bit aligned. + PR opt/8634 + * explow.c (maybe_set_unchanging): Don't flag non-static const + aggregate type initializers with RTX_UNCHANGING_P. -2002-08-06 Jakub Jelinek +2003-04-07 Richard Henderson - * 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. + 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 + + * config/rs6000/rs6000.h (FUNCTION_VALUE_REGNO_P): Respect + 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 + + PR target/10067 + * 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 + * config/sparc/sparc.md (movdi_insn_sp32_v9): Remove 'f-f' alternative. + (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 + + PR target/7784 + * reload.c (find_reloads_address): Handle + (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 + perform jump2 any longer; remove command-line option -dJ. + +2003-03-25 Eric Botcazou + + 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 + + PR optimization/9414 + * 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 + + PR doc-bug/9813 + * 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. + (GO_IF_LEGITIMATE_ADDRESS): Use it. Reject the form + PIC+SYMBOLIC_CONST in other modes than Pmode. + (GO_IF_MODE_DEPENDENT_ADDRESS): Use it. Mark + the form PIC+SYMBOLIC_CONST as mode dependent. + +2003-03-20 Richard Henderson + + * 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 + + PR optimization/8396 + * tree-inline.c (initialize_inlined_parameters): Make sure the value + 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 + + PR c++/7050 + * expr.c (store_expr): Don't attempt to store void-typed trees, + just evaluate them for side effects. + +2003-03-12 Bob Wilson + + Backport from mainline: + 2003-03-12 Bob Wilson + + * config/xtensa/xtensa.md (adddi3): Don't clobber source operand used + 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 + * c-decl.c (duplicate_decls): Discard the initializer of the new decl + only if it is a VAR_DECL. + +2003-03-12 Eric Botcazou + + PR optimization/9888 + * config/i386/i386.md (jcc_1): Fix range. + (jcc_2): Likewise. + (jump): LIkewise. + (doloop_end_internal): Likewise. + +2003-03-12 Eric Botcazou + + PR optimization/9888 + * config/i386/i386.md (movsi_1): Remove special alternatives + for %eax register. + (movhi_1): Likewise. + * config/i386/i386.c (memory_address_length): Do not use + 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 + + PR middle-end/7796 + * unroll.c (calculate_giv_inc): Handle constants being + loaded with LSHIFTRT. + +2003-03-07 Eric Botcazou + + PR optimization/8726 + Backport patch from mainline: + + 2003-01-08 Dale Johannesen + + * 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: + + 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 + + PR target/9732 + * config/rs6000/rs6000.c (first_reg_to_save): Handle + PIC_OFFSET_TABLE_REGNUM for -fPIC too. + (rs6000_emit_prologue): Likewise. + (rs6000_emit_epilogue): Likewise. + * 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 + * toplev.c (process_options): If flag_detailed_statistics is set, + then set time_report as well. + + PR c/8828 + * 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 + + PR optimization/8613 + * 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 + + * inclhack.def (hpux_long_double): Tighten select and add bypass + 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 + + Backport following patch: + + 2003-02-11 Bob Wilson + + * 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 + + PR c/7741 + * 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 + coprocessor registers before floating-point registers. + * config/xtensa/xtensa.h (REG_ALLOC_ORDER): Adjust register numbers + to account for a previously removed register. + (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 + * gthr-rtems.h: Define __GTHREAD_MUTEX_INIT. Apparently no code + depended on it being defined until now. + +2003-01-29 Joel Sherrill + + PR target/9295 + * config/mips/rtems.h: Predefine __USE_INIT_FINI__ so generic + RTEMS code knows which C++ initialization style the toolset + configuration is using. + +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 + + PR bootstrap/9292 + * config.gcc (hppa1.1-rtems): Did not include t-rtems nor enable + 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. + (install-libgcc, install-multilib): Also pass DESTDIR. + * mklibgcc.in: Prepend $(DESTDIR) to $(libsubdir) in the + installation destination variable ldir. + * 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 -2002-08-04 Mark Mitchell + * config/pa/pa.md (muldi3): Avoid invalid sharing of SUBREG RTXs. - * doc/install.texi (Installing GCC): Refer to buildstat.html, - rather than listing version-specific build status files. +2003-01-10 Geoffrey Keating -2002-08-04 Joseph S. Myers + * varasm.c (struct constant_descriptor_rtx): Remove unused + `label' field. - * doc/include/gcc-common.texi (version-GCC): Increase to 3.2. + * ggc-page.c (ggc_collect): Avoid overflow computing + min_expand. -2002-08-01 Benjamin Kosnik +2002-12-20 Geoffrey Keating - * gcc.c: Set __GXX_ABI_VERSION to 102. + * integrate.c (output_inline_function): Don't hold private + pointers to 'struct function' over GC calls. -2002-07-30 Franz Sirl +2003-01-17 Alexandre Oliva - * gcc.c (cpp_unique_options): Define __GXX_ABI_VERSION, bump it to 101. + * config/mips/mips.h: Don't use #elif. Reported by Kaveh + R. Ghazi. -2002-07-24 Frank van der Linden +2003-01-16 Kaz Kojima - PR optimization/7291 - * config/i386/i386.c (ix86_expand_clrstr): Fix bzero alignment - problem on x86_64. + * config/sh/sh.c (sh_initialize_trampoline): Emit rotrdi3_mextr + instead of rotldi3_mextr. -2002-05-16 Jason Merrill +2003-01-16 Stephane Carrez - * config/mips/mips.c (mips_output_external): Don't do sdata - optimization for a variable with DECL_COMDAT set. + * config/m68hc11/m68hc11.c (m68hc11_check_z_replacement): Fix handling + 68HC12 pre/post inc/dec side effects. -2002-01-03 Jakub Jelinek +2003-01-16 Stephane Carrez - * c-decl.c (build_compound_literal): Set decl TREE_READONLY from TYPE. + * config/m68hc11/m68hc11.h (MASK_M6812): Define. - * c-decl.c (build_compound_literal): Defer compound literal decls - until until file end to emit them only if they are actually used. +2003-01-16 Stephane Carrez -2002-07-25 Release Manager + * 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. - * GCC 3.1.1 Released. +2003-01-15 John David Anglin -2002-07-21 Nick Clifton + * 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. - * Import following patch from mainline: +2003-01-15 Stephane Carrez - 2002-03-18 Bernd Schmidt + * 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. - * 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. +2003-01-15 Stephane Carrez -2002-07-18 Richard Henderson + * config/m68hc11/m68hc11.md ("return"): Use emit_jump_insn to emit + the return code. - PR optimization/7147 - * ifcvt.c (noce_get_condition): Make certain that the condition - is valid at JUMP. +2003-01-15 Josef Zlomek -2002-07-16 Hans-Peter Nilsson + * cfganal.c (set_edge_can_fallthru_flag): Clear the EDGE_CAN_FALLTHRU + flag before setting it. - * config/cris/linux.h (CRIS_LINK_SUBTARGET_SPEC): Don't - --gc-sections if -r. +2003-01-15 Josef Zlomek -2002-07-15 Eric Botcazou + Segher Boessenkool - PR optimization/7153 - * regmove.c (optimize_reg_copy_3): Don't optimize if the register - dies in more than one insn. + * 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. -2002-07-15 Jason Thorpe +2003-01-15 Alexandre Oliva - * config/sparc/netbsd-elf.h (TRANSFER_FROM_TRAMPOLINE): Remove. + * configure.in (libgcc_visibility): Force disabled on IRIX 6 too. + * configure: Rebuilt. -2002-07-15 John David Anglin + * config/mips/mips.h (CRT_CALL_STATIC_FUNCTION): Define so as + to set $gp before the call. - * 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. +2003-01-10 Andrew Haley -2002-07-15 Jakub Jelinek + * config/i386/linux64.h (MD_FALLBACK_FRAME_STATE_FOR): Rename + registers to be in correct order. Add rip. - 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. +2003-01-14 Denis Chertykov -2002-06-11 Andreas Schwab + * config/ip2k/ip2k.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove. + (VALID_MACHINE_TYPE_ATTRIBUTE): Remove. - * config/m68k/m68k.h (PREDICATE_CODES): Define. + * 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. -2002-07-15 Alan Modra +2003-01-14 Eric Botcazou - PR target/7282 - * config/rs6000/rs6000.md (floatsidf2): Enable for POWERPC64. - (floatunssidf2): Likewise. - (floatsidf_ppc64): New insn_and_split. - (floatunssidf_ppc64): Likewise. + PR target/8870, PR target/9195 -2002-07-12 Stephane Carrez + Backport from mainline: - * 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. + 2003-01-10 Richard Henderson -2002-07-12 Marek Michalkiewicz + * combine.c (make_compound_operation): Use SCALAR_INT_MODE_P, + not INTEGRAL_MODE_P when widening extensions. - * 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. +2003-01-13 Alexandre Oliva -2002-07-11 John David Anglin + * 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. - * 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. +2003-01-12 Kaveh R. Ghazi -2002-07-05 Stephane Carrez + * unwind-dw2-fde.h (last_fde): Mark parameter with __attribute__ + ((__unused__)). - * 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). +2003-01-12 Alan Modra -2002-07-05 Stephane Carrez + * expr.c (expand_expr ): Correct recursive call args. - * config/m68hc11/m68hc11.md ("*ashlsi3"): Avoid saving y if we know - it is dead. - ("*ashrsi3"): Likewise. - ("*lshrsi3"): Likewise. +2003-01-11 Jan Hubicka -2002-07-05 Stephane Carrez + PR target/9068 + * i386.c (output_fp_compare): Fix typo - * config/m68hc11/m68hc11.md (peephole2): New peephole2 to optimize - address computation and memory moves. +2003-01-10 Josef Zlomek -2002-07-03 Mark Mitchell + * 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. - PR c++/6706 - * dwarfout.c (output_reg_number): Fix warning message. - (output_bound_representation): Check SAVE_EXPR_RTL is not NULL - before using it. +2003-01-08 Jan Hubicka -2002-07-03 Richard Henderson + PR target/8213 + * i386.c (ix86_expand_int_movcc): Fix RTL sharing problem. - * config/i386/i386.md (prologue_get_pc): Issue pop here ... - * config/i386/i386.c (load_pic_register): ... not here. +2003-01-09 Kazu Hirata -2002-07-03 David Edelsohn + * 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. - * 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. +2003-01-09 Josef Zlomek -2002-07-02 Hans-Peter Nilsson + * 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. - PR target/7177 - * config/cris/cris.h (LEGITIMIZE_RELOAD_ADDRESS): Correct number - of indirections for register inside sign-extended mem part. +2003-01-09 Josef Zlomek -2002-07-01 John David Anglin + * Makefile.in (PARTITION_H): New. + (BASIC_BLOCK_H): Added hard-reg-set.h and $(PARTITION_H). + * basic-block.h: Include hard-reg-set.h. - * emit-rtl.c (init_emit_once): Add missing cast to HOST_WIDE_INT. +2003-01-09 Eric Botcazou -2002-06-30 David Edelsohn + 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. - * config/rs6000/rs6000.md (ctrdi): Allocate pseudo for FPR - constraint in define_expand, not splitter. +2003-01-09 Eric Botcazou -2002-06-28 Phil Edwards + 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. - * configure.in (gcc_gxx_include_dir): Change to match versioned - C++ headers if --enable-version-specific-runtime-libs is used. - * configure: Regenerate. +2003-01-09 Kaz Kojima -2002-06-28 Stephane Carrez + * 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. - * 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. +2003-01-09 Andreas Jaeger -2002-06-28 Stephane Carrez + * unwind-dw2-fde.h (last_fde): Revert last patch. - * 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. +2003-01-08 Danny Smith -2002-06-28 Stephane Carrez + PR optimization/8750 + * config/i386/i386.c (ix86_expand_prologue): Don't allow + scheduling pass to move insns across __alloca call. - * 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. +2003-01-08 Jeff Sturm -2002-06-28 Stephane Carrez + PR target/9210 + * config/rs6000/rs6000.c (rs6000_elf_encode_section_info): + Set SYMBOL_REF_FLAG on local data sym_ref. - * config/m68hc11/m68hc11.c (register_indirect_p): For 68HC12 a constant - can be a valid address. +2003-01-08 Jan Hubicka -2002-06-28 Bob Wilson + PR target/8322 + * i386.c (ix86_init_mmx_sse_builtins): Constify arguments of loads. + * xmmintrin.h (_mm_load*_si128. _mm_store*_si128): Add casts. - * 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. + PR target/7782 + * reload1.c (delete_output_reload): Avoid repeated attempts + to delete insn. -2002-06-28 Bob Wilson + * 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. - * config/xtensa/xtensa.h (FUNCTION_PROFILER): Respect flag_pic - when generating the call to _mcount. - (NO_PROFILE_COUNTERS): Define. +2003-01-07 Janis Johnson -2001-06-08 Bernd Schmidt + PR other/8947 + * doc/invoke.texi (-malign-double): Explain that the option breaks + binary compatibility. - * emit-rtl.c (gen_lowpart_common): Don't create paradoxical FLOAT_MODE - subregs. - * recog.c (general_operand, register_operand): Disallow them. +2003-01-07 Richard Henderson -2002-06-27 Bob Wilson + * alias.c (find_base_value): Only use new_reg_base_value shortcut + if the register is set once. - * config/xtensa/xtensa.h (ASM_OUTPUT_POOL_PROLOGUE): Pass - flag_function_sections as new 3rd arg to resolve_unique_section. +2003-01-07 Sylvain Pion -2002-06-27 Neil Booth + * 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. - PR preprocessor/7070 - * c-lex.c (cb_def_pragma): Don't try to spell CPP_EOF. +2003-01-07 Benjamin Kosnik + Sunil Davasam -2002-06-27 Gerald Pfeifer + PR libstdc++/9076 + * unwind-dw2.c (execute_cfa_program): DW_CFA_undefined, + DW_CFA_same_value, read next and ignore. - * doc/install.texi (Binaries): Add Sinix/Reliant Unix. Move - Hitachi entry. Make punctuation more consistent. +2003-01-07 Richard Henderson -2002-06-27 Matt Kraai + * cfganal.c (flow_call_edges_add): Don't crash on noreturn call. - * doc/install.texi: Change ` bit' to `-bit'. - * doc/md.texi: Change `-bits' to `-bit'. - * doc/tm.texi: Change `-bits' to ` bits'. +2003-01-06 Aldy Hernandez -2002-06-24 David S. Miller + Segher Boessenkool - * config/sparc/sparc.h (INIT_TARGET_OPTABS): If ARCH64, set the - 32-bit ABI libfuncs to NULL. + * 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. - * expmed.c (expand_divmod): Do not set optab1/optab2 to the shift - optabs if op1 is const0_rtx. +2003-01-06 Bruce Korb -2002-06-23 Jan Hubicka + * fixinc/fixfixes.c(wrap_fix): the wrapper guard must be a function + of *both* the file name and the fix name. - * reg-stack.c (convert_regs_exit): Push the registers to stack in - proper order. +2003-01-06 Richard Henderson -2002-06-22 Ulrich Weigand + * 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. - 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. +2003-01-05 Andreas Jaeger -2002-06-22 David S. Miller + * unwind-dw2-fde.h (last_fde): Add unused attribute for obj. - 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. +2003-01-05 John David Anglin -2002-06-21 Rainer Orth + * 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. - * 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. +2003-01-04 John David Anglin -2002-06-21 Bo Thorsen + * 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. - * 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. +2003-01-02 Eric Christopher -Thu Jun 20 16:41:40 CEST 2002 Jan Hubicka + * config/mips/mips.md (movdf_internal2): Fix constraints. - * combine.c (gen_lowpart_for_combine): Avoid calling of - simplify_gen_subreg on VOIDmode. +2003-01-03 Gerald Pfeifer - * combine.c (subst): Be prepared for simplify_subreg to return VOIDmode. + * doc/install.texi (Configuration): Fix markup for reference to + gcc/config.gcc. -2002-06-20 Richard Henderson +2003-01-02 Kazu Hirata - * 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. + * 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. -2002-06-17 Hans-Peter Nilsson +2003-01-02 Neil Booth - 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. + * gccbug.in: Update for new categories. -2002-06-17 Richard Henderson +2002-12-31 Tom Tromey - * config/i386/i386.h (BIGGEST_FIELD_ALIGNMENT): Define instead - of ADJUST_FIELD_ALIGN if IN_TARGET_LIBS. + * doc/install.texi (Testing): Fixed typo. -2002-06-17 Richard Henderson +2002-12-31 Jerry Quinn - PR target/6922 - * expmed.c (make_tree): Handle SIGN_EXTEND/ZERO_EXTEND. + * gcc/doc/invoke.texi (Optimization Options): Clean up -O flag + descriptions. -Mon Jun 17 00:31:46 CEST 2002 Jan Hubicka +2002-12-31 Jerry Quinn - * i386-protos.h (x86_field_alignment): Declare. - * i386.c (x86_field_alignment): Define. - * i386.h (ADJUST_FIELD_ALIGNMENT): New. - (BIGGEST_FIELD_ALIGNMENT): Kill. + * gcc/doc/invoke.texi (Optimization Options): List the options + enabled by each -O flag. -2002-06-16 Richard Henderson +2002-12-31 David Edelsohn - PR opt/6722 - * regclass.c (globalize_reg): Update regs_invalidated_by_call. + * config/rs6000/rs6000.h (WIDEST_HARDWARE_FP_SIZE): Define. -2002-06-16 Richard Henderson +2002-12-31 Gerald Pfeifer - PR c/7030 - * dwarf2out.c (modified_type_die): Don't assign the qualified die - to the unqualified type. + * doc/install.texi (Configuration): Explicitly refer + gcc/config.gcc for a list of cpu models. -2002-06-14 Jeff Sturm +2002-12-30 Joseph S. Myers - * config/sparc/sparc.h (DYNAMIC_CHAIN_ADDRESS): Add - SPARC_STACK_BIAS. + * doc/gcc.texi, doc/gccint.texi: Update last modification dates. -2002-06-14 Eric Botcazou +2002-12-30 Tom Tromey - * 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. + * doc/install.texi (Testing): Mention Jacks. -2002-06-14 Eric Botcazou +2002-12-30 Joseph S. Myers - 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. + * doc/service.texi: Uncomment and update FAQ link. -Thu Jun 13 18:27:05 CEST 2002 Jan Hubicka +2002-12-28 Joseph S. Myers - * i386.c (ix86_expand_movstr): Fix pasto. + * doc/cpp.texi, doc/gcc.texi, doc/gccint.texi, doc/install.texi: + Use @copying. -Thu Jun 13 18:02:11 CEST 2002 Jan Hubicka +2002-12-28 Joseph S. Myers - * reload.c (find_valid_class): Fix thinko in my previous patch. + * configure.in: Increase makeinfo version requirement to 4.[2-9]. + * configure: Regenerate. + * doc/install.texi: Update Texinfo version requirement. -2002-06-13 Hans-Peter Nilsson +2002-12-27 Joseph S. Myers - PR target/6997 - * config/cris/cris.md ("sleu"): Set attribute "cc" to "none". + * doc/include/texinfo.tex: Update to version 2002-12-26.16. -2002-06-12 Daniel Jacobowitz +2002-12-26 Joseph S. Myers - * 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. + * doc/standards.texi, doc/invoke.texi: Point to 3.3 version of + c99status.html. -2002-06-11 Ulrich Weigand +2002-12-26 Kazu Hirata - * config/s390/s390.md (movsi): Only use floating point - register alternatives when operands are already fprs. - (movdi_31, movdi_64): Likewise. + * config/h8300/h8300.h (IDENT_ASM_OP): End with a tab. -2002-06-11 Ulrich Weigand +2002-12-23 Larin Hennessy - * 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. + * 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. - * 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. +2002-12-23 Aldy Hernandez - * 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. + PR/8763 + * config/rs6000/altivec.md (mulv4sf3): Rewrite to add -0.0 vector. + (altivec_vspltisw_v4sf): Name pattern. + (altivec_vslw_v4sf): New pattern. - * 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. +2002-12-23 Joseph S. Myers - * 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. + * doc/include/gcc-common.texi: Clear DEVELOPMENT. -2002-06-10 Jakub Jelinek +2002-12-23 David Edelsohn - PR optimization/6759 - * cse.c (cse_insn): Fold src_eqv just once, store it folded back into - the REQ_EQUAL note. + PR middle-end/8784 + * expr.c (expand_assignment): Apply special treatment to + ARRAY_TYPE. -2002-06-10 Jakub Jelinek +2002-12-21 Kazu Hirata - PR c/6660 - * c-decl.c (grokfield): Allow user defined types if they declare - structs or unions for unnamed fields. + * config/h8300/h8300.md (zero_extendqisi2): Correct the + length. -2002-06-10 Jakub Jelinek +2002-12-19 Devang Patel - PR c/6809 - * print-rtl.c (print_mem_expr): Don't crash on unnamed fields. + * 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-06-10 Jakub Jelinek +2002-12-19 Kazu Hirata - * varasm.c (const_hash): Handle FDESC_EXPR like ADDR_EXPR. - (compare_constant): Likewise. - (output_addressed_constants): Likewise. + * config/h8300/h8300.md (pushqi_h8300): Don't push the stack + pointer. + (pushqi_h8300hs): Likewise. + (pushhi_h8300): Likewise. + (pushhi_h8300hs): Likewise. -2002-06-10 Jakub Jelinek +2002-12-19 Eric Botcazou - * cfgcleanup.c (try_optimize_cfg): Make sure merge_blocks doesn't - merge bb with itself. + PR optimization/8988 + * loop.c (maybe_eliminate_biv): Kill REG_EQUAL notes mentioning + the biv when eliminating. -2002-06-07 Jason Thorpe +2002-12-19 Aldy Hernandez - * config.gcc (mips*-*-netbsd*): Add mips/t-netbsd to ${tmake_file}. - * config/mips/t-netbsd: New file. + 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-06-07 H.J. Lu (hjl@gnu.org) +2002-12-19 Ulrich Weigand - * configure.in: Add --enable-__cxa_atexit. - * configure: Regenerated. - * config.in: Likewise. + * config/s390/s390.md ("*tsthiCCT", "*tsthiCCT_cconly", + "*tstqiCCT", "*tstqiCCT_cconly"): New insns. - * defaults.h (DEFAULT_USE_CXA_ATEXIT): New. Defined to be 0 if - not defined. +2002-12-18 Aldy Hernandez -2002-06-07 Jason Thorpe + * config/rs6000/altivec.h (vec_cmplt macro): Reverse arguments in + macro. + (vec_cmplt C++ functions): Reverse arguments. - * config/mips/netbsd.h (CACHE_FLUSH_FUNC): Define. +2002-12-17 Kazu Hirata -Thu Jun 6 07:17:43 2002 Nicola Pero + * doc/c-tree.texi: Restore deliberate spelling mistakes. - 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-12-17 Kazu Hirata -2002-06-05 Jeff Law + * 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. - * 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-12-17 Jerry Quinn -2002-06-05 Alan Modra + * doc/invoke.texi: Minor spelling and grammar fixes. - * config/rs6000/linux64.h (ASM_OUTPUT_SOURCE_LINE): Define. +2002-12-16 Mark Mitchell -Tue Jun 4 18:16:50 CEST 2002 Jan Hubicka + * version.c (version_string): Mark as prerelease. - * dwarf2out.c (expand_builtin_init_dwarf_reg_sizes): Do not initialize - fields past the register table. +2002-12-13 John David Anglin - * i386.c (classify_argument): Properly handle base classes. + * pa.c (output_millicode_call): Correct typo. + (output_call): Likewise. -Tue Jun 4 13:09:18 CEST 2002 Jan Hubicka +2002-12-13 Alexandre Oliva - * loop.c (emit_prefetch_instructions): Properly place the address - computation. + * 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. - * dwarf2out.c (output_call_frame_info): Do not skip unwind info - when flag_asynchronous_unwind_tables is set. +2002-12-13 J"orn Rennecke - * 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. + * 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. - * config/i386/i386.c (ix86_expand_int_movcc): Truncate to proper - mode. +2002-12-13 Jim Wilson - * i386.md (movabsdi): Kill broken alternative. + * doc/extend.texi (Complex Numbers): Update info on debug info. - * i386.c (dbx64_register_map): Fix typo +2002-12-13 Kazu Hirata -2002-06-03 Jason Thorpe + * config/h8300/h8300.md (addhi3_h8300): Remove the last + alternative. - * config/rs6000/netbsd.h (DRAFT_V4_STRUCT_RET): Remove. +2002-12-12 Devang Patel -2002-05-31 John David Anglin + * doc/invoke.texi: Document Darwin linker options, -bundle + -bind_at_load, -all_load and -arch_errors_fatal - * pa-linux.h (WCHAR_UNSIGNED): Define to 0. - * pa.h (WCHAR_UNSIGNED): Define to 1. +2002-12-12 Jim Wilson -2002-05-31 John David Anglin + * dbxout.c (dbxout_fptype_value): New. + (dbxout_type, case COMPLEX_TYPE): Call it. Use 'R' instead of 'r'. - * pa.c (output_millicode_call): Correct "be,l" insn for TARGET_PA_20. - (output_call): Likewise. +2002-12-12 Kazu Hirata -2002-05-30 Richard Henderson - Eric Botcazou + * 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. - 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-12-12 Kazu Hirata -2002-05-30 Marc Espie + * config/h8300/h8300.md: Add a new peephole2. - * config.gcc (sparc64-*-openbsd*): New. - * config/sparc/openbsd1-64.h: New. - * config/sparc/openbsd64.h: New. +2002-12-12 Kazu Hirata -2002-05-30 Jason Thorpe + * config/h8300/h8300.md (a peephole2): Accept a constant + that's accepted by CONST_OK_FOR_J. - * config/m68k/netbsd-elf.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Set to - 96 if not __mc68010__. +2002-12-12 Kazu Hirata -2002-05-30 Andreas Schwab + * 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. - * config/ia64/sysv4.h (DO_SELECT_SECTION): Also handle - FUNCTION_DECLs. +2002-12-12 J"orn Rennecke -2002-05-30 Jason Thorpe + * 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. - * 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-12-12 Andreas Schwab -2002-05-29 Hans-Peter Nilsson + * config/ia64/ia64.c (ia64_hpux_asm_file_end): Fix typo in last + change and some warnings. - * doc/md.texi (Patterns): Note pattern condition pitfall - for unnamed insn. +2002-12-12 Kazu Hirata -2002-05-29 Jason Thorpe + * doc/md.texi (pushm): Fix a typo. - * 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-12-12 Alexandre Oliva -2002-05-29 Jason Thorpe + * 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. - * config.gcc (alpha-*-netbsd*): Don't use crtstuff. +2002-12-11 John David Anglin -2002-05-29 Jason Thorpe + * 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. - * config/alpha/netbsd.h (CPP_PREDEFINES): Add -D_LP64. +2002-12-11 Kazu Hirata -2002-05-29 Richard Henderson + * doc/invoke.texi: Correct dump file names. - * config/i386/i386.c (ix86_compute_frame_layout): Do add bottom - alignment for alloca. +2002-12-09 Steve Ellcey -2002-05-29 Neil Booth + * config/ia64/ia64.c (ia64_hpux_asm_file_end): Don't send stripped + name to globalize_label or assemble_name. - PR preprocessor/6844 - * cppmacro.c (cpp_macro_definition): Reserve space for terminating - NUL. +2002-12-11 J"orn Rennecke -2002-05-29 Joel Sherrill + * sh.h (REG_CLASS_HAS_GENERAL_REG): Only true for SIBCALL_REGS + if not TARGET_SHMEDIA. - * config/rs6000/rs6000.h (ASM_CPU_SPEC): Use -m403 and -m405. +2002-12-11 J"orn Rennecke -2002-05-29 Hans-Peter Nilsson + * 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. - 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. + * sh.c (sh_expand_builtin): Abort for unexpected nop values. + (sh_adjust_cost): Always return a value. -2002-05-29 Ulrich Weigand +2002-12-11 J"orn Rennecke - * 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. + * sh.h (REG_CLASS_HAS_GENERAL_REG): New. + (REGISTER_MOVE_COST): Use it. -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-12-11 Richard Henderson -2002-05-28 Danny Smith + * tree.h (MODULE_LOCAL_P): Kill. + * varasm.c (default_binds_local_p_1): Use decl_visibility instead. - * doc/install.texi (binaries): Change mingw binaries - link to www.mingw.org. +2002-12-11 Kazu Hirata -2002-05-28 Richard Henderson + * config/h8300/h8300.md (two define_peephole2): New. - * config/i386/i386.c (ix86_compute_frame_layout): Do not add - bottom alignment for leaf functions. +2002-12-11 Kazu Hirata -Mon May 27 10:37:28 CEST 2002 Jan Hubicka + * 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. - * reload.c (find_valid_class): Accept new argument DEST, - choose class accordingly. - (push_reload): Update callers. +2002-12-11 Neil Booth -2002-05-26 Richard Henderson + * c-common.c (builtin_define_type_max): Handle unsigned + types too. - 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-12-10 Janis Johnson - 2002-05-15 Richard Henderson - * varasm.c (merge_weak): Remove special case for extern and common. + PR other/8882 + * doc/tm.texi (PUSH_ARGS): Remove misplaced line. - 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-12-10 Devang Patel - 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. + * config/darwin.h(LINK_SPEC): Add darwin specific linker options. + * doc/invoke.texi: Add new "Darwin Options" section. -2002-05-26 Jakub Jelinek +2002-12-10 Jim Wilson - * cse.c (fold_rtx): Don't optimize if SUBREG changes mode class. + * rs6000.h (RETURN_IN_MEMORY): If ABI_V4, then TFmode is returned in + memory. -2002-05-25 Richard Henderson +2002-12-10 Andrew Haley - 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. + * cse.c (cse_insn): Don't cse past a basic block boundary. -2002-05-25 Marek Michalkiewicz +2002-12-10 Jakub Jelinek - * config/avr/avr.c (avr_handle_progmem_attribute): Handle TYPE_DECL. + * 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. - * config/avr/avr.c (machine_dependent_reorg): Sign extend the - CONST_INT operand to the correct mode after adding 1 to it. +2002-12-09 Larin Hennessy -2002-05-24 Roman Lechtchinsky + * doc/invoke.texi: Document UltraSparc III option. - * config/alpha/unicosmk.h (REAL_VALUE_TO_TARGET_SINGLE, - REAL_VALUE_TO_TARGET_DOUBLE): Define for native builds. +2002-12-09 Richard Henderson -2002-05-24 Jakub Jelinek + * config/i386/i386.h (TARGET_CPU_CPP_BUILTINS): Define + __tune_pentium2__ and __tune_pentium3__ as necessary. - PR other/6782 - * final.c (get_mem_expr_from_op): Return 0 if op is NULL. +2002-12-09 Richard Henderson -2002-05-24 David Edelsohn + * 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/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. + * 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-05-24 Richard Henderson +2002-12-09 Jan Hubicka - * varasm.c (asm_output_bss): Always output one byte. - * config/alpha/elf.h (ASM_OUTPUT_ALIGNED_LOCAL): Likewise. + * toplev.c (dump_file): Fix order to match reality. -2002-05-24 Neil Booth +2002-12-08 Geoffrey Keating - PR preprocessor/6780 - * cppmacro.c (enter_macro_context): Clear state.angled_headers. + * config/rs6000/rs6000.md (load_multiple): Use adjust_address_nv. + (store_multiple): Likewise. -2002-05-21 Richard Earnshaw +2002-12-09 John David Anglin - * bitmap.c (bitmap_find_bit): Return early if we have the correct - element cached. + * pa/fptr.c (__canonicalize_funcptr_for_compare): Don't canonicalize + function pointers in page 0. -2002-05-24 Neil Booth +2002-12-09 Steve Ellcey - * 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. + * 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-05-20 David S. Miller +2002-12-09 Steve Ellcey - * 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. + * 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-05-24 Alan Modra +2002-12-09 Svein E. Seldal - * config/rs6000/rs6000.c (output_toc): Mask longs to 32 bits. + * config.gcc: Added tic4x-* target as an alias to c4x-* -2002-05-23 Hans Boehm - * config/ia64/linux.h (IA64_GATE_AREA_END): Adjust for 64K - pages. +2002-12-08 Jan Hubicka -2002-05-23 Neil Booth + * i386.c (ix86_expand_int_movcc): Use force_operand instead of + constructing insn directly. - 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-12-07 Kazu Hirata -2002-05-23 Jakub Jelinek + * config/h8300/h8300.md (*iorhi_shift_8): New. - 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-12-06 Bernd Schmidt -2002-05-23 Jakub Jelinek + * doc/invoke.texi: Document FRV port options. + * doc/md.texi: Document FRV register classes. - PR c/6643 - * emit-rtl.c (widen_memory_access): Only call compare_tree_int - if DECL_SIZE_UNIT is INTEGER_CST. +2002-12-07 Gerald Pfeifer -2002-05-23 Jakub Jelinek + * doc/install.texi (Configuration): Improve description of cases + where `make distclean` may fail; clarify --with-gnu-as; fix grammar. - * combine.c (force_to_mode): Use gen_int_mode. - Don't clear CONST_INT bits outside of mode. +2002-12-06 Dhananjay Deshpande -2002-05-23 Jakub Jelinek + * 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. - * configure.in: Fix as version test for binutils 2.12.1 releases - (without dates). - * configure: Rebuilt. +2002-12-06 J"orn Rennecke -Wed May 22 14:16:07 CEST 2002 Jan Hubicka + * sh.c (dump_table): DImode pool constants need only 32 bit alignment. + DFmode alignment depends on TARGET_FMOVD && TARGET_ALIGN_DOUBLE. - * i386.c (expand_movstr, expand_clrstr): Fix inline-all-stringops - sequence. - (ix86_expand_clrstr): Fix typo. +2002-12-06 J"orn Rennecke -2002-05-22 Duraid Madina + * sh.md (movdi_i): Name. Remove inappropriate comment. - * tradcpp.c (fixup_newlines): Use old-style function header. +2002-12-06 J"orn Rennecke + Merged from basic improvements branch (excerpt): -2002-05-21 Richard Henderson + 2002-11-19 Kaz Kojima + * config/sh/sh.h (SH_DBX_REGISTER_NUMBER): Handle PR_MEDIA_REG. - * system.h (BLOCK_PROFILER, BLOCK_PROFILER_CODE, - FUNCTION_BLOCK_PROFILER, FUNCTION_BLOCK_PROFILER_EXIT, - MACHINE_STATE_SAVE, MACHINE_STATE_RESTORE): Poison. +2002-12-06 Jakub Jelinek - * toplev.c (display_help): Kill -a -ax help. + * expr.c (expand_expr) : Never modify exp in place. - * 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. +2002-12-05 John David Anglin - * libgcc2.c [L_bb] (BLOCK_PROFILER_CODE): Kill. - * config/m68k/sun3.h (BLOCK_PROFILER_CODE): Kill. + * pa32-linux.h (CANONICALIZE_FUNCPTR_FOR_COMPARE_LIBCALL): Move define. + * pa.h (CANONICALIZE_FUNCPTR_FOR_COMPARE_LIBCALL): To here. - * 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-12-05 Dale Johannesen -2002-05-21 NIIBE Yutaka + * tree.c (unsafe_for_reeval): Consider callee child of CALL_EXPR. - * reload1.c (do_output_reload): Run delete_output_reload - only if optimizing. +2002-12-05 Danny Smith -2002-05-20 Richard Henderson + * config/i386/cygwin.h (SUBTARGET_PROLOGUE): Replace with + PROFILE_HOOK. + * config/i386/mingw32.h (SUBTARGET_PROLOGUE): Don't undef. - * cse.c (canon_hash): Reorder do_not_record test. Always - allow pic_offset_table_rtx. +2002-12-05 Aldy Hernandez -2002-05-19 Neil Booth + * config/rs6000/spe.h (__ev_mwlufi): Remove. + (__ev_mwlufia): Remove. + (__ev_mwlumfaaw): Remove. + (__ev_mwlusfaaw): Remove. + (__ev_mwlumfanw): Remove. + (__ev_mwlusfanw): Remove. - * doc/contrib.texi: Update my entry. +2002-12-05 Kazu Hirata -2002-05-19 Kaveh R. Ghazi + * config/h8300/h8300.md (*andorsi3_shift_8): New. - * mips/iris6.h (CPLUSPLUS_CPP_SPEC): Define. +2002-12-05 Kazu Hirata -2002-05-19 Marek Michalkiewicz + * 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-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-12-04 Kazu Hirata -2002-03-19 Lars Brinkhoff + * config/h8300/h8300.c (h8300_init_once): Do not use loop to + implement ashiftrt:HI by 13 bits on H8S. - * emit-rtl.c (gen_int_mode): New function. - * rtl.h: Prototype for it. +2002-12-04 John David Anglin -Sat May 18 23:09:19 CEST 2002 Jan Hubicka + * 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. - * i386.md (pushqi2, ashrqi_*): Fix constraint. +2002-12-04 Geoffrey Keating -2002-05-18 Aldy Hernandez + * 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. - * config/rs6000/altivec.h: Cleanups. +2002-12-04 Kazu Hirata -2002-05-17 Rainer Orth + * config/h8300/h8300.c: Update the comments related to shifts. - * doc/install.texi (Specific, mips-sgi-irix6): Document need to - bootstrap with -mips3. +2002-12-04 Chris Demetriou -2002-05-17 David S. Miller + * config/mips/mips.md (get_fnaddr): Correct length attribute. - 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-12-04 Kazu Hirata -2002-05-17 Kurt Wall + * config/h8300/h8300.md (*extzv_8_8): New. + (*extzv_8_16): Likewise. - * doc/install.texi (Testing): Mention two common DejaGnu warnings - that can be ignored. +2002-12-04 Jason Merrill -2002-05-16 Gerald Pfeifer + PR c++/8461, c++/8625 + * integrate.c (copy_decl_for_inlining): Handle explicit invisible + references. + * tree-inline.c (initialize_inlined_parameters): Likewise. - * doc/install.texi (Final install): Recommend to install into a - "clean" target directory. + * tree.c (variably_modified_type_p): Just return an error_mark_node. -2002-05-17 Andreas Schwab +2002-12-04 Chris Demetriou - * config/ia64/sysv4.h (DO_SELECT_SECTION): Factored out of - SELECT_SECTION. - (UNIQUE_SECTION): Define to get small data correctly. + * config/mips/mips.md (get_fnaddr): Avoid placing an "la" + macro instruction in a branch delay slot, to avoid assembler + warnings. - * 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-12-04 Eric Botcazou -2002-05-15 Eric Botcazou + PR c/7622 + * c-semantics (genrtl_scope_stmt): Do not output inlined + nested functions that contain no code. - * 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-12-04 Jan Hubicka -2002-05-16 Richard Henderson + * cfgrtl.c (force_nonfallthru_and_redirect): Allow abnormal edge + to be forced into nonfallthru. - PR c/3467 - * c-decl.c (grokdeclarator): Don't pedwarn variable sized arrays - for c99. +2002-12-03 Jason Thorpe -2002-05-16 Mark Mitchell + * config/t-netbsd (USER_H): Set to $(EXTRA_HEADERS). - * cfgrtl.c (purge_dead_edges): Correct handling of EDGE_EH. +2002-12-03 Aldy Hernandez -2002-05-09 David S. Miller + * config/rs6000/spe.md (*movv1di_const0): New pattern. - * config/sparc/sol2.h (ASM_CPU_SPEC): Handle -mcpu=v9. +2002-12-03 Richard Henderson -2002-05-07 David S. Miller + * libgcc-std.ver: Inherit GCC_3.3 from GCC_3.0. - 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. +2002-12-03 Hans-Peter Nilsson -Wed May 15 10:38:27 CEST 2002 Jan Hubicka + * bitmap.c (bitmap_ior_and_compl, bitmap_union_of_diff): + Initialize tmp.using_obstack to 0. - * invoke.texi (-malign-double): Re-add lost warning. +2002-12-03 Andreas Schwab -2002-05-14 Gerald Pfeifer + * 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. - * doc/install.texi: Remove special markup originally required for - HTML generation with texi2html. +2002-12-03 Kazu Hirata -2002-05-14 Gerald Pfeifer + * config/h8300/h8300.c (single_one_operand): Fix a warning. + (single_zero_operand): Likewise. - * 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-12-02 Kazu Hirata -2002-05-08 Jason Merrill + * config/h8300/h8300.c (dosize): Replace argument op with + sign. + (h8300_output_function_prologue): Update the call to dosize. + (h8300_output_function_epilogue): Likewise. - PR c++/6381 - * dwarf2out.c (rtl_for_decl_location): Only expand INTEGER_CST and - REAL_CST. +2002-12-02 Bob Wilson -2002-05-14 Release Manager + * config/xtensa/xtensa.h: Delete ifndefs with nothing inside them. - * GCC 3.1 Released. +2002-12-02 Craig Rodrigues -2002-05-10 Rainer Orth + * configure.in: Use "missing" script to generate warning if + flex or bison programs not found, instead of invoking "false". + * configure: Rebuilt. - * config/mips/t-iris6 (SHLIB_SLIBDIR_SUFFIXES): Use mabi=64 and - . as N64/N32 libgcc_s.so subdirs. +2002-12-02 Jan Hubicka -2002-05-09 Mark Mitchell + * unroll.c (copy_loop_body): Copy CONST_OR_PURE_CALL_P. - * config/rs6000/rs6000.h: Revert previous patch. +2002-12-02 Jan Hubicka -2002-05-09 Joel Sherrill + * i386.c (ix86_expand_int_movcc): Avoid overflow. - * config/rs6000/rs6000.h CPP_CPU_SPEC): Correct - 403 and 405 arguments for binutils 2.12. +2002-12-02 Kazu Hirata -Thu May 9 12:21:48 2002 Jeffrey A Law (law@redhat.com) + * 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. - * pa.c (hppa_profile_hook): Use force_reg to get the address - of the profile hook into an appropriate pseudo register. +2002-12-02 J"orn Rennecke -2002-05-09 Jakub Jelinek + * expmed.c (store_bit_field): Use int_mode_for_mode to find + corresponding mode of non-integer mode, unless it is VOIDmode. - * mklibgcc.in: Set shlib_slibdir_qual to empty string if - SHLIB_SLIBDIR_SUFFIXES is empty. +2002-12-02 Kazu Hirata -2002-05-09 Rainer Orth + * config/h8300/h8300.md (stm_h8300s_2): New. + (stm_h8300s_3): Likewise. + (stm_h8300s_4): Likewise. + (five define_peephole2): Likewise. - * config/mips/t-iris6 (SHLIB_SLIBDIR_SUFFIXES): Define. - (SHLIB_LINK, SHLIB_INSTALL): Adjust. +2002-12-02 Kazu Hirata -2002-05-09 Jakub Jelinek + * ra-build.c: Fix a comment typo. - * 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-12-01 Kazu Hirata -2002-05-09 Jakub Jelinek + * config/h8300/h8300.c (h8300_output_function_prologue): + Remove variable idx. + (h8300_output_function_epilogue): Likewise. - 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-12-01 Zack Weinberg -2002-05-08 Mark Mitchell + * config/frv/xm-frv.h: Delete, unnecessary. - PR c/6569. - * varasm.c (mark_weak): New function. - (merge_weak): Use it. Do not call declare_weak. - (declare_weak): Use merge_weak. +2002-12-01 Kazu Hirata -2002-05-07 Geoffrey Keating + * config/h8300/h8300.md: Add comments for define_peephole2. - * configure.in: Don't pass -Wno-long-long to a ADA compiler - that doesn't support it. - * configure: Regenerate. +2002-12-01 Mark Mitchell -2002-05-07 Jason Merrill + * 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. - * dwarf2out.c (rtl_for_decl_location): Don't try to extract a - constant value from DECL_INITIAL. +2002-11-30 John David Anglin -2002-05-07 Richard Henderson + * cfg.c (dump_flow_info): Use max_reg_num () to determine the largest + pseudo register number plus 1. - PR c++/6212 - * expr.c (highest_pow2_factor_for_type): New. - (expand_assignment): Use it. +2002-11-29 Hans-Peter Nilsson -2002-05-07 Jakub Jelinek + * cpplib.c (_cpp_test_assertion): Default *value to 0. - * configure.in: If as or ld segfaults, don't clutter with it stdout. - * configure: Rebuilt. + * cppexp.c (num_part_mul): Initialize result.unsignedp, to 1. -2002-05-05 Jakub Jelinek +2002-11-29 Ulrich Weigand - PR target/6561 - * config/sparc/sparc.md (muldi3_v8plus): Handle %1 equal to %2. + * config/s390/t-crtstuff: New target makefile fragment. + * config.gcc [s390-*-linux, s390x-*-linux]: Use it. -2002-05-05 Franz Sirl +2002-11-29 Kazu Hirata - * doc/install.texi (powerpc-*-linux-gnu*): Update build requirements. + * 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-05-04 David Edelsohn +2002-11-29 Kazu Hirata - PR c/6543 - * config/rs6000/rs6000.md (sCC pattern and splitter): Remove - clobber and use result as temporary value. + * 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-05-03 Jakub Jelinek +2002-11-28 Kazu Hirata - 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. + * config/h8300/h8300.c (h8300_eightbit_constant_address_p): + Fix a comment typo. + (h8300_tiny_constant_address_p): Likewise. -2002-05-03 Jakub Jelinek +2002-11-28 Michael Matz - 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. + * doc/passes.texi: Mention the other register allocator. -2002-05-03 Richard Henderson +2002-11-28 Kazu Hirata - 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. + * config/h8300/h8300.md (6 new peephole2 patterns): New. -2002-05-03 Jakub Jelinek +2002-11-28 Jakub Jelinek - PR preprocessor/6489 - * tradcpp.c (fixup_newlines): New. - (main, finclude): Use it. + * 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-05-03 Rainer Orth +2002-11-28 Kazu Hirata - * 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. + * 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-05-02 Jason Merrill +2002-11-27 Zack Weinberg - * 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. + * 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-05-02 Loren J. Rittle +2002-11-27 Kaveh R. Ghazi - * doc/install.texi (*-*-freebsd*): Update to latest status. + * except.c (default_exception_section): Move variable into the + scope where it is used. -2002-05-02 Jakub Jelinek +2002-11-27 Krister Walfridsson - 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. + * config.gcc (*-*-netbsd[2-9]*, *-*-netbsdelf[2-9]*): Test for + correct version. - 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-11-27 Kazu Hirata -2002-05-02 Joseph S. Myers + * config/h8300/h8300.h (OK_FOR_U): Remove extra parentheses. - * doc/install.texi: State GNAT version requirements. +2002-11-27 Kazu Hirata -2002-05-01 Jeff Law + * 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. - * pa.h (EXTRA_CONSTRAINT): Don't accept PIC addresses for the - 'T' constraint. +2002-11-27 Jim Wilson -2002-05-01 Joel Brobecker + * config/rs6000/spe.md (spu_evsplatfi, spu_evsplati): Swap operands + in output template. - * dbxout.c (dbxout_type): Emit size information for range types, - as well, but only when using GDB extensions. +2002-11-27 Casper S. Hornstrup -2002-05-01 Richard Henderson + * 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. - * configure.in (HAVE_GAS_HIDDEN): Replace SPARC feature test with - target-independent gnu binutils date test. +2002-11-27 Richard Henderson -2002-05-01 Jakub Jelinek + * 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. - * 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-11-27 Jan Hubicka -2002-05-01 Zack Weinberg + * builtins.def (DEF_C99_BUILTIN): Fix. - * config.gcc: Correct test of --enable-obsolete. Obsolete all - A29k configurations. - * doc/install.texi: Update to match. +2002-11-26 Andrew Haley -2002-05-01 Franz Sirl + * 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. - PR bootstrap/6514 - * varasm.c (globalize_decl): Compare DECL_ASSEMBLER_NAME to check - for duplicates. Always loop over whole list. +2002-11-26 Hartmut Penner -Wed May 1 10:32:37 2002 Richard Kenner + * config/s390/s390.c (390_output_constant_pool): Set alignment + before label in 64 bit mode, behind otherwise. - * reload.c (find_reloads, case 'p'): Set BADOP to 0. +2002-11-26 Richard Henderson -2002-05-01 Joel Sherrill + * 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. - * config/sparc/t-elf (sparc-rtems, sparc-elf): Build assembly - support routines. +2002-11-26 Kazu Hirata -2002-05-01 Joseph S. Myers + * config/h8300/h8300.c: Adjust spacing. + * config/h8300/h8300.h: Likewise. - * doc/install.texi: Update Texinfo version requirement - documentation. +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-04-30 Richard Henderson +2002-11-26 John David Anglin - * 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. + * 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-04-30 Richard Henderson +2002-11-26 Jason Thorpe - PR opt/6516 - * toplev.c (rest_of_compilation): Don't run cross-jump before - bb-reorder. + * config/t-libc-ok: Fix typo. -2002-04-30 Joel Sherrill +2002-11-26 Jakub Jelinek - * config/arm/rtems-elf.h: Add #undef TARGET_VERSION to prevent warning. + * configure.in: Move AC_CANONICAL_SYSTEM and AC_ARG_PROGRAM back + before AC_PROG_CC. + * configure: Rebuilt. -2002-04-30 Richard Henderson +2002-11-26 Nathan Sidwell - * 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. + * c-decl.c: (start_struct): Commonize flag setting. -2002-04-30 John David Anglin +2002-11-26 Jason Thorpe - * 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. + * 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-04-30 Janis Johnson +2002-11-26 Hartmut Penner - * 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. + * 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-04-30 Jakub Jelinek +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. - PR c++/6396 - * toplev.c (rest_of_compilation): Only run regrename and copy - propagation if optimizing. + * config/netbsd-elf.h (NETBSD_STARTFILE_SPEC): For -static, use + "%:if-exists-else(crtbeginT%O%s crtbegin%O%s)". -2002-04-30 Gerald Pfeifer +2002-11-25 Jason Thorpe - * doc/contrib.texi (Contributors): Use MIPS instead of Mips and - mips. Add two missing commas. + * 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-04-30 Paolo Carlini +2002-11-25 Kazu Hirata - * doc/contrib.texi (Contributors): Update Paolo Carlini's - and Benjamin Kosnik's entries. + * config/h8300/h8300.md (an anonymous pattern): Relax the + condition for the pattern. -2002-04-29 Franz Sirl +2002-11-25 Aldy Hernandez - * combine.c (find_split_point): Use trunc_int_for_mode. + * config/rs6000/rs6000.h (enum rs6000_builtins): Remove evmwlssf, + evmwlsmf, evmwlssfa, evmwlsmfa, evmwlssfaaw, evmwlsmfaaw, + evmwlssfanw, evmwlsmfanw. -Mon Apr 29 17:19:10 2002 Richard Kenner + * config/rs6000/rs6000.c (bdesc_2arg): Same. - * reload1.c (eliminate_regs, case SUBREG): Fix typo in - adjust_address_nv call. + * config/rs6000/spe.md: Same for patterns. -2002-04-29 Janis Johnson +2002-11-25 Christian Ehrhardt - * doc/install.texi (Testing): Provide additional information, and - a stronger encouragement, for running the testsuites. + PR c/8639 + * fold-const.c (extract_muldiv): Don't propagate division unless + both arguments are multiples of C. -2002-04-29 Rainer Orth +2002-11-25 Andrew Haley - * fixinc/inclhack.def (solaris_widec): Include in - Solaris 2 if missing. - * fixinc/fixincl.x: Regenerate. - * fixinc/tests/base/widec.h: New file. + * 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-04-29 Jakub Jelinek +2002-11-24 Kazu Hirata - PR target/6476 - * configure.in: Check whether linker eh_frame optimizations work - properly. - * configure: Rebuilt. + * config/h8300/h8300.c (h8300_init_once): Fix a typo in the + target help message. -Mon Apr 29 17:08:09 CEST 2002 Jan Hubicka +2002-11-24 Jason Thorpe - * i386.c (dbx64_register_map): Fix typo. + * 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". -Mon Apr 29 14:48:33 CEST 2002 Jan Hubicka +2002-11-24 Jason Thorpe - * i386.md (sse_mov?fcc*): Revert patch of Apr 18th. + * 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-04-29 Gerald Pfeifer +2002-11-24 Jason Thorpe - * 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. + * 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-04-29 Alexandre Oliva +2002-11-24 Andreas Schwab - * config.gcc: Revert i386 changes inadvertently brought in - from mainline along with 2002-04-04's change. + * Makefile.in (install-driver): Remove versioned link before + trying to create it. -2002-04-28 David S. Miller + * config/m68k/m68k.c: Fix typo in last change defining + TARGET_ASM_CAN_OUTPUT_MI_THUNK. - PR target/6496 - * config/sparc/sparc.md (call followed by jump peephole): Do not - match for TARGET_V9, kill TARGET_ARCH64 variants. +2002-11-23 Kazu Hirata - 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. + * 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-04-27 David S. Miller +2002-11-22 Dale Johannesen - PR target/6494 - * config/sparc/linux64.h (MD_FALLBACK_FRAME_STATE_FOR): Be mindful - of the stack bias. + * toplev.c (rest_of_compilation): Fix comments. - * config/sparc/linux.h, config/sparc/linux64.h: Don't bother - including signal.h and sys/ucontext.h, not needed. +2002-11-22 Geoffrey Keating -2002-04-28 Richard Henderson + * 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. - PR c/5154 - * ggc-common.c (ggc_mark_rtx_children_1): Rename from... - (ggc_mark_rtx_children): New. +2002-11-22 Daniel Jacobowitz -2002-04-28 Franz Sirl + * gcc.c (make_relative_prefix, split_directories) + (free_split_directories): Removed. - PR c/6497 - * config/rs6000/rs6000.md (sCC patterns): Remove clobber and use - result as temporary value. +2002-11-22 Daniel Jacobowitz -2002-04-28 Jakub Jelinek + * configure.in: Set insn=nop for DWARF-2 tests on ARM. + * configure: Regenerated. - 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-11-22 Kazu Hirata -2002-04-28 Bruce Korb + * config/h8300/h8300.c (compute_a_shift_length): Fix the insn + length computation when xor.l is output. - * fixinc/check.tpl (set-writable): verify that it exists before - invoking. +2002-11-21 Jim Wilson -2002-04-28 Franz Sirl + * config/rs6000/rs6000.c (function_arg): Set inner mode of SPE + vectors to SI. - 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-11-21 Bob Wilson -2002-04-25 David S. Miller + * 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. - 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-11-21 Jan Hubicka -2002-04-26 Alexandre Oliva + * 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. - * tree.c (tree_int_cst_lt): Compare constants whose types differ - in unsigned-ness correctly. +2002-11-21 Jason Thorpe -2002-04-26 Chris Demetriou + * config.gcc (arm*-*-netbsdelf*): Enable configuration. + * config/arm/netbsd-elf.h: New file. - * config/mips/mips.h (SUBTARGET_CPP_SIZE_SPEC): Get closer to - correct for MEABI (used by mipsisa32-elf). +2002-11-21 Jason Thorpe -2002-04-26 Mark Mitchell + * 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. - 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-11-21 Nick Clifton -2002-04-26 Ulrich Weigand + * 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. - * config/s390/linux.h: Revert 2002-04-22 change. +2002-11-21 Jason Thorpe -2002-04-26 John David Anglin + * config/arm/elf.h (ASM_SPEC, LINK_SPEC): Pass -EL + if -mlittle-endian is specified. - * pa.h (FUNCTION_OK_FOR_SIBCALL): Don't do sibcalls when using the - portable runtime model. +2002-11-21 Richard Earnshaw -2002-04-26 David Edelsohn - Richard Henderson + PR optimization/2903 + * arm.md (anddi_notzesidi_di): Operand 2 is inverted not operand 1. + (anddi_notsesidi_di): Likewise. - * config/rs6000/rs6000.md (sCC pattern): Remove clobber and use - result as temporary value. +2002-11-21 Kazu Hirata -2002-04-26 Richard Henderson + * 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. - PR c/3581 - * c-common.c (combine_strings): Use xmalloc, not alloca. +2002-11-21 Ulrich Weigand - * c-common.c (combine_strings): Tweak __FUNCTION__ warning text. + * 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-04-26 Bo Thorsen +2002-11-21 Richard Earnshaw - * 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. + * 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-04-22 Zack Weinberg +2002-11-20 Steve Ellcey - * c-lex.c (lex_charconst): Call convert to get constant in - proper type; don't just smash the type field. - Fixes PR c/6300. + * 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. - * 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-11-20 Douglas B Rupp -2002-04-22 Richard Henderson + * hwint.h (HAVE___INT64): Fix typo (was HAVE__INT64). - * config/sparc/sol2-bi.h (ASM_DEBUG_SPEC): New. +2002-11-20 DJ Delorie -2002-04-22 Mark Mitchell + * config/stormy16/stormy16.c (s16builtins, + xstormy16_init_builtins, xstormy16_expand_builtin): New. + * config/stormy16/stormy16.md (divmodhi4, sdivlh, udivlh): New. - 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-11-20 Hans-Peter Nilsson -2002-04-22 Joel Sherrill + * 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. - * gthr-rtems.h: Correct prototypes to remove warnings. + * 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-04-22 Richard Henderson +2002-11-20 Ulrich Weigand - PR c/6344 - * alias.c (canon_true_dependence): Special case (mem:blk (scratch)). + * recog.c (constrain_operands): Prefer exact match over reloadable + EXTRA_MEMORY_CONSTRAINT or EXTRA_ADDRESS_CONSTRAINT. - * 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). + * reload.c (find_reloads): Always reload EXTRA_ADDRESS_CONSTRAINT + operands in Pmode. -2002-04-22 Ulrich Weigand +2002-11-20 Eric Botcazou - * 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. + PR c/8518 + * c-decl.c (duplicate_decls): Outline the second definition + of an extern inline function in all cases. -2002-04-22 Aldy Hernandez +2002-11-20 Richard Sandiford - * 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. + * stor-layout.c (place_field): Update rli->offset as well as + rli->bitpos. -2002-04-21 David S. Miller +2002-11-20 Richard Sandiford - * config/sparc/sparc.md (set then compare DI mode peephole2): Fix - compare mode in output RTL. + * sched-deps.c (sched_analyze): Check HARD_REGNO_CALL_PART_CLOBBERED. -2002-04-22 David Edelsohn +2002-11-20 Richard Sandiford - * config/rs6000/rs6000.c (rs6000_override_options): Correct - style and formatting of previous patch. + * config/sh/sh.md (udivsi3): Don't put udivsi3_i4_media instructions + into a libcall block. + (divsi3): Likewise divsi3_i4_media. -2002-04-22 Alan Modra +2002-11-20 Richard Sandiford - * config/rs6000/rs6000.c (rs6000_override_options): Always clear - flag_pic for ABI_AIX. + * global.c (find_reg): Check HARD_REGNO_NREGS before kicking + out another register. -2002-04-21 Neil Booth +2002-11-20 Jakub Jelinek - * cppmacro.c (funlike_invocation_p): Don't step back - over CPP_EOF. + * combine.c (force_to_mode): Only replace with (not Y) if all bits in fuller_mask + (not just mask) are set in C. -2002-04-21 David Edelsohn +2002-11-19 Andreas Jaeger - * config/rs6000/rs6000.c (output_profile_hook): Do not increment - labelno. + * loop.c (record_giv): Initialize not_replaceable. + (check_final_value): Likewise. -2002-04-20 Joseph S. Myers +2002-11-19 Kazu Hirata - * doc/invoke.texi: Remove Chill references. - * doc/gcc.texi: Update last modified date. + * config/h8300/h8300.c (h8300_init_once): Replace 1 with + MASK_H8300S. -2002-04-19 David S. Miller +2002-11-19 Vijay L. Khuspe - * config/sparc/linux.h (MD_FALLBACK_FRAME_STATE_FOR): Define. - * config/sparc/linux64.h (MD_FALLBACK_FRAME_STATE_FOR): Likewise. + * 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. -Sat Apr 20 02:17:38 CEST 2002 Jan Hubicka +2002-11-19 Jan Hubicka - * i386.md (movsi_1, movhi_1): Force reload to use more flexible - alternative. + * i386.md (length_immediate): Do not refer to insn address. + (jcc*, jmp patterns): Compute length explicitly. -2002-04-19 Jakub Jelinek +2002-11-19 Eric Botcazou - PR c/6358 - * function.c: Reapply patch for c/6358. - (expand_function_end): Copy decl_rtl's mode, not - current_function_return_rtx mode. + PR c/8588 + * optabs.c (expand_binop): Convert CONST_INTs in shift + operations too. -2002-04-19 Joel Sherrill +2002-11-19 Roger Sayle - * config/rtems.h (STARTFILE_SPEC, ENDFILE_SPEC): Fix for non-ELF - targets. + * gcse.c (gcse_emit_move_after): Correct typo in REG_EQUAL note. -2002-04-19 Tom Tromey +2002-11-19 Kazu Hirata - * doc/install.texi (Specific): Update status of Solaris 2.8. - For PR libgcj/6158. + * config/h8300/h8300.md (an anonymous pattern): Relax the + condition to accept the same operands and/or subregs. -2002-04-19 Dan Nicolaescu - Gerald Pfeifer +2002-11-19 Daniel Jacobowitz - * doc/install.texi (Specific, sparc-sun-solaris2*): Mention that - binutils 2.11.2 and higher generate smaller binaries than Sun's - native tools. + * config/sh/sh.c (gen_shl_and): Revert previous patch. + * config/sh/sh.md (ashrdi3+1, ashrdi3+2): Predicate on + reload_completed. -2002-04-19 Mark Mitchell +2002-11-19 Kazu Hirata - PR c++/6352 - * toplev.c (rest_of_compilation): Do not defer functions for which - TREE_SYMBOL_REFERENCED has already been set. + * 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-04-18 Richard Henderson +2002-11-19 Gerald Pfeifer - * function.c: Revert patch for c/6358. + * doc/contrib.texi (Contributors): Add self as second contact in + addition to Jeff Law. -2002-04-18 Richard Henderson +2002-11-19 Andreas Jaeger - * 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. + * tree-inline.c: Move prototpyes of find_alloca_call_1 and + find_alloca_call to right place. -2002-04-18 Richard Henderson +2002-11-19 Kazu Hirata - * config/ia64/ia64.c (ia64_function_arg_pass_by_reference): Don't - crash with no type for by-mode libcalls. + * cppfiles.c: Fix formatting. - * config/ia64/ia64.md (conditional_trap): Fix predicate polarity. +2002-11-19 Jason Thorpe -2002-04-18 David S. Miller + * 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/sparc/sparc.h (BRANCH_COST): Define. + * 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. - * fold-const.c (BRANCH_COST): Don't provide default here, expr.h - does it. + * doc/invoke.texi: Document spec functions. -2002-04-18 Richard Henderson + * cppspec.c (lang_specific_spec_functions): New. + * gccspec.c: Likewise. - * 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-11-18 Steve Ellcey -2002-04-18 Hans-Peter Nilsson + * 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. - * 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-11-18 Neil Booth -2002-04-18 Richard Henderson + 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. - * 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. +2002-11-18 Jan Hubicka - * config/ia64/ia64.md (trap, conditional_trap): New. + * i386.md (addqi_1_slp): Fix output template. + (subqi_1_slp): Fix type. -2002-04-18 Jakub Jelinek +2002-11-17 Jan Hubicka - PR c/6358 - * function.c (assign_parms): Assign hard current_function_return_rtx - register here... - (expand_function_end): ...not here. + * 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-04-18 Gerald Pfeifer +2002-11-18 Kazu Hirata - * doc/install.texi (Downloading the source): Do not mention Chill - any longer, but mention Ada. - (Configuration): Do not mention Chill any longer. + * config/h8300/h8300.md (*andorqi3): Use bor between bld and + bst. Update the insn length. + (*andorhi3): Likewise. + (*andorsi3): Likewise. -2002-04-18 Hans-Peter Nilsson +2002-11-18 Richard Sandiford - * config/cris/cris.h (TARGET_VERSION): Remove local version number. + * 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. -Thu Apr 18 15:49:12 CEST 2002 Jan Hubicka +2002-11-18 Richard Sandiford - * 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. + * 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-04-18 Jakub Jelinek +2002-11-18 Richard Sandiford - PR middle-end/6205 - * config/i386/i386.md (movsf_1): Use pxor only if TARGET_SSE2, - otherwise xorps. + * config/sh/sh.c (calc_live_regs): Update check for PIC liveness + in compact code. -2002-04-18 Loren J. Rittle +2002-11-18 Richard Sandiford - Revert this change: + * config/sh/sh.md (initialize_trampoline): Do not force the + trampoline address into R0_REGS here. - * doc/install.texi (Installing GCC: Configuration): Clarify - the only supported ways to configure gcc. +2002-11-17 Kazu Hirata -2002-04-17 Dale Johannesen + * df.c: Fix formatting. - * 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-11-17 Kazu Hirata -2002-04-17 Ulrich Weigand + * config/h8300/h8300.md (two anonymous patterns): Fix insn + lengths. - * config/s390/s390.c (legitimize_pic_address): Do not generate - illegal address constant without CONST. +2002-11-17 Daniel Jacobowitz -2002-04-17 Kaveh R. Ghazi + * sh.c (gen_shl_and): Don't create a zero_extend if the operand + is not an arith_reg_operand. - * sparc/linux64.h (CC1_SPEC): Error for -m32 and -m64. - * sparc/netbsd-elf.h (CC1_SPEC32, CC1_SPEC64): Likewise. +2002-11-17 Graham Stott -2002-04-17 Ulrich Weigand + * real.c (real_to_decimal): Fix buffer overrun when buffer size + is smaller than representation. - 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-11-17 Kazu Hirata -2002-04-16 Andrew Haley + * builtins.c: Fix formatting. - * doc/install.texi (Building): libgcj requires GNU make. +2002-11-16 Kazu Hirata -2002-04-17 Jakub Jelinek + * config/h8300/h8300.md (two anonymous patterns): Fix typos. - 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-11-16 Kazu Hirata -2002-04-17 Zack Weinberg + * config/h8300/h8300.md: Fix formatting. - * 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-11-16 Kazu Hirata -2002-04-17 Aldy Hernandez + * config/h8300/h8300.md: Replace spaces with tabs. + * config/h8300/t-h8300: Remove a trailing empty line. - * config/rs6000/altivec.h (vec_ld): Add array variants. - (vec_lde): Same. - (vec_ldl): Same. +2002-11-16 Kazu Hirata -2002-04-17 Alan Matsuoka - Aldy Hernandez + * tlink.c: Fix formatting. - * 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-11-16 David Edelsohn -2002-04-16 Richard Henderson + 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. - PR c++/6320 - * except.c (remove_eh_handler): Insert inner regions at beginning - of sibling chain. Refactor expressions. +2002-11-16 Kazu Hirata -2002-04-16 Mark Mitchell + * hard-reg-set.h: Follow spelling conventions. + * real.c: Likewise. + * target.h: Likewise. - * 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-11-16 Jakub Jelinek -2002-04-16 Richard Henderson + * config/i386/x86-64.h (MCOUNT_NAME): Change into string literal. - * 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. +2002-11-16 Kazu Hirata - * config/sparc/sol2-bi.h (CC1_SPEC): Error for -m32 and -m64. + * optabs.c: Fix formatting. -2002-04-16 Richard Henderson +2002-11-16 Jan Hubicka - * config/mips/mips.c (override_options): Don't override N32 for - a 64-bit ISA. + * 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. - PR c/6202 - * config/mips/mips.md (can_delay): Split out of existing define_delays. - (HILO_delay): Set can_delay false. +2002-11-15 Kazu Hirata -2002-04-16 Paolo Carlini + * config/h8300/h8300.md (4 anonymous patterns): New. - * c-parse.in (poplevel, compstmt_start, compstmt_primary_start): - Add ending ';', in accordance with POSIX. +2002-11-15 Geoffrey Keating -2002-04-16 Richard Henderson + * 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. - * 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-11-15 Ulrich Weigand -2002-04-16 Hartmut Penner + * config/s390/s390.c (optimization_options): Set + flag_asynchronous_unwind_tables to 1 by default. - PR target/6305 - * config/s390/s390.md (mulsidi3): Set both subregs of the - multiword register. +2002-11-15 Ulrich Weigand -2002-04-16 Aldy Hernandez + * config/s390/s390.h (ASM_PREFERRED_EH_DATA_FORMAT): Define. - * config/rs6000/altivec.h (vec_addc): Type check. +2002-11-15 Jan Hubicka -2002-04-16 Jakub Jelinek + * 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. - PR middle-end/6279 - * expr.c (store_expr): Don't copy if DECL_RTL (exp) == target. +2002-11-14 Jeroen Dobbelaere - * expr.c (safe_from_p): Cleanup: use DECL_RTL_IF_SET. + * 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-04-15 Richard Henderson +2002-11-14 Kazu Hirata - * config/mips/abi64.h (SUBTARGET_CONDITIONAL_REGISTER_USAGE): Set - call_really_used_regs too. + * gthr-single.h: Fix formatting. -2002-04-15 David S. Miller +2002-11-14 Zack Weinberg - * rtlanal.c (note_stores): Don't present PARALLEL SET_DESTs - as being CLOBBERed. + * tree.c (tree_vec_elt_check_failed): New function. + * tree.h (TREE_VEC_ELT_CHECK): New checking macro. + (TREE_VEC_ELT): Use it. -2002-04-16 Jakub Jelinek + * tree-inline.c (optimize_inline_calls): Don't copy a + zero-length vector. - PR c/6290 - * config/rs6000/rs6000.c (easy_vector_constant): Return 1 if the - CONST_VECTOR is { 0, ... 0 }. +2002-11-14 Gabriel Dos Reis -2002-04-15 Loren J. Rittle + * diagnostic.c (sorry): Don't repeat "sorry, unimplemented" text. - * doc/install.texi (Installing GCC: Configuration): Clarify - the only supported ways to configure gcc. +2002-11-14 Jakub Jelinek -2002-04-15 Richard Henderson + * 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. - * 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-11-14 Kazu Hirata -2002-04-15 Mark Mitchell + * gthr-vxworks.h: Fix formatting. - 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-11-13 Janis Johnson -2002-04-15 Douglas B Rupp + * doc/install.texi (Testing): Document extra Java testing. + * doc/sourcebuild.texi (Test Suites): Document libgcj testing. - * config/alpha/vms.h (INCLUDE_DEFAULTS): Add /gnu/lib/gcc-lib/include. - (LONGLONG_STANDALONE): Define. +2002-11-13 John David Anglin -2002-04-15 David S. Miller + * 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. - * 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. +2002-11-13 Kazu Hirata - * config/sparc/sparc.c (sparc_extra_constraint_check): - Fix type of argument 'c'. - * config/sparc/sparc-protos.h (sparc_extra_constraint_check): - Likewise. + * gthr-solaris.h: Fix formatting. -2002-04-14 Andreas Schwab +2002-11-13 Kazu Hirata - * config/ia64/linux.h (CPP_PREDEFINES): Fix missing backslash. + * gthr-posix.h: Fix formatting. -2002-04-14 Jeroen Dobbelaere +2002-11-12 Kazu Hirata - * config/arm/linux-elf.h (CPLUSPLUS_CPP_SPEC): Define. + * config/h8300/h8300.md (*andorsi3): New. -2002-04-13 Mark Mitchell +2002-11-12 Franz Sirl - * config/alpha/linux.h (CPP_PREDEFINES): Fix typo. - * config/i386/gnu.h (CPP_PREDEFINES): Define __gnu_hurd__, - not gnu_hurd. + * doc/install.texi (powerpc-*-linux-gnu*): Update binutils requirement. -2002-04-13 Hans-Peter Nilsson +2002-11-12 Kazu Hirata - * config/cris/linux.h (CRIS_CPP_SUBTARGET_SPEC): Fix typo. + * config/h8300/h8300.c (tiny_constant_address_p): Parenthesize + expressions appropriately. -2002-04-13 Joel Sherrill +2002-11-12 Kazu Hirata - * config/sparc/t-elf: Enable v8 multilibs. Impacts - sparc-elf and sparc-rtems targets. + * gthr-win32.h: Fix formatting. -2002-04-13 Mark Mitchell +2002-11-12 Kazu Hirata - * 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. + * 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-04-13 Andreas Schwab +2002-11-12 Gerald Pfeifer - * config/ia64/ia64.h (CPP_SPEC): Include %(cpp_cpu). + * doc/contrib.texi (Contributors): Use GCJ instead of gcj to refer + to that entire project. -2002-04-12 Mark Mitchell +2002-11-12 Rainer Orth - Revert these changes: + * config/mips/t-iris6 (MULTILIB_OSDIRNAMES): Restore old + directories. - 2002-04-06 Mark Mitchell +2002-11-11 Zack Weinberg - PR c++/5571 - * stor-layout.c (layout_decl): Reset the RTL for the decl. + * params.def (ggc-min-expand, ggc-min-heapsize): New parameters. + * doc/invoke.texi: Document them. - 2002-03-15 Mark Mitchell + * 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. - * expr.c (expand_expr): Tidy. +2002-11-11 Kazu Hirata -2002-04-12 Richard Henderson + * gthr-dce.h: Fix formatting. - * 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-11-11 Franz Sirl -2002-04-12 Richard Henderson + PR c/8467 + * stmt.c (tail_recursion_args): Handle DECL_MODE differing from the + mode of DECL_RTL case. - * recog.c (offsettable_address_p): Match the logic in adjust_address. +2002-11-11 Janis Johnson - * config/sparc/sparc.h (LEGITIMIZE_RELOAD_ADDRESS): Handle TFmode - in 64-bit mode only. Use only for 32-bit or MEDLOW. + * doc/contrib.texi: Merge in the list from the libstdc++ web pages. -2002-04-12 Rainer Orth +2002-11-11 Jan Hubicka - * config/alpha/osf.h (LINK_SPEC): Pass -S to silence ld warnings. + * i386.c (construct_container): Fix handling of SSE_CLASS. -Fri Apr 12 15:42:59 2002 Jeffrey A Law (law@redhat.com) +2002-11-10 Joel Sherrill - * pa.c (pa_can_combine_p): Call extract_insn before calling - constrain_operands. + * config/m68k/t-crtstuff (crti.o): Use this... + ($(T)crti.o): ... instead. + (crtn.o): Use this... + ($(T)crtn.o): ... instead. -2002-04-12 Douglas B Rupp +2002-11-10 Eric Botcazou - * hwint.h (HAVE___INT64): Correct spelling. + PR c/8439 + * recog.c (validate_replace_rtx_1) [PLUS]: Simplify only + if there is something new to be simplified. - * 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-11-10 H.J. Lu -2002-04-12 DJ Delorie + * calls.c (PUSH_ARGS_REVERSED): Define only if not defined. + * expr.c (PUSH_ARGS_REVERSED): Likewise. - * integrate.c (compare_blocks): Make comparisons safe for when - sizeof(int) < sizeof(char *). - (find_block): Likewise. + * config/i386/i386.h (PUSH_ARGS_REVERSED): Set to 1. -2002-04-12 Andreas Schwab +2002-11-10 Zack Weinberg - * 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. + * 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-04-12 Eric Norum +2002-11-10 Jason Thorpe - * 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. + * config/mips/netbsd.h (TARGET_OS_CPP_BUILTINS): Define + __ABICALLS__ if TARGET_ABICALLS. -Fri Apr 12 08:06:54 2002 Richard Kenner +2002-11-10 Jan Hubicka - * 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. + * i386.h (MIN_UNITS_PER_WORD): Define to 8 for x86-64 libgcc. - * emit-rtl.c (widen_memory_access): Don't do anything if MEMOFFSET - not specified. +2002-11-10 Joseph S. Myers -2002-04-12 Hans-Peter Nilsson + * c-decl.c (grokdeclarator): Make error for duplicate type + qualifiers into a pedwarn, disabled for C99. - * function.c (fixup_var_refs_1) : - For paradoxical (subreg VAR), replace VAR, don't try the subreg. +2002-11-10 Hans-Peter Nilsson -2002-04-12 Andreas Schwab + * config/mmix/mmix.h (FUNCTION_ARG_CALLEE_COPIES): Define the same + as FUNCTION_ARG_PASS_BY_REFERENCE. - * config/ia64/ia64.h (EXTRA_SPECS): Fix missing backslash. +2002-11-09 John David Anglin -2002-04-12 Richard Henderson + * pa.h (STARTING_FRAME_OFFSET): Change offset for TARGET_64BIT to 16. - PR bootstrap/4191 - * config/d30v/d30v.h (INIT_SECTION_ASM_OP): Don't undef. + * 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. - * flow.c (mark_used_reg): Manage reg_cond_dead properly for - modes spanning multiple hard regs. +2002-11-09 Jason Thorpe - * recog.c (peephole2_optimize): Rebuild jump labels as needed. + * config/mips/netbsd.h (SUBTARGET_ASM_SPEC): Don't pass -KPIC + to the assembler if -mno-abicalls was specified. -2002-04-11 John David Anglin +2002-11-09 John David Anglin - * pa.c (output_millicode_call): Check attribute type as well as length - when length is 28. + * pa-linux.h (PREFERRED_DEBUGGING_TYPE, DWARF2_ASM_LINE_DEBUG_INFO, + ASM_OUTPUT_DEF): Delete. -2002-04-11 David O'Brien +2002-11-09 Neil Booth - * 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. + * c-opts.c (COMMAND_LINE_OPTIONS): Fix -Wimplicit. -2002-04-11 David O'Brien +2002-11-08 Dale Johannesen - * 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. + * dbxout.c (dbxout_type): Fix stabs info for vector types. -2002-04-11 David O'Brien +2002-11-08 Neil Booth - * config.gcc (ia64-*-freebsd*): Fix ordering of tm_files to match - all other *-*-freebsd* targets. + 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-04-11 Richard Sandiford +2002-11-08 Neil Booth - * doc/extend.texi: Remove old claim that typedefs cannot have - an alignment attribute. + * cppmain.c (cpp_preprocess_file): Loop to pop any -included + buffers. -2002-04-11 Jakub Jelinek +2002-11-08 Kazu Hirata - PR optimization/6177 - * expr.c (expand_expr) [COMPONENT_REF]: Handle op0 CONCAT if - bitpos is 0 and bitsize CONCAT size. + * config/h8300/h8300.md (two anonymous test insns): New. -2002-04-11 Jakub Jelinek +2002-11-08 Jan Hubicka - PR c/6223 - * combine.c (if_then_else_cond): Use trunc_int_for_mode on nz. + * jump.c (mark_jump_label): Handle subregs of label_refs. -2002-04-11 David O'Brien +2002-11-07 David Mosberger - * config/alpha/freebsd.h: Minor reformatting. - (CPP_SPEC): Define ELF and add cpp_subtarget. - (ASM_SPEC): No longer needed. + * 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. -2002-04-11 Richard Henderson + * 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. - * 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-11-07 Jason Thorpe -2002-04-11 Hans-Peter Nilsson + * 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. - * config/cris/cris.c (cris_override_options): Tweak error message - for PIC not implemented. +2002-11-07 Richard Earnshaw - * config/cris/cris.h: Tweak comments related to parameter-passing. + * 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. - * config/cris/t-cris (TARGET_LIBGCC2_CFLAGS): Don't -Dinhibit_libc here. +2002-11-07 Richard Earnshaw + + * arm/elf.h (TYPE_OPERAND_FMT): Prefix type with %. - * 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-11-07 J"orn Rennecke -2002-04-10 Richard Henderson + * sh.h (DWARF_FRAME_RETURN_COLUMN): Use DWARF_FRAME_REGNUM. - * except.c (add_ehl_entry): Allow duplicates after landing pad - creation. +2002-11-07 Jan Hubicka -2002-04-10 David Edelsohn + * reg-stack.c (compensate_edge): Fix sanity check. - * config/rs6000/t-aix43 (SHLIB_NM_FLAGS): Add -X32_64. +2002-11-05 Geoffrey Keating -2002-04-10 Ulrich Weigand + * 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. - * reload1.c (choose_reload_regs): HARD_FRAME_POINTER_REGNUM - is only used as frame pointer when frame_pointer_needed is true. +2002-11-06 David Edelsohn -2002-04-10 Richard Earnshaw + PR target/8480 + * config/rs6000/rs6000.md (movdi_internal64): Discourage + FPR to FPR moves. - 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-11-06 Janis Johnson -2002-04-10 Richard Henderson + * doc/contrib.texi: Merge in the list from the Java web pages. - * expr.c (expand_expr) [INTEGER_CST]: Don't force into registers - if EXPAND_INITIALIZER. +2002-11-06 David O'Brien -2002-04-10 Alan Modra + * config/sparc/freebsd: Fix typo. - 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-11-06 John David Anglin -2002-04-09 Richard Henderson + * pa64-hpux.h (LDD_SUFFIX, PARSE_LDD_OUTPUT): Define. - * config/alpha/alpha.md (movdi_er_maybe_g): New. - * config/alpha/alpha.c (alpha_expand_mov): Use it. +2002-11-06 Alexandre Oliva -2002-04-09 Richard Henderson + * config/mips/mips.md (call_value_multiple_internal2): Use dla for + non-SImode addresses. - PR c/5078 - * expr.c (expand_expr) [INTEGER_CST]: Force overflows into registers. +2002-11-05 Bob Wilson -2002-04-09 Andrew MacLeod + * config/xtensa/elf.h (LIB_SPEC): Add "-lhal". - * expr.c (expand_expr): A RESULT_DECL is part of a call. +2002-11-05 John David Anglin -2002-04-09 Richard Henderson + * pa64-hpux.h (LIB_SPEC): Fix p and pg options. + (STARTFILE_SPEC): Remove p and pg options. - * cfg.c (expunge_block): Decrement num_elements here ... - (expunge_block_nocompact): ... not here. - * cfgcleanup.c (delete_unreachable_blocks): Set num_elements. +2002-11-05 Andrew Haley -2002-04-09 Richard Henderson + * 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. - * 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-11-05 Richard Sandiford -2002-04-08 Richard Henderson + * config/mips/mips.h (CANNOT_CHANGE_MODE_CLASS): Move comment to... + * config/mips/mips.c (mips_cannot_change_mode_class): ...here. - * reorg.c (get_branch_condition): Use reversed_comparison_code. +2002-11-04 Dale Johannesen -2002-04-08 Stephane Carrez + * doloop.c (doloop_modify_runtime): Fix loop count computation + for unrolled loops. + * loop.c (loop_invariant_p): Support calling from unroller. - * config/m68hc11/larith.asm (__map_data_section): Fix condition - and optimize for size. - (__do_global_ctors): Fix pointer comparison. - (__do_global_dtors): Likewise. +2002-11-04 Ulrich Weigand -2002-04-09 David S. Miller + * config/s390/s390.c (s390_decompose_address): Use arg_pointer_rtx + for comparison. - * 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. +2002-11-04 Aldy Hernandez - * config/sparc/sparc.c (const64_is_2insns): Kill signed vs. - unsigned comparison warning. - (output_restore_regs): Mark leaf_function as unused. + * hard-reg-set.h (REG_CANNOT_CHANGE_MODE_P): New. -Tue Apr 9 09:35:45 2002 Richard Kenner + * config/rs6000/rs6000.h (CLASS_CANNOT_CHANGE_MODE_P): Remove. + (CLASS_CANNOT_CHANGE_MODE): Remove. + (CANNOT_CHANGE_MODE_CLASS): New. - * expr.c (is_aligning_offset): New function. - (expand_expr, case COMPONENT_EXPR): Call it. + * config/alpha/alpha.h: Same. -2002-04-09 Alan Modra + * config/ia64/ia64.h: Same. - * 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. + * config/mips/mips.h: Same. -2002-04-08 Hans-Peter Nilsson + * config/s390/s390.h: Same. - * config/mmix/t-mmix (TARGET_LIBGCC2_CFLAGS): Don't -Dinhibit_libc - here. + * config/sh/sh.h: Same. - * config/mmix/mmix.h (INITIAL_ELIMINATION_OFFSET): Remove spurious - semicolon. + * config/pa/pa64-regs.h: Same. - * config/mmix/mmix.c (mmix_expand_builtin_va_arg): Variable-size - types come in by-reference. Fix typo in comment. + * config/sh/sh-protos.h (sh_cannot_change_mode_class): Add prototype. -2002-04-08 Richard Henderson + * config/sh/sh.c (sh_cannot_change_mode_class): New. - PR opt/6007 - * toplev.c (rest_of_compilation): Disable cross-jumping for - highly connected graphs. + * config/mips/mips-protos.h (mips_cannot_change_mode_class): Add + prototype. -2002-04-08 David S. Miller + * config/mips/mips.c (mips_cannot_change_mode_class): New. - PR target/6082 - * config/sparc/freebsd.h (SPARC_DEFAULT_CMODEL): Set to CM_MEDLOW + * doc/tm.texi (Register Classes): Remove + CLASS_CANNOT_CHANGE_MODE and CLASS_CANNOT_CHANGE_MODE_P. + Document CANNOT_CHANGE_MODE_CLASS. - 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. + * reload.c (push_reload): Use CANNOT_CHANGE_MODE_CLASS. + (push_reload): Same. - 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. + * simplify-rtx.c (simplify_subreg): Same. -2002-04-08 Gerald Pfeifer + * reload1.c (choose_reload_regs): Same. - * doc/contrib.texi (Contributors): Add John David Anglin and Loren - J. Rittle (the latter also to Testers). Update David O'Brien's entry. + * recog.c (register_operand): Same. -2002-04-07 David S. Miller + * regrename.c (mode_change_ok): Change to use new + CANNOT_CHANGE_MODE_CLASS infrastructure. - * config.gcc (sparc64-*-linux*): Add t-crtfm to tmake_file. + * 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. -2002-04-07 John David Anglin + * 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. - PR 5933 - * pa.h (ASM_OUTPUT_MI_THUNK): Use indirect jump to target function when - generating 32-bit pic code. + * global.c (find_reg): Use subregs_of_mode info. -2002-04-07 Franz Sirl + * rtl.h (cannot_change_mode_set_regs): New prototype. + (invalid_mode_change_p): Same. + (REG_CANNOT_CHANGE_MODE_P): New macro. - * 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. + * flow.c (mark_used_regs): Calculate subregs_of_mode. Remove + REG_CHANGES_MODE. + (life_analysis): Clear subregs_of_mode. -2002-04-06 John David Anglin + * 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. - * reorg.c (dbr_schedule): Don't reposition prologue and epilogue notes. + * regs.h: Add extern for subregs_of_mode; + Include hard-reg-set and basic-block. + (REG_CHANGES_MODE): Delete. -2002-04-06 Mark Mitchell +2002-11-03 John David Anglin - PR c++/5571 - * stor-layout.c (layout_decl): Reset the RTL for the decl. + * jump.c (never_reached_warning): Don't set contains_insn until the + first line note is seen. - 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-11-03 David Edelsohn -2002-04-06 Jason Merrill + * config/rs6000/rs6000.md (movti_string): Use string instructions. - * 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-11-03 Roger Sayle -Sat Apr 6 18:26:32 CEST 2002 Jan Hubicka + PR c/7128 + * c-typeck.c (c_expand_asm_operands): Defend against + error_mark_nodes in the output argument to avoid ICE. - * ifcvt.c (if_convert): Clear aux fields of blocks. +2002-11-03 Eric Botcazou -2002-04-05 David S. Miller + PR middle-end/8408 + * genrecog.c (preds): Handle ADDRESSOF. + (validate_pattern): Mark it as an lvalue. - * 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-11-02 David Edelsohn -2002-04-05 Jan Hubicka + * config/rs6000/rs6000.c (rs6000_override_options): Use string + instructions when optimizing for size. - * optabs.c (emit_no_conflict_block, emit_libcall_block): Avoid nesting - of libcall regions. +2002-11-02 Kazu Hirata -2002-04-05 David S. Miller + * config/h8300/h8300.h: Fix comment typos. + * config/h8300/h8300.md: Likewise. + * config/h8300/lib1funcs.asm: Likewise. - * 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-11-02 Gerald Pfeifer -2002-04-05 Jakub Jelinek + Revert this change: - * mklibgcc.in: Use separate libgcc.map for each multilib. - * Makefile.in (distclean): Don't remove libgcc.map here. + *doc/install.texi (Installing GCC: Configuration): Clarify + the only supported ways to configure gcc. -2002-04-05 Jakub Jelinek +2002-11-01 Kazu Hirata - * Makefile.in (s-mlib): Handle --disable-multilib by separate - genmultilib invocation. + * config/h8300/h8300.md (anonymous and:QI pattern): Use 'n' + instead of 'O' for the constraint for the second operand. -2002-04-04 David S. Miller +2002-11-01 Mark Mitchell - * 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. + PR c++/8391 + * toplev.c (rest_of_compilation): Do not refuse to output code for + an inline function in a local class. -2002-04-05 Alan Modra +2002-11-01 David O'Brien - * config/rs6000/t-linux64 (EXTRA_MULTILIB_PARTS): Add crtsavres.o - Add rules to make null object file. + * config/sparc/freebsd.h (CPP_CPU64_DEFAULT_SPEC): Define __arch64__. + (TRANSFER_FROM_TRAMPOLINE): Reformat. + Add comment. -2002-04-04 David S. Miller +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. - * calls.c (store_one_arg): If ECF_SIBCALL, use tail_call_reg. +2002-11-01 Richard Earnshaw (rearnsha@arm.com) -2002-04-04 Richard Henderson + 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. - PR opt/6165 - * alias.c (true_dependence): Force (mem:blk (scratch)) to conflict. - (write_dependence_p): Likewise. +2002-11-01 Jan Hubicka -2002-04-04 Richard Henderson + * expr.c (emit_move_insn): Use SCALAR_FLOAT_MODE_P + * machmode.h (SCALAR_FLOAT_MODE_P): New macro. - * predict.c (estimate_bb_frequencies): Do frequency calculation - with a volatile temporary. +2002-10-31 Nathanael Nerode -2002-04-04 Ulrich Weigand + PR optimization/6162 + * doc/md.texi: Document restriction on commutative operand + specification. - * config/s390/linux.h (LOCAL_LABEL_PREFIX): Define. +2002-10-31 Eric Christopher -2002-04-04 Jakub Jelinek + * explow.c (convert_memory_address): Use shallow_copy_rtx. - PR c++/6119 - * final.c (final_start_function): Don't bump profile_label_no here... - (final_end_function): ...but here. +2002-10-31 Steve Ellcey -2002-04-04 Jakub Jelinek + * expmed.c (store_bit_field): Check FUNCTION_ARG_REG_LITTLE_ENDIAN. - * 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-10-31 Steve Ellcey -2002-04-04 Jakub Jelinek + * config/ia64/hpux.h (MEMBER_TYPE_FORCES_BLK): Set for non-floats. - PR fortran/6106 - * config/sparc/sparc.h (MIN_UNITS_PER_WORD): Backout 2001-01-01 - change. +Thu Oct 31 Dale Johannesen -2002-04-04 Jakub Jelinek + * config/rs6000/darwin.h: Correct formatting in previous. - * config/sparc/sparc.c (sparc_va_arg): Adjust va_list by - UNITS_PER_WORD for zero sized aggregates. +Thu Oct 31 Dale Johannesen -2002-04-04 Gerald Pfeifer + * config/rs6000/darwin.h: Enable -falign-xxx options. - * doc/contrib.texi (Contributors): Add David O'Brien. +2002-10-31 Jan Hubicka -2002-04-03 David S. Miller + * 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. - * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): No need for a new - one-character spec for this, just use %(link_gcc_c_sequence). +2002-10-31 Jan Hubicka -2002-04-04 Alan Modra + * i386.md (negdf2_ifs_rex64): Don't allow GPR operand. - * config/rs6000/t-linux64 (EXTRA_MULTILIB_PARTS): Define. +2002-10-31 J"orn Rennecke -2002-04-03 David S. Miller + * sh.h (binary_logical_operator): Declare. + * sh.c (binary_logical_operator): New function. + * sh.md (xordi3+1): New combiner splitter pattern. - * 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-10-31 David O'Brien -2002-04-03 Jason Merrill + * config/sparc/freebsd.h (TRANSFER_FROM_TRAMPOLINE): Define + __enable_execute_stack function. - 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-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-04-03 Jakub Jelinek +2002-10-30 Mark Mitchell - * 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. + PR c++/8333 + * varasm.c (asm_output_aligned_bss): Do not call + ASM_GLOBALIZE_LABEL. -2002-04-03 Jakub Jelinek +2002-10-30 David Edelsohn + Torbjorn Granlund - PR middle-end/6102 - * df.c (df_insn_refs_record): Use XEXP not SET_DEST to access - USE argument. + * config/rs6000/rs6000.md (load_toc_v4_PIC_1): Use preferred form + for addressibility. + (load_toc_v4_PIC_1b): Same. -2002-04-03 Richard Henderson +2002-10-30 Kazu Hirata - PR opt/4120 - * sched-rgn.c (sets_likely_spilled): New. - (sets_likely_spilled_1): New. - (add_branch_dependences): Use it. + * config/h8300/h8300.c (h8300_eightbit_constant_address_p): + Truncate the addresses for H8/300 using HImode. -2002-04-02 Richard Henderson +2002-10-29 Hans-Peter Nilsson - 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. + * 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-04-02 David S. Miller +2002-10-28 Andreas Bauer - * 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. + * doc/c-tree.texi (Tree overview): Fix typos. -2002-04-02 Richard Henderson +2002-10-29 Phil Edwards - * libgcc2.c (__bb_exit_func): Revert 03-31 change. + * Makefile.in (gnucompare*): Only record bad comparisons + if there really was a bad comparison. -2002-04-02 Eric Botcazou - Richard Henderson +2002-10-29 Jan Hubicka - 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. + * 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' -2002-04-02 David O'Brien + * simplify-rtx.c (simplify_subreg): Fix const_int->vector subregging. - * protoize.c: Match include directory usage with cppdefault.c. + * i386.c (ix86_expand_vector_move): Fix. -2002-04-03 Jeffrey A Law (law@redhat.com) - Hans-Peter Nilsson + * i386.c (ix86_expand_builtin): Use sse2_maskmovdqu_rex64. + * i386.md (sse2_maskmovdqu_rex64): New pattern - * combine.c (simplify_comparison): Avoid narrowing a comparison - with a paradoxical subreg when doing so would drop signficant bits. + PR target/8322 + * xmmintrin.h (_mm_stream_pi, _mm_stream_pd): Fix cast. + (ix86_init_mmx_sse_builtins): Fix type. -2002-04-02 David Edelsohn +2002-10-29 Jason Thorpe - * config/rs6000/rs6000.h (WIDEST_HARDWARE_FP_SIZE): Define. + * 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-04-02 Alan Modra +2002-10-29 Kazu Hirata - * config/rs6000/rs6000.md (ctrdi*): Add FPR constraint and - associated splitter. Remove MQ constraint. - (ctrdi_internal4): Correct CCmode clobber. + * config/h8300/h8300.h (TARGET_DEFAULT): Make it + MASK_QUICKCALL. -2002-04-03 Hans-Peter Nilsson +2002-10-29 Kazu Hirata - * 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. + * 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-04-02 Richard Henderson +2002-10-29 Kazu Hirata - PR opt/3967 - * local-alloc.c (contains_replace_regs): LO_SUM may contain - replace regs. + * reload1.c (update_eliminables): Unconditionally check if + frame_pointer_needed has changed. -2002-04-02 Richard Henderson +2002-10-29 Jan Hubicka - * doc/standards.texi: Document required freestanding libc entry points. + * toplev.c (rest_of_compilation): Reorganize way reg_scan is called + before final pass. -2002-04-02 Alexandre Oliva +2002-10-29 Eric Botcazou - * config/mips/mips.c (mips_va_arg): Apply big-endianness address - offset before loading address of argument passed by transparent - reference. + PR optimization/8334 + * expr.c (expand_expr) [PLUS]: Don't use simplify_binary_operation; + check for zero operands explicitly. -2002-04-02 Richard Henderson +2002-10-29 Richard Sandiford - * fixinc/inclhack.def (AAB_solaris_sys_varargs_h): Move and - rename solaris_sys_varargs_h. + * config/mips/mips.md (extv, extzv, insv): Set size of referenced + memory after adjusting to BLKmode. -Tue Apr 2 06:47:40 2002 Richard Kenner +2002-10-29 Kazu Hirata - * stor-layout.c (layout_type, case ARRAY_TYPE): Give one-element array - the same mode as its component. + * config/h8300/h8300.h (MASK_*): New. + (TARGET_*): Use MASK_*. -2002-04-02 Richard Henderson +2002-10-28 Jason Thorpe - PR opt/420 - * config/m68k/m68k.md (dbcc peepholes): Match four forms of dbra. + * 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-04-01 Richard Henderson +2002-10-28 Kazu Hirata - PR target/1538 - * fixinc/inclhack.def (solaris_sys_varargs_h): New. - * fixinc/fixincl.x: Rebuild. + * ChangeLog.1: Fix typos. + * cse.c: Fix a comment typo. + * reload1.c: Likewise. -2002-04-01 Richard Henderson +2002-10-27 Hans-Peter Nilsson - * 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. + * fixinc/inclhack.def (libc1_G_va_list): Correct test_text. + * fixinc/tests/base/_G_config.h: New file. -2002-04-01 Loren J. Rittle +2002-10-27 Kazu Hirata - * doc/install.texi (*-*-freebsd*): Update. + * 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-04-01 Phil Edwards +2002-10-27 Kazu Hirata - * version.c: Fix misplaced leading blanks on first line. + * reload1.c (reload): Fix a comment typo. -2002-04-01 Vladimir Makarov +2002-10-27 Jan Hubicka - * config/pa/pa-pro-end.h (ASM_OUTPUT_ALIGNED_COMMON, - ASM_OUTPUT_ALIGNED_LOCAL): Redefine them. + * linux64.h (DEFAULT_PCC_STRUCT_RETURN): Define. -2002-04-01 Jim Blandy +2002-10-27 Zdenek Dvorak - * cppmacro.c (cpp_macro_definition): Do not emit spaces after - macro formal parameter names. + * 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-04-01 Bob Wilson +2002-10-26 Kazu Hirata - * config/xtensa/xtensa.c (xtensa_va_arg): Fix compiler warning - in previous change. + * 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-04-01 Bob Wilson +2002-10-26 Hans-Peter Nilsson - * config/xtensa/xtensa.c (xtensa_va_arg): Fix to handle arguments - for which MUST_PASS_IN_STACK is true (e.g., variable-sized types). + * 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. -2002-03-31 Richard Henderson + * config/mmix/mmix.md ("fixuns_truncdfdi2"): Replace unsigned_fix, + invalid for floating point mode result, with fix. - * config/ia64/unwind-ia64.c (alloc_spill_area): Fix offset. - (desc_frgr_mem): Fix reference to f16-f31. +2002-10-25 Mike Stump -Sun Mar 31 14:43:24 2002 Richard Kenner + Fixes gcc.dg/warn-1.c. + * c-typeck.c (warn_for_assignment): Don't print argument number, if zero. - * emit-rtl.c (adjust_address_1, offset_address): Cast value to - unsigned HOST_WIDE_INT, not unsigned int. +2002-10-26 Jan Hubicka -2002-03-31 Jakub Jelinek + * toplev.c (dump_file_index): Add DFI_ce3. + (dump_file_info): Likewise. + (rest_of_compilation): Run first ifcvt pass before tracer. - 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-10-25 Steve Ellcey -2002-03-31 Jakub Jelinek + * config/ia64/hpux.h (BITS_BIG_ENDIAN): Remove. - * config/sparc/sparc.c (function_arg_record_value_1): Pass complex - floating fields in float regs. - (function_arg_record_value_2): Likewise. +2002-10-25 Richard Henderson -2002-03-31 Jakub Jelinek + * real.c (real_to_decimal): If the >1 tens reduction loop results + in a negative exponent, fall into the <1 pten computation. - PR middle-end/6100 - * config/sparc/sparc.c (output_cbranch): Use REG_BR_PROB, not - REG_BR_PRED. - (output_v9branch): Likewise. +2002-10-25 Zack Weinberg -2002-03-31 Alexandre Oliva + 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. - * gcc.c: Revert previous patch for now. - * config/i386/djgpp.h: Likewise. +2002-10-25 Ulrich Weigand -2002-03-31 Richard Henderson + * config/s390/s390.md: Remove old-style peepholes. - PR target/3997 - * config/alpha/elf.h (ASM_OUTPUT_DEF): Tidy. - (ASM_OUTPUT_DEF_FROM_DECLS): New. +2002-10-25 Ulrich Weigand -2002-03-31 Richard Henderson + * config/s390/s390.c (s390_decompose_address): Do not range check the + displacement if base or index is the argument pointer register. - * libgcc2.c (__bb_exit_func): Make static. +2002-10-24 Hans-Peter Nilsson - * config/alpha/alpha.md (trap): New. + 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-03-31 Alexandre Oliva +2002-10-24 Igor Shevlyakov - * 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'. + * varasm.c (struct rtx_const): Array size 16 for V16QImode. -2002-03-31 Richard Henderson +2002-10-24 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. + * config/i386/i386.c (x86_output_mi_thunk): Fix x86_64 pic jump. -2002-03-30 David S. Miller +2002-10-24 Kazu Hirata - * config/sparc/linux.h (HANDLE_PRAGMA_PACK_PUSH_POP): Define. - * config/sparc/linux64.h (HANDLE_PRAGMA_PACK_PUSH_POP): Likewise. + * config/h8300/h8300.c (initial_offset): Simplify by using + round_frame_size. -2002-03-30 Roger Sayle - Richard Henderson +2002-10-24 Marek Michalkiewicz - * regmove.c (combine_stack_adjustments_for_block): Avoid - emitting a stack adjustment of zero bytes. Let delete_insn - update bb->head. + * doc/install.texi (avr): Update required binutils version. -2002-03-30 Richard Henderson +2002-10-24 Theodore A. Roth - * 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. + * doc/install.texi: Point avr users at more up-to-date information. -2002-03-30 Daniel Berlin +2002-10-24 Ulrich Weigand - * dwarf2out.c (dwarf2out_define): Remove start_source_file call, - CPP will start the file for us. + * config/s390/s390.md (movdi, movsi, movhi, movqi): Add peepholes2 + to pull operands out of the literal pool where possible. -2002-03-30 Richard Henderson +2002-10-24 Denis Chertykov - 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. + * config/avr/avr.c (init_cumulative_args): Test fntype for zero. -2002-03-30 Richard Henderson +2002-10-24 Steve Ellcey - 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. + * expr.c (convert_move): If unsignedp is less then zero there + is no equivalent code. -2002-03-30 Jakub Jelinek +2002-10-24 Zack Weinberg - 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. + * tree.def: Delete mention of nonexistent ARRAY_TYPE fields. -2002-03-30 David O'Brien +2002-10-24 Ulrich Weigand - * config/i370/linux.h: Update copyright. + * 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-03-30 Alexandre Oliva +2002-10-24 Kazu Hirata - * 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/h8300/h8300.c (round_frame_size): Replace 8 with + BITS_PER_UNIT. -2002-03-29 Richard Henderson +2002-10-24 Kazu Hirata - PR target/5672 - * expr.c (expand_expr): Pass along EXPAND_INITIALIZER one more place. + * config/h8300/h8300.h (EIGHTBIT_CONSTANT_ADDRESS_P): Make it + 64-bit safe. + (TINY_CONSTANT_ADDRESS_P): Likewise. -2002-03-29 Franz Sirl +2002-10-24 Richard Henderson - * config/rs6000/rs6000.c (rs6000_va_arg): Correctly set register count - for aggregate and TFmode types. + * 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-03-29 Richard Henderson +2002-10-24 Richard Henderson - PR target/5886 - * config/ia64/aix.h (CPP_PREDEFINES): Add -D_LP64. - * config/ia64/hpux.h, config/ia64/linux.h: Likewise. + PR opt/7944 + * reload.c (find_reloads_toplev): Mode of X is not important + when simplifying subregs of constants. -2002-03-29 Loren J. Rittle +2002-10-24 Richard Sandiford - * doc/install.texi (*-*-freebsd*): Fix last commit. + * 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-03-29 Richard Henderson +2002-10-24 Richard Sandiford - 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. + * optabs.c (expand_binop): Don't reuse the shift target in the + middle of shift sequences. -2002-03-29 Loren J. Rittle +2002-10-23 Ziemowit Laski - * 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. + * 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-03-29 Jakub Jelinek +2002-10-23 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. + * config/i386/i386.c (local_symbolic_operand): Move LABEL_REF test + after CONST test. -2002-03-29 Jakub Jelinek +2002-10-23 Steve Ellcey - * 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. + * config/ia64/ia64.c (hfa_element_mode): Don't allow 128 bit floats + in HFAs. -2002-03-28 Richard Henderson +2002-10-23 Richard Henderson - PR target/5715 - * config/alpha/osf.h (ASM_SPEC): Don't pass any special options - to GAS. Correct drift between alternatives. + * config/alpha/alpha.c (TARGET_ASM_CAN_OUTPUT_MI_THUNK): True. + (alpha_output_mi_thunk_osf): Handle vcall_offset. -2002-03-28 Richard Henderson +2002-10-23 Zack Weinberg - PR target/6087 - * reload1.c (fixup_abnormal_edges): Move insn to edge via sequence. + * 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. -2002-03-28 Alexandre Oliva + * 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. - * config/i386/freebsd.h (LINK_SPEC): Don't pass default - emulation to the linker. + * tree-inline.c (walk_tree): #undef WALK_SUBTREE_TAIL at end. -2002-03-28 Loren J. Rittle +2002-10-23 Ulrich Weigand - * config/alpha/freebsd.h (LINK_SPEC): Likewise. - * config/sparc/freebsd.h (LINK_SPEC): Likewise. + * 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-03-28 John David Anglin +2002-10-23 David Edelsohn + Geoff Keating - * pa-linux.h (LOCAL_LABEL_PREFIX): Define. + * 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. -Thu Mar 28 16:33:13 2002 Jeffrey A Law (law@redhat.com) +2002-10-23 Ulrich Weigand - * combine.c (simplify_and_const_int): Make sure to apply mask - when force_to_mode returns a constant integer. PR3311. + * libgcc2.c (__udiv_w_sdiv): Use attribute ((always_inline)) when + inlining it into other libgcc2 routines. + (__udivmoddi4): Likewise. -2002-03-28 Gerald Pfeifer +2002-10-22 Nathanael Nerode - * doc/invoke.texi (Warning Options): Refer to C++ Dialect Options - and Objective-C Dialect Options. + * doc/sourcebuild.texi (Test Suites): Improve. -2002-03-28 Richard Henderson +2002-10-22 Stan Shebs - * config/alpha/alpha.c (alpha_emit_conditional_branch): TFmode NE - comparison should be done vs !=0 not >0 return code. Tidy cases. + * config/rs6000/rs6000.c (rs6000_output_mi_thunk): Add missing + case for Darwin. -2002-03-28 Richard Henderson +2002-10-22 Jim Wilson - * 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. + * config/i386/i386.md (subdi3_1): Add call to ix86_binary_operator_ok. -2002-03-27 Andreas Schwab +2002-10-23 Jan Hubicka - * config/i386/i386.c (classify_argument): Also check for - QUAL_UNION_TYPE. + PR other/8289 + * xmmintrin.h: Add const to the argument of loads. -2002-03-27 Rainer Orth + * i386.md (pushv2di): New pattern. + PR target/6890 + * xmmintrin.h (_MM_TRANSPOSE4_PS): New. - * doc/install.texi (alpha*-dec-osf*): Don't need --enable-libgcj - any more. +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 -Wed Mar 27 22:52:02 CET 2002 Zdenek Dvorak + * 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. - * cfgrtl.c (merge_blocks_nomove): Use set_block_for_insn instead of - assigning to BLOCK_FOR_INSN directly. +2002-10-21 Dale Johannesen -Wed Mar 27 22:46:04 CET 2002 Jan Hubicka + * 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. - * i386.c (ix86_output_addr_diff_elt): Remove binutils bug workaround. + * 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-03-27 Richard Henderson +2002-10-21 Ulrich Weigand - * toplev.c (rest_of_compilation): Don't compile if we've had errors. + * 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-03-27 Richard Henderson +2002-10-21 Kazu Hirata - * 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. + * config/h8300/h8300.h (N_REG_CLASSES): Parenthesize. -2002-03-27 Richard Henderson +2002-10-20 Richard Henderson - PR target/6054 - * config/ia64/ia64.c (ia64_expand_call): Use pic patterns for - TARGET_CONST_GP. Simplify conditions. + * target.h (struct gcc_target): Line wrap. -2002-03-26 Vladimir Makarov + * 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. - * pa/pa-pro-end.h (CPP_PREDEFINES): Add -D__pro__. + * 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. - * pa/lib2funcs.asm: Don't use .SPACE and .SUBSPACE if __pro__ - or __rtems_ is defined. + * config/m68k/m68k.c (m68k_output_mi_thunk): Replicate mnemonic + selection logic from call patterns. -2002-03-26 Richard Henderson +2002-10-20 Mark Mitchell - * 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. + * config/m68k/m68k.c (m68k_output_mi_thunk): Fix typo. -2002-03-26 Richard Henderson +2002-10-20 Zdenek Dvorak - * config.gcc (sparc*-solaris): Use float_format=sparc. + 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-03-26 Richard Henderson +2002-10-20 Roger Sayle - * 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. + 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. -2002-03-26 Richard Henderson + * flags.h: Correct flag_schedule_interblock comments. + (flag_bounded_pointers): Remove prototype. + (flag_bounds_check): Correct comments. - * 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. + * 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. -2002-03-26 Richard Henderson + * 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. - * expr.h (ADD_PARM_SIZE): One more convert for INC. +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. -2002-03-26 David Edelsohn + * target.h (gcc_target): Update output_mi_thunk and + output_mi_vcall_thunk to take a HOST_WIDE_INT delta and + vcall_index. - * config/rs6000/aix51.h (WCHAR_TYPE): Define. + * 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. -2002-03-26 Hans Boehm + * doc/tm.texi (TARGET_ASM_OUTPUT_MI_THUNK): Update signature. + (TARGET_ASM_OUTPU_MI_VCALL_THUNK): Likewise. - * 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-10-19 Brad Lucier -2002-03-26 Bob Wilson + * real.c (do_add): Fix 0+0 sign corner case. + (do_divide): Fix Inf/0 corner case. - * config/xtensa/xtensa.c (xtensa_va_arg): Handle variable-sized types. +2002-10-20 Jan Hubicka -2002-03-26 Richard Earnshaw + * 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. - 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. + * xmmintrin.h (_mm_sqrt_sd): Accept two arguments. + (_mm_max_sd): Fix pasto. + (_mm_storeh_pd, _mm_storel_pd): Fix. -2002-03-26 Bob Wilson + * 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. - * config/xtensa/xtensa.c (xtensa_valid_move): Allow move from - a register into the MAC16 accumulator. + * xmmintrin.h (_mm_cvtps_pi16): Fix. -2002-03-26 Hartmut Penner +2002-10-19 Sebastian Pop - * config/s390/s390.c (s390_emit_epilogue): Change epilogue - code to not restoring global registers. + * dependence.c : Removed. + * Makefile.in : Remove dependence.o. -2002-03-26 Richard Henderson +2002-10-19 Jan Hubicka - * expr.h (ADD_PARM_SIZE): Cast INC to ssizetype. - (SUB_PARM_SIZE): Cast DEC to ssizetype. + * 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. - * config/alpha/alpha.c (alpha_va_arg): Read MUST_PASS_IN_STACK - types from the normal argument frame. + * i386.h (ALIGN_MODE_128): Update comment; add missing modes + (SSE_REG_MODE_P, MMX_REG_MODE_P): New macros. - * config/sparc/sparc.c (function_arg_pass_by_reference): Pass - variable sized objects by reference. - (sparc_va_arg): Receive them by reference too. + PR target/7693 + Patch by Shawn Wagner + * mmintrin.h: Replace pi64 by si64. -2002-03-25 Bruce Korb +2002-10-18 David Edelsohn - * Makefile.in(check-fixinc): run "$(MAKE) check" in the fixinc - directory when autogen is detected. + * 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-03-25 Richard Henderson +2002-10-18 Zack Weinberg - * 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. + * c-decl.c (start_decl): Point users of the old initialized- + typedef extension at __typeof__. -2002-03-26 Alan Modra +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. - * combine.c (simplify_comparison ): Correct - test for overflow of constant. +2002-10-18 Jason Thorpe -2002-03-25 Richard Earnshaw + * 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. - 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-10-17 Roger Sayle -2002-03-22 Nick Clifton + * doc/c-tree.texi: Update description of COND_EXPR tree nodes. - * 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-10-17 Geoffrey Keating -2002-03-25 Jakub Jelinek + * 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. - * regrename.c (build_def_use): Move recog_memoized - before extract_insn. +2002-10-17 Janis Johnson -2002-03-25 Jakub Jelinek + * Makefile.in (site.exp): Add ALT_CXX_UNDER_TEST and COMPAT_OPTIONS. - PR target/6043 - * expr.c (emit_group_store): Handle storing into CONCAT. +2002-10-17 Jason Thorpe -2002-03-25 Jakub Jelinek + * config/alpha/alpha.c (alpha_initialize_trampoline): Use + tramp, not addr, to pass the trampoline address to + __enable_execute_stack. - * regrename.c (build_def_use): Share RTL between MATCH_OPERATOR and - corresponding MATCH_DUP. +2002-10-17 Jan Hubicka -2002-03-24 Richard Henderson + * mmintrin.h: Guard by __MMX__ + * xmmintrin.h: Guard by __SSE__ - * unroll.c (unroll_loop): Zero label_map. + PR other/8062 + * xmmintrin.h (_MM_SHUFFLE2): New macro. + (_mm_load*_?d): New functions. + (_mm_set*_?d): New functions. + (_mm_store*_?d): New functions. - * gcse.c: Include except.h. - * Makefile.in (gcse.o): Update. +2002-10-16 Jan Hubicka -2002-03-24 Richard Henderson + 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. - * varasm.c (asm_emit_uninitialised): Revert 2002-03-14 change. - Do resolve_unique_section before shared data clause. + PR other/8048 + Found by Ian Ollmann + * xmmintrin.h (_mm_shuffle_pd): Fix typo. + (_mm_load?_pd): Likewise. + (_mm_store?_pd): Likewise. -2002-03-24 Richard Henderson + PR target/7386 + * i386.c (builtin_description):Drop cmpg[te]s[sd]. + * xmmintrin.h (__mm_cmpg[te]_s[sd]): Rewrite using + swapped alternative. - * config/alpha/elf.h (STARTFILE_SPEC): Use crtbeginT with -static. + PR opt/7630 + * reload1.c (reload_inner_reg_of_subreg): New argument output; + (push_reload): Update call. -2002-03-24 Richard Henderson +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. - * 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-10-15 Jim Wilson -2002-03-24 Richard Henderson + * reload1.c (merge_assigned_reloads): After converting overlapping + reloads to RELOAD_OTHER, abort if there are now conflicting reloads. - * mips.c (mips_function_value): Only promote_mode for non-libcalls. + * config/i386/i386.md (adddi3_1): Add call to ix86_binary_operator_ok. -2002-03-24 Neil Booth +2002-10-15 Jan Hubicka - 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. + * expr.c (do_tablejump): Fix typo in my previous commit. -2002-03-24 Stephane Carrez +2002-10-15 Richard Sandiford - * 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. + * config/mips/vr.h (DRIVER_SELF_SPECS): Change % +2002-10-15 Ulrich Weigand - * 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. + * 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-03-24 Richard Henderson +2002-10-15 Janis Johnson - 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. + * doc/install.texi: Formatting changes for conformance to HTML 4.01. -2002-03-23 Richard Henderson +2002-10-15 Ulrich Weigand - * config/sparc/sparc.c (sparc_emit_floatunsdi): New. - * config/sparc/sparc-protos.h: Update. - * config/sparc/sparc.md (floatunsdisf2, floatunsdidf2): New. + PR opt/7409 + * loop.c (loop_regs_scan): Mark registers used for function + argument passing as MAY_NOT_OPTIMIZE. -2002-03-23 Richard Henderson +2002-10-14 Jan Hubicka - * config/sparc/gmon-sol2.c (internal_mcount): Assume either - _start or _init begins the text segment. + * 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. -2002-03-23 Alan Modra + * 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. - * combine.c (simplify_comparison): When widening modes, ignore - sign extension on CONST_INTs. + PR c++/6419 + (expand_expr): Use DECL_RTL_SET_P. -2002-03-22 Bob Wilson +2002-10-14 Roger Sayle - * config/xtensa/xtensa.c (print_operand): Fix incorrect mode - passed to adjust_address. Fix comment formatting. + * combine.c (simplify_set): Treat MODE_CC registers like cc0. -2002-03-22 Alexandre Oliva +2002-10-14 Roger Sayle + Zack Weinberg - * config/mips/mips.h (MASK_RETURN_ADDR): Define. - (TARGET_PTRMEMFUNC_VBIT_LOCATION): Define. + * config/i386/i386.c (k6_cost): Correct typo. -2002-03-22 Richard Henderson +2002-10-14 Mark Mitchell - * 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. + PR optimization/6631 + * alias.c (objects_must_conflict_p): Check honor_readonly when + examining TYPE_READONLY. + * function.c (assign_stack_temp_for_type): Likewise. - * config/alpha/osf.h (CPP_SUBTARGET_SPEC): Add __EXTERN_PREFIX. - (HANDLE_PRAGMA_EXTERN_PREFIX): New. +2002-10-14 Falk Hueffner - * config/i386/sol2.h (CPP_PREDEFINES): Add __PRAGMA_REDEFINE_EXTNAME. - (HANDLE_PRAGMA_REDEFINE_EXTNAME): New. - * config/sparc/sol2.h: Likewise. + * 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-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-10-14 Alexandre Oliva -2002-03-22 Alexandre Oliva + * config/mips/mips.c (print_operand): Increase buffer size for + real numbers. - * flow.c (calculate_global_regs_live): Clear aux fields of - ENTRY and EXIT. +2002-10-14 Richard Henderson -2002-03-22 Jakub Jelinek + PR opt/8165 + * gcse.c (adjust_libcall_notes): Revert last change. + * simplify-rtx.c (simplify_replace_rtx): Handle LO_SUM. - * 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-10-14 Andrew Haley -2002-03-22 Richard Henderson + * 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. - 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. + * tree-inline.c (expand_call_inline): Convert retvar to expected + type. -Fri Mar 22 16:00:06 CET 2002 Jan Hubicka +2002-10-14 Graham Stott - * 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. + * stmt.c (decl_conflicts_with_clobbers_p): Add REG_P check. -2002-03-21 Richard Henderson +2002-10-14 Aldy Hernandez - PR target/5996 - * fixinc/inclhack.def (solaris_stdio_tag): New. - * fixinc/fixincl.x: Regenerate. + * stmt.c: Fix typo in comment. -2002-03-21 Eric Botcazou +2002-10-14 J"orn Rennecke - PR c/5597 - * c-typeck.c (process_init_element): Flag non-static - initialization of a flexible array member as illegal. + * 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-03-22 Alan Modra +2002-10-14 Jakub Jelinek - * 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. + * config/i386/i386.h (ASM_OUTPUT_REG_PUSH, ASM_OUTPUT_REG_POP): + Handle TARGET_64BIT. -2002-03-21 Aldy Hernandez +2002-10-14 Richard Sandiford - * langhooks.c (lhd_tree_inlining_cannot_inline_tree_fn): Check - flag_really_no_inline instead of optimize == 0. + * 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. - * c-objc-common.c (c_cannot_inline_tree_fn): Same. +2002-10-14 Richard Sandiford - * cp/tree.c (cp_cannot_inline_tree_fn): Same. + * 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. - * flags.h (flag_really_no_inline): New. +2002-10-13 Richard Henderson - * c-common.c (c_common_post_options): Initialzie - flag_really_no_inline. + * rtl.c (shallow_copy_rtx): Use memcpy for the entire node. - * toplev.c (flag_really_no_inline): New. +2002-10-12 Neil Booth -2002-03-21 Jakub Jelinek + PR preprocessor/7862 + PR preprocessor/8190 + * gcc.c (cpp_unique_options): Don't delete .d files. + Remove stray whitespace. - * config/avr/avr.md (length): Fix length computation for - conditional branches. +2002-10-12 Naohiko Shimizu -2002-03-21 Richard Henderson + * 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. - * config/rs6000/rs6000.c (rs6000_select_rtx_section): Put symbolic - constants in .data when -fpic. +2002-10-11 Geoffrey Keating -2002-03-21 Tom Tromey + * 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. - * config/i386/sol2.h (ASM_QUAD): Undef. Fixes PR bootstrap/5948. +2002-10-11 Janis Johnson -2002-03-21 Gerald Pfeifer + * doc/compat.texi: Add info about C++ libraries. - * doc/contrib.texi (Contributors): Use GNU/Linux instead of Linux - where appropriate. +2002-10-11 Richard Henderson -Thu Mar 21 09:50:48 2002 Richard Kenner + PR opt/8165 + * gcse.c (adjust_libcall_notes): Also adjust notes for INSN. - * config/ia64/ia64.c (hfa_element_mode, case ARRAY_TYPE): Recurse. +2002-10-11 John David Anglin - * expr.c (emit_group_store): Don't copy const0_rtx to a CONCAT. + * 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-03-21 Eric Botcazou - Richard Henderson +2002-10-11 Jan Hubicka - PR c/5354: - * c-common.c (c_expand_expr): Preserve result of a statement - expression if needed. + * calls.c (expand_call): Simplify noreturn call. -2002-03-21 Jakub Jelinek + 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. - 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. + * cfgcleanup.c (insn_match_p): Verify sibcall flag for calls to. -2002-03-21 Rainer Orth +2002-10-11 J"orn Rennecke - * fixinc/inclhack.def (alpha_assert): Fix assert macro in Tru64 - UNIX assert.h. - * fixinc/fixincl.x: Regenerate. + * sh.md (movv8qi_i+2): For V8QI destinations, generate V4HI + register for mperm_w operation. -2002-03-20 Jason Merrill +2002-10-11 J"orn Rennecke - * config/i386/cygwin.h (DWARF2_UNWIND_INFO): Define to 0. + * emit-rtl.c (gen_lowpart_common): When asked to make a vector from + an integer, use simplify_gen_subreg. -2002-03-20 Bob Wilson +2002-10-10 Aldy Hernandez - * config/xtensa/xtensa.h (ASM_OUTPUT_POOL_PROLOGUE): Emit a - ".literal_position" directive before the constant pool. + * extend.texi (Vector Extensions): Remove comment about single + element vectors. -2002-03-20 Gerald Pfeifer +2002-10-10 Kaveh R. Ghazi - * doc/contrib.texi (Contributors): Update Geoffrey Keating. - Add Craig Rodrigues. - Add Brad Lucier to testers. + * fold-const.c (size_htab_hash): Use htab_hash_pointer. + * function.c (insns_for_mem_hash): Likewise. + * varasm.c (STRHASH): Likewise. -2002-03-20 Jakub Jelinek +2002-10-10 Stuart Hastings - 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. + * 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-03-20 Jakub Jelinek +2002-10-10 Jakub Jelinek - PR bootstrap/4192 - * config/fr30/fr30.md (jump): Remove clobber of fixed register. + * config/i386/i386.md (tls_local_dynamic_base): Put pic reg + into proper operand. - * genemit.c (output_added_clobbers_hard_reg_p): Only output return - stmt if some case has been output. +2002-10-10 Denis Chertykov -2002-03-20 Jakub Jelinek + * config/ip2k/ip2k.c (function_epilogue): Optimize stack + deallocation. + * config/ip2k/libgcc.S: Combine routines used by function + epilogue. - 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-10-10 Jim Wilson -2002-03-20 Philip Blundell + * cse.c (fold_rtx): Don't perform associative optimization for DIV and + UDIV. - * config/arm/arm.c (arm_output_epilogue): Don't generate separate - return instruction if PC was popped. +2002-10-10 David Edelsohn -2002-03-20 Hans-Peter Nilsson + * 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. - * 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. +2002-10-10 Jan Hubicka - * config/mmix/mmix.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Don't define. + PR target/5610 + * invoke.texi (-msse-math): Kill + (-msse): Add note to mfpmath=sse. -2002-03-19 Jim Blandy +2002-10-10 Jan Hubicka - * c-lex.c (cb_file_change): Pass the #inclusion's line number to - the start_source_file debug hook, not the current line number. + PR target/7723 + * i386.c (ix86_expand_vector_move): Do not generate const0->mem moves. - * 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-10-10 Neil Booth -2002-03-19 David Edelsohn + 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. - * config/rs6000/rs6000.c (rs6000_override_options): Only warn - about -fpic/-fPIC if extra_warnings set. +2002-10-06 Richard Henderson -2002-03-19 Richard Henderson + * toplev.c (rest_of_compilation): Revert opt/2960 change. - * flow.c (EH_USES): Provide default. - (calculate_global_regs_live): Use it for EH edges and noreturn calls. - * doc/tm.texi (EH_USES): New. +2002-10-09 Zack Weinberg - * config/ia64/ia64.c (ia64_eh_uses): New. - * config/ia64/ia64-protos.h: Update. - * config/ia64/ia64.h (EH_USES): New. + 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. -2002-03-20 Alan Modra + * 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." - * 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-10-09 Kaveh R. Ghazi -2002-03-19 Richard Henderson + * loop.c: Revert 2002-08-15 change. + (LOOP_REGNO_NREGS): Ensure type is int. - 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-10-09 David Edelsohn -2002-03-19 Richard Henderson + * 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. - PR 5977, 5991 - * config/ia64/ia64.c: Revert 2002-03-01 patch. - * config/ia64/ia64.h (INIT_EXPANDERS): New. +2002-10-09 Kaveh R. Ghazi -2002-03-19 Olivier Hainque + * 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. - * varasm.c (output_constant_def): Don't call ENCODE_SECTION_INFO - for INTEGER_CST. +2002-10-08 Aldy Hernandez -2002-03-19 Jason Merrill + * config/rs6000/rs6000.c (rs6000_ra_ever_killed): Call + prologue_epilogue_contains instead of using REG_MAYBE_DEAD notes. - * varasm.c (globalize_decl): Get the name from the RTL, not - DECL_ASSEMBLER_NAME. +2002-10-09 J"orn Rennecke - * Makefile.in (LIBGCC2_DEBUG_CFLAGS): Set to -g. + * sh.md (ffssi2): Fix emitted code. -2002-03-19 Dale Johannesen +2002-10-09 Ulrich Weigand - PR optimization/5999, middle-end/5731 - * expr.c (expand_expr) [RDIV_EXPR]: Only convert real divisions into - multiplications by reciprocals. + * cse.c (insn_live_p): Pass insn pattern, not full insn + to may_trap_p. -2002-03-19 Bob Wilson +2002-10-09 Neil Booth - * config/xtensa/xtensa.md (adddi3, adddi_carry, subdi3, - subdi_carry): Define. + * cppmacro.c (paste_tokens): Only allow / to paste with =. -Tue Mar 19 14:12:32 2002 Richard Kenner +2002-10-09 David Edelsohn - * config/sparc/sparc.h (CAN_ELMINIATE): Can only eliminate FP - in favor of SP if FRAME_POINTER_REQUIRED is false. + * 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-03-19 Jakub Jelinek +2002-10-09 Alan Modra - 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. + * libgcc2.c (__floatdisf): Properly cure double rounding. -2002-03-18 Kaveh R. Ghazi +2002-10-09 Gabriel Dos Reis - * gcse.c (insert_insn_end_bb): Fix typo in last change. + * c-common.c (cb_register_builtins): Define __WCHAR_MAX__. + * doc/cpp.texi (Common Predefined Macros): Document. -2002-03-18 Mark Mitchell +2002-10-09 Gabriel Dos Reis - * calls.c (precompute_arguments): Do not assume that temporaries - can be destroyed after expanding the argument. - (expand_call): Likewise. + PR doc/7484 + * doc/invoke.texi (Option Summary): List + -Wmissing-declarations as a C only option. -2002-03-18 Ashif Harji +2002-10-08 Jakub Jelinek - * 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. + * 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-03-18 Alan Modra - David Edelsohn +2002-10-08 Roger Sayle - * 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. + PR target/8087 + * simplify-rtx.c (avoid_constant_pool_reference): Allow constant + pool references that are constructed using LO_SUM. -2002-03-18 Bob Wilson +2002-10-08 Nathan Sidwell - * config/xtensa/xtensa.h (GO_IF_MODE_DEPENDENT_ADDRESS): Treat - constant-pool addresses as "mode-dependent". + * 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. -Mon Mar 18 18:12:48 CET 2002 Jan Hubicka +2002-10-08 Zack Weinberg - * 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. + * 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. - * linux64.h (MULTILIB_DEFAULTS): Set to "m64". - (t-linux64): Add multilibing + * diagnostic.c, gcc.c, gcov.c: Globally replace GCCBUGURL with + bug_report_url. - * i386.h (PROMOTE_PROTOTYPES): Set to 0 for x86_64. +2002-10-08 Nick Clifton - * gcse.c (hash_scan_set): Refuse instructions with EH edges. + * 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. - * basic-block.h (fixup_abnormal_edges): Declare. - * reload1.c (fixup_abnormal_edges): Make global. - * reg-stack.c (convert_regs): Use it. +2002-10-08 Ulrich Weigand - * gcse.c (insert_insn_end_bb): Handle trapping insns. + * config/s390/s390.md ("*doloop_si_long"): Add missing operand. + ("*doloop_di_long"): Likewise. - * reload1.c (reload_cse_delete_noop_set): Purge dead edges. +2002-10-08 Jan Hubicka - * recog.c (peephole2_optimize): Re-distribute EH edges. + * print-rtl.c (print_rtx): Increase buffer size for real numbers. -2002-03-18 Jason Merrill +2002-10-08 Richard Sandiford - * configure.in: Disable checking by default on release branch. + * config/mips/mips.md (define_attr cpu): Add r4111. -2002-03-18 Jakub Jelinek +2002-10-08 Anthony Green - PR target/5740 - * expr.c (emit_group_load): Use extract_bit_field if - needed for CONCAT arguments. + * bitmap.c (bitmap_equal_p): Clear all bitmap_head fields. -2002-03-18 Richard Earnshaw +2002-10-08 Michael Hayes - 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. + * config/c4x/c4x.c (c4x_print_operand): Enlarge buffer + for REAL_VALUE_TO_DECIMAL output. -2002-03-17 Richard Henderson +2002-10-07 David Edelsohn - * config/alpha/alpha.c (alpha_emit_set_const_1): Build add insns - explicitly. + * 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-03-17 Kaveh R. Ghazi +2002-10-07 Dale Johannesen - * ifcvt.c (dead_or_predicable): Fix uninitialized variable. + * 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-03-17 David Edelsohn +2002-10-07 Richard Henderson - * expr.c (expand_expr): Sign-extend CONST_INT generated from - TREE_STRING_POINTER. + * config/i960/i960.c (i960_setup_incoming_varargs): Create a + new rtx for comparing the argument pointer against zero. + (i960_va_start): Similarly. -2002-03-16 Richard Henderson +2002-10-07 Richard Henderson - * config/ia64/ia64.c (ia64_attribute_table): Move before - targetm definition. Make static. + * 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-03-16 Neil Booth +2002-10-07 Richard Henderson - * cppinit.c (print_help): Display -MD and -MMD. - Don't display usage string. Update assertion syntax and - typo. + * config/fp-bit.c (EXTENDED_FLOAT_STUBS): Flush out all XF/TFmode + entry points; use void return value and argument list. -2002-03-16 Stephane Carrez +2002-10-05 Naohiko Shimizu - * 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. + * 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 - * 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. + PR c/7411 + * expr.c (expand_expr) [PLUS]: Simplify after the operands + have been expanded in EXPAND_NORMAL mode. -2002-03-14 Richard Earnshaw - Jeroen Dobbelaere +2002-10-06 Richard Henderson - PR target/5828 - * arm.c (arm_output_epilogue): Fix floating-point register save - adjustment when using a frame pointer. + * config/rs6000/rs6000.md (load_toc_v4_PIC_2): Fix base constraint. -2002-03-13 Hans-Peter Nilsson +2002-10-06 Richard Henderson - * 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. + PR optimization/2960 + * toplev.c (rest_of_compilation): Don't copy_loop_headers if + optimize_size. -2002-03-13 David Edelsohn +2002-10-06 Alexandre Oliva - * 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. + * config/mips/mips.h (SIZE_TYPE, PTRDIFF_TYPE): Override + previously definitions. -2002-03-13 Jakub Jelinek +2002-10-06 Frank Ch. Eigler - 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. + * cppinit.c (init_standard_includes, parse_option): Use strncmp. + * c-opts.c (find_opt): Similarly. -2002-03-13 Jason Merrill +2002-10-05 Jakub Jelinek - * gthr-posix.h (__gthread_active_p): Move __gthread_active_ptr - into the function and constify it. - * gthr-dce.h, gthr-solaris.h: Likewise. + * 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-03-12 Hans-Peter Nilsson +2002-10-04 Bruce Korb - * config/cris/cris.c (cris_print_operand): Avoid - traditional-warning for 0xffffffff. - (cris_expand_builtin_va_arg): Do all computations on trees. + * fixinc/inclhack.def(hpux11_abs): use format fix + * fixinc/fixincl.x: regenerate + * fixinc/tests/base/stdlib.h: accommodate new fix test -2002-03-13 Ulrich Weigand +2002-10-05 Jan Hubicka - * expr.c (expand_expr, case NE_EXPR): Do not call copy_to_reg with - VOIDmode operand. Add compile-time optimization for constant results. + * c-common.c (cb_register_builtins): Use really_no_inline. -2002-03-13 Hartmut Penner +2002-10-04 David Edelsohn - * config/s390/s390.h (PROFILE_BEFORE_PROLOGUE): Emit profile code - before prologue, to avoid scheduling problems. + * unroll.c (copy_loop_body): Remove REG_EQUAL note attached to + copied instruction if the note is not loop invariant. -2002-03-13 Jakub Jelinek +2002-10-04 Loren J. Rittle - * config/sparc/sparc.h (INITIAL_FRAME_POINTER_OFFSET): Remove. - (ELIMINABLE_REGS): Add sfp->sp. - (INITIAL_ELIMINATION_OFFSET): Compute sfp->sp offset too. + * gcc/ginclude/stddef.h: Support the FreeBSD 5 typedef system. -2002-03-13 Jakub Jelinek +2002-10-04 Steve Ellcey - PR optimization/5892 - * config/ia64/ia64.c (rotate_one_bundle): Update current packet. + * 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-03-13 Jakub Jelinek +2002-10-04 Steve Ellcey - * loop.c (basic_induction_var): Don't call convert_modes if mode - classes are different. + * fixinc/inclhack.def (hpux11_abs): New. + (stdio_va_list): change __va_list__ to __gnuc_va_list. + * fixinc/fixincl.x: Rebuild. -2002-03-12 Richard Henderson +2002-10-04 Roger Sayle - PR optimization/5901 - * function.c (reposition_prologue_and_epilogue_notes): Position - the markers after/before the last/first insn not deleted. + * 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-03-12 Richard Henderson +2002-10-04 Kaveh R. Ghazi - 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. + * mips.c (mips_const_double_ok): Delete unused variable. - * 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. + * gengtype.c (rtx_next): Change type to int. - * 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-10-04 Andreas Jaeger -2002-03-13 Aldy Hernandez + * config/i386/t-linux64 (MULTILIB_OSDIRNAMES): Fix value. - * expmed.c (store_bit_field): Reset alias set for memory. - (extract_bit_field): Same. +2002-10-04 Richard Henderson -2002-03-12 Chris Meyer + * 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. - * genflags.c (gen_insn): Use IS_VSPACE. - * genoutput.c (output_insn_data): Likewise. - (process_template): Likewise. +2002-10-03 Andreas Jaeger -2002-03-12 Bob Wilson + * gengtype.c (adjust_field_rtx_def): Cast variables of type size_t + to unsigned long, adjust printf format string. + (output_mangled_typename): Likewise. - * config/xtensa/xtensa.c (xtensa_expand_block_move): Use - validize_mem() instead of change_address to avoid clobbering - memory attributes. +2002-10-03 Jason Thorpe -2002-03-12 Jakub Jelinek + * 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". - * c-lex.c (cb_ident, c_lex): Remove unnecessary cast. - (lex_string): Use unsigned char pointers. +2002-10-03 Mark Mitchell -2002-03-12 Ulrich Weigand + * doc/invoke.texi (-Wabi): Document mangling bug. - * reload1.c (reload): Ignore MEM REG_EQUIV notes if the equivalent - is not a valid memory_operand. +2002-10-04 Alan Modra -2002-03-12 Bob Wilson + * 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. - * 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-10-03 Richard Henderson -2002-03-12 Michael Matz + * 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. - * config/rs6000/rs6000.md (ne0+4): Add extra CLOBBER. - (ne0+5): Use new clobber to generate proper shift pattern. +2002-10-03 Richard Henderson -2002-03-12 Bob Wilson + * real.h (struct real_value): Use ENUM_BITFIELD. - * config/xtensa/t-xtensa (CRTSTUFF_T_CFLAGS_S): Define. +2002-10-03 Richard Henderson -2002-03-12 Bob Wilson + * config/i960/i960.md (call, call_value): Use emit_call_insn. - * config/xtensa/xtensa.h (ASM_OUTPUT_POOL_PROLOGUE): Switch - to function_section before writing out the constant pool. +2002-10-03 Steve Ellcey -2002-03-12 Zack Weinberg + * config/pa/pa64-hpux.h (INIT_ENVIRONMENT): New. - * Makefile.in: Give texi2pod its input file as a command - line argument, not on stdin. +2002-10-03 Steve Ellcey -2002-03-12 Andrew MacLeod + * 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. - * config/sparc/sparc.h (RETURN_ADDR_RTX): Include v9 stack bias in - address calculation. +2002-10-03 Jan Hubicka -2002-03-12 Ulrich Weigand + * i386.c (athlon_cost): Fix the move costs. - * 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-10-03 Jan Hubicka -2002-03-11 Neil Booth + * final.c (final): Use symbol name as function name for profiling. + * profile.c (get_exec_counts): Likewise. + (branch_prob): Likewise. - * 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-10-03 Jakub Jelinek -2002-03-11 Ulrich Weigand + * longlong.h (__udiv_qrnnd): Remove PARAMS from prototype. - * config/s390/s390.h (REG_ALLOC_ORDER): Add missing register. +2002-10-03 Jakub Jelinek -2002-03-11 Douglas B Rupp + * 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. - * toplev.c (vms_fopen): Remove, not needed. + * 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. - * vmsdbgout.c (lookup_filename): Adjust creation date for GMT. +2002-10-03 Jan Hubicka - * config/alpha/xm-vms.h (__UNIX_FWRITE): Define. + * predict.c (choose_function_section): Avoid choice for linkonce functions. - * config/alpha/alpha.c (alpha_sa_size, VMS): Don't reserve space - for FP, already done later. +2002-10-03 Jan Hubicka - * toplev.c (debug_args): Add entry for VMS_DEBUG. - * vmsdbgout.c (vmsdbgout_init): Fix typo in call to xmalloc. + * i386.md (lea to mul peep2): Fix condition. -2002-03-10 Richard Henderson +2002-10-02 John David Anglin - PR 5693 - * reload.c (copy_replacements_1): New. - (copy_replacements): Use it to recurse through the rtx. + * pa-linux.h (FUNCTION_OK_FOR_SIBCALL): Delete macro. + * pa32-linux.h (FUNCTION_OK_FOR_SIBCALL): Define. -2002-03-10 Richard Henderson +2002-10-02 Richard Henderson - * sched-rgn.c (add_branch_dependences): Don't allow insns that throw - to move away from the end of the block. + PR opt/7124 + * config/i386/i386.c (ix86_register_move_cost): Increase cost + for secondary_memory_needed pairs. -2002-03-10 Neil Booth +2002-10-02 Nathanael Nerode - PR preprocessor/5899 - * cppinit.c (init_dependency_output): Don't ignore -dM etc. + * doc/vms.texi: Blow away false include file section. -2002-03-10 Kaveh R. Ghazi +2002-10-02 Roger Sayle - * combine.c (make_extraction): Fix error in last change. + 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-03-09 Jakub Jelinek +2002-10-02 Jan Hubicka - PR optimization/5172, optimization/5200 - * gcse.c (gcse_main): Disable store_motion. + * i386.c (print_operand_address): Use RIP addressing for offsetted + label refs too. -2002-03-09 Andreas Schwab +2002-09-30 David S. Miller - * gcc.c (validate_all_switches): Also handle `%W{...}'. + 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-03-09 Jakub Jelinek +2002-10-01 Roger Sayle - PR middle-end/5877 - * expr.c (highest_pow2_factor): Check TREE_INT_CST_LOW - even for non-representable constants. + * unroll.c (loop_iterations): Revert 2002-09-08 change. -Sat Mar 9 07:20:01 2002 Richard Kenner +2002-10-01 Richard Henderson - * 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. + * 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. - * combine.c (make_extraction): Don't make extension of CONST_INT. +2002-10-01 Jason Thorpe -2002-03-08 Kaveh R. Ghazi + * config/vax/elf.h (FUNCTION_PROFILER): Fix __mcount call. - * sparc.c (arith_4096_operand): Fix error in last change. +2002-10-01 Richard Henderson -2002-03-08 Aldy Hernandez + * calls.c (precompute_register_parameters): Force non-legitimate + constants into pseudos. - * config/rs6000/rs6000.c (rs6000_va_arg): Fix alignment for - vectors. +2002-10-01 Nick Clifton -2002-03-08 Aldy Hernandez + * config/rs6000/spe.md (spe_evrlwi): Add missing third operand + to assembler template. - * config/rs6000/sysv4.h (BIGGEST_ALIGNMENT): Change for altivec. +2002-10-01 Richard Henderson -2002-03-08 Craig Rodrigues + * dwarf2out.c (loc_descriptor_from_tree): Relax requirement + for TLS debug info to !DECL_EXTERNAL. - * doc/install.texi (--with-libiconv-prefix): Document. +2002-10-01 Matt Thomas + Jason Thorpe -2002-03-08 Michael Y. Brukman + * 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. - * doc/sourcebuild.texi: Fix typo. +2002-10-01 Richard Henderson -2002-03-08 Jakub Jelinek + * config/vax/vax.md (call_pop, *call_pop, call_value_pop) + (*call_value_pop, call, call_value): Add dwarf2 EH support. + (*call): New insn. - PR c/3711 - * builtins.c (std_expand_builtin_va_arg): Do all computations on - trees. +2002-10-01 Nathan Sidwell -Fri Mar 8 06:48:45 2002 Richard Kenner + PR c/8083 + * c-typeck.c (build_c_cast): Warn about type punning which breaks + type based aliasing. - * rtl.c (copy_most_rtx): Move from here ... - * emit-rtl.c (copy_most_rtx): ... to here. +2002-10-01 Mark Mitchell -2002-03-08 Richard Earnshaw + * stor-layout.c (update_alignment_for_field): New function. + (place_union_field): Use it. + (place_field): Likewise. - * combine.c (simplify_comparison): If simplifying a logical shift - right and compare with constant, force the comparison to unsigned. +2002-10-01 Nathan Sidwell -2002-03-07 Ulrich Weigand + PR other/8077 + * gcc.c (cc1_options): Add space on -auxbase-strip. - * genextract.c (walk_rtx): Recurse into MATCH_PAR_DUP. - genoutput.c (scan_operands): Recurse into MATCH_PAR_DUP - and MATCH_OP_DUP. +2002-10-01 Jim Wilson -2002-03-07 Aldy Hernandez + * config/v850/v850.h (EPILOGUE_USES): Define. - * doc/invoke.texi: Add documentation for -mabi=no-altivec. +2002-09-30 Andrew Haley - * config/rs6000/rs6000.c (rs6000_parse_abi_options): Add - -mabi=no-altivec - (alt_reg_names): Remove % for vrsave. + * flow.c (insn_dead_p): When using non-call-exceptions, don't + eliminate insns that may trap. + * cse.c (insn_live_p): Likewise. -2002-03-06 Jeffrey A Law (law@redhat.com) +2002-10-01 Richard Sandiford - * ssa-ccp.c (ssa_fast_dce): Update the DF def-use chains - after completing fast dead code elimination. + * 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-03-06 Richard Henderson +2002-10-01 Richard Sandiford - 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. + * 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-03-06 Ulrich Weigand +2002-10-01 Richard Sandiford - * 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. + * 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-03-06 Ulrich Weigand +2002-10-01 Richard Sandiford - * reload1.c (reload): Unshare all rtl after reload is done. + * 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-03-06 Jakub Jelinek +2002-10-01 Richard Sandiford - * ssa-ccp.c (ssa_ccp_substitute_constants): Backout 2002-03-05 - patch. + * 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-03-05 Zack Weinberg +2002-09-30 Ulrich Weigand - * cppmain.c (setup_callbacks): Disable #pragma and #ident - callbacks when processing assembly language. + * 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-03-06 John David Anglin +2002-09-30 Bob Wilson - * pa.h (ASM_FILE_END): Define. - * som.h (ASM_FILE_END): Delete. + * 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. - * pa.c (function_arg): Don't pass floats in general registers in - indirect calls if TARGET_ELF32. +2002-09-30 John David Anglin -2002-03-05 Richard Henderson + * 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. - * config/i386/i386.md (floatsidf2): Conditionalize on hard-float. +2002-09-30 Jan Hubicka -2002-03-05 Jakub Jelinek + * reload.c (push_reload): Handle subregs and secondary memory. + * reload1.c (gen_reload): Likewise. - * mklibgcc.in: Prepend a tab before .hidden, add $flags to gcc - -r command line. Don't hide any symbols if not building - shared libgcc. + * jump.c (reg_or_subregno): New function. + * rtl.h (reg_or_subregno): Declare + * unroll.c (find_splittable_givs): Handle subregs. -2002-03-05 Jakub Jelinek +2002-09-30 Mark Mitchell - * expmed.c (emit_store_flag): Don't test BITS_PER_WORD * 2 - wide volatile memory by parts. + * store-layout.c (finish_record_layout): Add free_p parameter. + (layout_type): Pass it. + * tree.h (finish_record_layout): Update prototype. -2002-03-05 Jakub Jelinek +2002-09-30 Jan Hubicka - * ssa-ccp.c (ssa_ccp_substitute_constants): Don't crash if def - is NULL. + * i386.h (TARGET_CPP_CPU_BUILTINS): Define __SSE_MATH__. -2002-03-05 Richard Henderson + * gcse.c (cprop_jump): Check that the register has not + been modified + (cprop_jump): Likewise. - * config/rs6000/rs6000.h (TOTAL_ALTIVEC_REGS): Fix off-by-one error. +2002-09-30 Richard Earnshaw -2002-03-04 Krister Walfridsson + * 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. - * config.gcc (*-*-netbsd*): Add t-slibgcc-elf-ver to tmake_file. +2002-09-29 Richard Henderson -2002-03-05 Joseph S. Myers + * real.c (real_from_string): Apply sign last. Tidy exponent handling. - * configure.in: Increase required makeinfo version to 4.1. - * configure: Regenerate. +2002-09-29 Richard Henderson -2002-03-04 Joseph S. Myers + PR c/8002 + * combine.c (force_to_mode): Handle FLOAT_MODE destinations + for CONST_INT. - * doc/include/texinfo.tex: Update to version 2002-03-01.06. - * doc/invoke.texi: Fix @math uses. +2002-09-29 David Edelsohn -2002-03-02 Per Bothner + * real.h (ibm_extended_format): Declare. + * real.c (encode_ibm_extended, decode_ibm_extended): New + functions. - * gcc.c (option_map): Suport new --bootclasspath option. - --CLASSPATH is now just an alias for --classpath. +2002-09-29 Kaveh R. Ghazi -Sat Mar 2 06:30:14 2002 Richard Kenner + * darwin-protos.h (darwin_asm_output_dwarf_delta): Prototype. - * config/sparc/sparc.c (sparc_initialize_trampoline): Use - trunc_int_for_mode. + * ia64.c (ia64_hpux_asm_file_end): Const-ify. - * emit-rtl.c (offset_address): Call update_temp_slot_address. +2002-09-29 John David Anglin -2002-03-01 Richard Henderson + * expmed.c (extract_bit_field): Fix bit-field extraction from SUBREGs. - * 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-09-29 Kazu Hirata -2002-03-01 Zack Weinberg + * 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. - * doc/cpp.texi: Clarify documentation of relationship between - #line and #include. +2002-09-26 Theodore A. Roth -2002-02-28 Richard Henderson + * config/avr/avr.c: Eliminate use of _PC_ in pc relative insns. + * config/avr/avr.md: Ditto. - * 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-09-27 Alexander N. Kabaev -2002-02-28 David O'Brien + 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. - * 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-09-27 Richard Henderson -2002-02-28 Alexandre Oliva + * unroll.c (simplify_cmp_and_jump_insns): New. + (unroll_loop): Use it. Use simplify_gen_foo+force_operand + instead of expand_simple_foo. - * gcc.c (init_gcc_specs): Get -static and -static-libgcc to - override -shared and -shared-libgcc. +2002-09-27 Richard Henderson -2002-02-28 Andrew MacLeod + PR optimization/7520 + * cfganal.c (flow_active_insn_p): New. + (forwarder_block_p): Use it. - * dwarf2out.c (stack_adjust_offset): Add support for POST_INC, - POST_DEC, and POST_MODIFY. +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-02-28 Joseph S. Myers +2002-09-27 Kazu Hirata - * doc/invoke.texi, doc/standards.texi: Link to - gcc-3.1/c99status.html. + * 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-02-28 Richard Henderson +2002-09-26 David S. Miller - * 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. + PR optimization/7335 + * calls.c (emit_library_call_value_1): Passing args by reference + converts a CONST function into a PURE one. -2002-02-28 Jakub Jelinek +2002-09-26 David Edelsohn - * mklibgcc.in: Don't use GNU make extension. + * 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-02-28 Richard Henderson +2002-09-26 David Edelsohn + Dale Johannesen - * 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. + * config/rs6000/rs6000.c (rs6000_emit_move): Insert zero-extend + in RTL for sub-word loads from memory. -2002-02-28 Bo Thorsen +2002-09-26 Richard Henderson - * config/i386/linux64.h (LINK_SPEC): Fix 32/64 bit compilation. - (STARTFILE_SPEC): Add 64 bit files. - (ENDFILE_SPEC): Likewise. + PR c/7160 + * sched-deps.c (sched_analyze_insn): Make clobber insns depend + on call insns. -Don Feb 28 16:41:19 CET 2002 Jan Hubicka +2002-09-26 Richard Henderson - * cfgrtl.c (purge_dead_edges): Fix handling of EH edges. + * emit-rtl.c (const_double_htab_eq): Remove unused variable. - * i386.h (CONDITIONAL_REGISTER_USAGE): Do not write to - PIC_OFFSET_TABLE_REGNUM when it is INVALID_REGNUM +2002-09-26 Chris Lattner - * x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Always define. + * ssa.c (rename_insn_1): Handle RENAME_NO_RTX correctly when + handling undefined values. -2002-02-28 David Edelsohn +2002-09-26 Richard Henderson - * config/rs6000/aix43.h (THREAD_MODEL_SPEC): Delete. - * config/rs6000/aix51.h (THREAD_MODEL_SPEC): Delete. + PR opt/7520 + * emit-rtl.c (active_insn_p): Consider a clobber of the + function return value to be active even after reload. -2002-02-28 Alan Modra +2002-09-27 Alan Modra - * config/rs6000/rs6000.md (load_toc_aix_di): Handle TARGET_RELOCATABLE. + * doloop.c (doloop_modify_runtime ): Adjust + by absolute loop increment, not loop increment. -2002-02-28 Jason Merrill +2002-09-26 Kazu Hirata - * c-decl.c (finish_function): Only warn about missing return - statement with -Wreturn-type. + * 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-02-27 Zack Weinberg +2002-09-26 Steve Ellcey - * mklibgcc.in: Don't use \n in a line subject to - interpretation by echo. + * config/ia64/ia64.c (ia64_expand_load_address): Ensure correct mode + for symbol address. -2002-02-27 Ulrich Weigand +2002-09-24 Eric Christopher - * config/s390/s390.c (s390_chunkify_pool): Do not confuse - insn UIDs with insn addresses. + * config/mips/elf.h: Add HANDLE_SYSV_PRAGMA. + * config/mips/elf64.h: Ditto. -2002-02-27 Graham Stott +2002-09-24 Eric Christopher - * config/rs6000/rs6000.h (ASM_OUTPUT_DEF_FROM_DECL): - Constify NAME. + * except.c (expand_builtin_extract_return_address): Handle case + where Pmode != ptr_mode. - * loop.c (prescan_loop): Handle PARALLEL. +2002-09-26 Steve Ellcey - * unroll.c (loop_iterations): Return 0 if the add_val for - a BIV is REG. + * config/ia64/hpux.h (ASM_OUTPUT_EXTERNAL_LIBCALL): New - * final.c (output_operand_lossage): Constify PFX_STR. +2002-09-26 Steve Ellcey - * df.c (df_insn_refs_record): Use XEXP (x, 0) for USE. + * config/ia64/hpux.h (TARGET_DEFAULT): Include TARGET_ILP32. -2002-02-26 Richard Henderson +2002-09-26 Igor Shevlyakov - * config/alpha/alpha.md (ashldi_se): Re-enable. + * 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-02-26 Kelley Cook +2002-09-26 Janis Johnson - * config/i386/i386.c (print_operand): Don't append ATT-style - length suffixs to x87 opcodes when in Intel mode. + * Makefile.in (qmtest-g++): Fix file path. -2002-02-26 Ryan T. Sammartino +2002-09-26 Ulrich Weigand - * 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. + * expr.c (expand_expr) [MINUS_EXPR]: Convert A - const to + A + (-const) on RTX level, even for unsigned types. -2002-02-26 John David Anglin +2002-09-26 Ulrich Weigand - * pa-linux.h (LIB_SPEC): Update definition. - * pa32-linux.h (LINK_COMMAND_SPEC): Delete. + * reload.c (dup_replacements): New function. + (find_reloads): Use it to duplicate replacements at the top level + of match_dup operands. -2002-02-26 Alexandre Oliva +2002-09-26 Miles Bader - * dwarf2out.c (gen_inlined_subroutine_die): If block is abstract, - generate a die for the lexical block. + * v850.md ("length"): Change default value to 4. -2002-02-26 Richard Henderson +2002-09-26 Kazu Hirata - * expr.c (expand_expr) [MULT_EXPR]: Do not apply distributive law - in EXPAND_SUM case. Use host_integerp/tree_low_cst. + * 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-02-26 Richard Henderson +2002-09-26 Nick Clifton - * config/ia64/ia64.c (nop_cycles_until): Do init_insn_group_barriers - if we emitted a stop bit. + * config.gcc: Add x prefix to v850e case for handling + --with-cpu=v850e. -2002-02-26 Jakub Jelinek +2002-09-25 David S. Miller - * configure.in (libgcc_visibility): Substitute. - * configure: Rebuilt. - * mklibgcc.in: If libgcc_visibility = yes, make libgcc.a global - defined symbols .hidden. + PR target/7842 + * config/sparc/sparc.c (set_extends): SImode ASHIFT does not + extend. -2002-02-26 Jakub Jelinek +2002-09-25 Richard Henderson - 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. + * emit-rtl.c (const_double_htab_eq): Distinguish integer and + fp CONST_DOUBLE; use real_identical. -2002-02-25 Jakub Jelinek +2002-09-25 Mark Mitchell - PR target/5755 - * config/i386/i386.c (ix86_return_pops_args): Only pop - fake structure return argument if it was passed on the stack. + * doc/invoke.texi: Add more -Wabi examples. -2002-02-25 Jason Merrill +2002-09-25 Richard Sandiford - * attribs.c (decl_attributes): Also re-layout PARM_DECL and - RESULT_DECL. + * config/mips/mips.h (TARGET_MIPS4100): Add missing bracket. -2002-02-25 Alexandre Oliva +2002-09-24 Denis Chertykov - * 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. + * config/ip2k/ip2k.c (function_epilogue): Fix wrong numbers in + cases of optimizing "add sp,w" to "inc sp". -2002-02-25 Aldy Hernandez +2002-09-24 Adam Nemet - * c-typeck.c (push_init_level): Handle vectors. + * config/arm/arm.c (thumb_unexpanded_epilogue): Don't generate + epilogue for naked functions. -2002-02-25 Alexandre Oliva +2002-09-24 Adam Nemet + Nick Clifton - * 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. + * config/arm/arm.h (THUMB_FUNCTION_PROFILER): Remove. + (FUNCTION_PROFILER): Only invoke THUMB_FUNCTION_PROFILER if it + is defined. -2002-02-25 Aldy Hernandez +2002-09-24 Ulrich Weigand - * config/rs6000/rs6000.md ("get_vrsave_internal"): New. - ("*set_vrsave_internal"): use mfspr for Darwin. + * 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. - * config/rs6000/rs6000.c (rs6000_emit_prologue): Call - gen_get_vrsave_internal. +2002-09-24 Kaveh R. Ghazi -Sun Feb 24 16:38:56 2002 Richard Kenner + * real.h (real_value): Make `exp' explicitly signed. - * optabs.c (widen_operand): Properly handle CONST_INT for NO_EXTEND. +2002-09-24 Kazu Hirata -2002-02-24 Neil Booth + * 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. - * cpplex.c (cpp_interpret_charconst): Get signedness or - otherwise of wide character constants correct. - * cppexp.c (lex): Get signedness of wide charconsts correct. +2002-09-23 Zack Weinberg -Sun Feb 24 07:41:31 2002 Richard Kenner + * version.c (version_string): Now const char[]. + * version.h: Update to match. - * 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-09-23 Richard Henderson -2002-02-23 Neil Booth + * 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. - * cpplib.c (glue_header_name): Use local buffer to build up - header name. +2002-09-23 Dale Johannesen -2002-02-23 Neil Booth + * dbxout.c (dbxout_parms): Set current_sym_code for params + passed on stack by invisible reference. - * doc/cpp.texi, doc/invoke.texi: Update documentation for -MM. +2002-09-23 Richard Earnshaw -2002-02-23 Kazu Hirata + * arm/unknown-elf.h (ASM_OUTPUT_ALIGNED_DECL_LOCAL): Always allocate + at least one byte of space. - * 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-09-23 Mark Mitchell -2002-02-23 Kazu Hirata + * c-common.h (flag_abi_version): Fix typo in comment. + * doc/invoke.texi (flag_abi_version): Document default value. - * config/h8300/h8300.md (mulqihi3): Tighten predicates to - register_operand. - (mulhisi3): Likewise. - (umulqisi3): Likewise. - (umulhisi3): Likewise. +2002-09-23 Hans-Peter Nilsson -2002-02-23 Neil Booth + * 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. - * cppinit.c (output_deps): Correct test for stdout output. - (init_dependency_output): Cure warning. +2002-09-23 Richard Henderson -Sat Feb 23 08:42:47 2002 Richard Kenner + * 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. - * 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-09-23 Richard Henderson -2002-02-23 Joseph S. Myers + * real.c (do_multiply): Normalize U before addition. - * 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-09-23 Mark Mitchell -2002-02-23 Jakub Jelinek + * 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. - PR optimization/5747 - * loop.c (scan_loop): Update reg info if move_movables created new - pseudos. +2002-09-22 Jason Thorpe -2002-02-23 David Edelsohn + * config/mips/netbsd.h (SUBTARGET_ASM_SPEC): Always pass -KPIC + unless -fno-pic or -fno-PIC is specified. - * gcc.c (init_gcc_spec): Revert last change. +2002-09-22 John David Anglin -2002-02-23 David Edelsohn + * 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(). - * config/rs6000/rs6000.md (load_toc_aix_{si,di}): Use - gpc_reg_operand constraint. +2002-09-22 Jason Thorpe -2002-02-23 Alan Modra + * doc/install.texi: Document behavior of --with-headers and + --with-libs when arguments are omitted. - * 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-09-22 Kazu Hirata -2002-02-23 Aldy Hernandez + * 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. - * config/rs6000/altivec.h: Add extra level of parentheses on casts. +2002-09-20 Jim Wilson -2002-02-22 David Edelsohn + * config/v850/v850/lib1funcs.asm (__muldi3): Change r5 to r28. - * gcc.c (init_gcc_spec): Do not link with static libgcc.a if - gcc invoked with -shared-libgcc. +2002-09-20 Jakub Jelinek -2002-02-22 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. - 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-09-20 Jim Wilson -2002-02-22 Alexandre Oliva + * 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. - * 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-09-20 Richard Henderson -2002-02-22 Richard Sandiford + * 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. - * fold-const.c (fold): Fix typo in comments. +2002-09-20 Neil Booth -2002-02-21 Diego Novillo + * cppmacro.c: Don't warn about function-like macros without + '(' during pre-expansion. - * Makefile.in (langhooks.o): Update dependencies. +2002-09-20 Jim Wilson -2002-02-21 Diego Novillo + * 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. - * langhooks.c: Include flags.h. +2002-09-20 Geoffrey Keating -2002-02-21 Aldy Hernandez + * 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. - * testsuite/gcc.dg/attr-alwaysinline.c: New. + * 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. - * c-common.c (c_common_post_options): Set inline trees by - default. +2002-09-20 Jeroen Dobbelaere - * doc/extend.texi (Function Attributes): Document always_inline - attribute. - Update documentation about inlining when not optimizing. + * config/arm/arm.md (sign_extract_onebit, not_signextract_onebit): + Add clobber of the condition code register. - * cp/decl.c (duplicate_decls): Merge always_inline attribute. +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. - * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0 - unless DECL_ALWAYS_INLINE. +2002-09-19 Ulrich Weigand - * 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. + * 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. - * 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. +2002-09-19 Steve Ellcey - * attribs.c (handle_always_inline_attribute): New. - (c_common_attribute_table): Add always_inline. + * 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. - * config/rs6000/altivec.h: Add prototypes for builtins - requiring the always_inline attribute. +2002-09-19 Kazu Hirata -2002-02-21 Eric Christopher + * 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. - * 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-09-19 Stephen Clarke -2002-02-21 Richard Henderson + * config/sh/sh.h (UNSPEC_GOTOFF_P): Define. + (GOTOFF_P): Extend to allow gotoff plus constant. - * 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. +2002-09-18 Richard Henderson - * config/i386/i386.c (legitimize_pic_address): Recognize UNSPECs - that we generated earlier. + * 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-02-21 Tom Tromey +2002-09-18 Richard Henderson - * 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. + * calls.c (store_one_arg): Rename default_align to parm_align; + always adjust parm_align for downward padding. -Thu Feb 21 22:43:44 2002 J"orn Rennecke +2002-09-18 Richard Henderson - * jump.c (redirect_jump): If old label has no UID, don't try to - delete it. + * toplev.c (backend_init): Move init_real_once invocation ... + (do_compile): ... here. -Thu Feb 21 21:17:21 2002 J"orn Rennecke +2002-09-18 Richard Henderson - * sh.md (insv): Provide byte offsets for gen_rtx_SUBREG. - If input is constant, do shifts at compile time. + * sibcall.c (optimize_sibling_and_tail_recursive_call): Also remove + RTX_UNCHANGING_P markers for successful tail-recursive replacement. -2002-02-21 Joseph S. Myers +2002-09-18 Richard Henderson - * doc/extend.texi: Fix some more overfull hboxes. + * real.c (round_for_format): Collect sticky as unsigned long, not bool. -2002-02-21 Jakub Jelinek +2002-09-19 Alan Modra - PR optimization/4994 - * config/i386/i386.md (movsi_1, movsf_1): Support MMX -> MMX - register moves. + * config/rs6000/rs6000.md: (floatdisf2): Rename to + floatdisf2_internal1. + (floatdisf2): New define_expand. + (floatdisf2_internal2): Likewise. -2002-02-21 Jakub Jelinek +2002-09-18 Richard Henderson - 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). + * real.c (sticky_rshift_significand): Collect sticky as + unsigned long, not bool. -2002-02-21 Jakub Jelinek +2002-09-18 Ulrich Weigand - PR c/4697: - * stmt.c (warn_if_unused_value): Move side effects test once more. + * 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-02-20 Torbjorn Granlund +2002-09-18 Douglas Rupp + Donn Terry - * config/avr/avr.md: Add more patterns for mized-mode add and subtract - (addsi3_zero_extend, subhi3_zero_extend1, subsi3_zero_extend). + * 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). -Thu Feb 21 16:20:46 2002 Alexandre Oliva + * tree.h (record_layout_info): Add new field + remaining_in_alignment. - * rtlanal.c (replace_rtx): Don't make a CONST_INT the operand of - SUBREG or ZERO_EXTEND. + * doc/tm.texi: (TARGET_MS_BITFIELD_LAYOUT_P): Update. + (pragma pack): Add paragraph on MSVC bit-field packing. -Thu Feb 21 15:35:46 2002 J"orn Rennecke +2002-09-18 Richard Earnshaw (reanrsha@arm.com) - * 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. + PR optimization/7967 + * arm.md (ne_zeroextractsi): Add clobber of the condition code + register. - * sh64.h (TARGET_VERSION): Define. +2002-09-18 Kazu Hirata -2002-02-20 David Edelsohn + * 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. - * config/rs6000/rs6000.h (EPILOGUE_USES): Conditionalize - VRSAVE_REGNO on TARGET_ALTIVEC. +2002-09-18 Nick Clifton -2002-02-20 Alan Modra + * 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. - * 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-09-17 Zack Weinberg -2002-02-20 Jakub Jelinek + * ABOUT-GCC-NLS: Remove reference to enquire, and out-of-date + statement that the only translation is to en_UK. - 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-09-17 Kazu Hirata -2002-02-20 Alexandre Oliva + * 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. - * 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-09-17 Samuel Figueroa -2002-02-20 Alexandre Oliva + * 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. - * c-decl.c (pushdecl): If no global declaration is found for an - extern declaration in block scope, try a limbo one. +2002-09-17 Dale Johannesen -2002-02-20 Jakub Jelinek + * cfgcleanup.c (try_forward_edges): Do not forward a + branch to just after a loop exit before loop optimization; + this interfered with doloop detection. - 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-09-17 Nick Clifton -2002-02-20 Jakub Jelinek + * config/arm/arm.c (output_return_instruction): Do not + writeback the stack pointer when it is being loaded. + (arm_output_epilogue): Likewise. - PR c++/5713 - * c-decl.c (duplicate_decls): Return 0 if issued error about - redeclaration. +2002-09-17 Kazu Hirata -2002-02-20 Roger Sayle - Jakub Jelinek + * 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. - 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-09-17 Steve Ellcey -2002-02-20 Richard Henderson + * config/ia64/elf.h: Remove CPP_PREDEFINES. - * 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-09-17 Nicola Pero -2002-02-20 Philip Blundell + 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. - PR 5705 - * config/arm/arm.h (HARD_REGNO_RENAME_OK): New macro. +2002-09-17 Nick Clifton -2002-02-20 Richard Henderson + * 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. - PR c/5615 - * expr.h (ARGS_SIZE_TREE): Convert size.var to ssizetype. +2002-09-17 Nicola Pero -2002-02-20 Tom Tromey + * doc/objc.texi (Constant string objects): Extended documentation + to make clear that the constant string class ivar layout is + completely fixed. - * 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. +2002-09-17 Roger Sayle -Wed Feb 20 00:03:25 EST 2002 Alan Matsuoka + * cfgrtl.c (flow_delete_block_noexpunge): Delete orphaned + NOTE_INSN_LOOP_CONT notes when deleting basic blocks. - * config/rs6000/rs6000.h (LEGITIMATE_OFFSET_ADDRESS_P): Look - for (const_int 0) in X not just INTVAL. +2002-09-16 Richard Henderson -2002-02-20 Joseph S. Myers + * expr.c (emit_block_move): Set memory block size as appropriate + for the copy. - * doc/extend.texi: Avoid or reduce overfull hboxes. +2002-09-16 Richard Henderson -2002-02-20 Diego Novillo + PR fortran/3924 + * sdbout.c (sdbout_symbol): Don't handle offsets from a symbol. - * expmed.c (store_bit_field): Do not store bit fields using SUBREG - operations if the field does not start at a mode boundary. +2002-09-16 Richard Henderson -2001-02-20 Joel Sherrill + * 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. - * 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-09-16 Richard Henderson -2002-02-20 Neil Booth + * real.c (do_fix_trunc): New. + (real_arithmetic): Call it. + * simplify-rtx.c (simplify_unary_operation): Handle FIX + with a floating-point result mode. - * 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-09-16 Richard Henderson -2002-02-19 Zack Weinberg + * 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. - * toplev.c (output_quoted_string): Write unprintable - characters with octal escapes. +2002-09-16 Jason Merrill + Danny Smith -2002-02-19 David Edelsohn + * config/i386/winnt.c (ix86_handle_dll_attribute): Set + DECL_EXTERN and TREE_PUBLIC for dllimported variables here... + (i386_pe_mark_dllimport): Not here. - * config/rs6000/rs6000.h (CONDITIONAL_REGISTER_USAGE): Set - really_call_used[VRSAVE_REGNO] if not Altivec. +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-02-19 Alan Modra +2002-09-16 Richard Henderson - * config/rs6000/rs6000.c (u_short_cint_operand): Mask op with - MODE_MASK. - (constant_pool_expr_1): Fix formatting. - (rs6000_legitimize_reload_address): Likewise. + * c-common.c (builtin_define_float_constants): Emit __FOO_DENORM_MIN__. -Tue Feb 19 20:13:57 2002 Richard Kenner +2002-09-16 Richard Henderson - * config/sparc/sparc.md (nonlocal_goto): Use hard_frame_pointer_rtx - now that we have one. + * 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-02-19 Zack Weinberg +2002-09-15 Kazu Hirata - * 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. + * 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-02-19 Gaute B Strokkenes +2002-09-15 Jason Thorpe - * doc/c-tree.texi (Classes, TYPE_BINFO): Fix typo. + * config/netbsd.h (LIB_SPEC): Include the appropriate pthread + library if -pthread is specified. -2002-02-19 Philip Blundell +2002-09-15 Jason Thorpe - PR 5399 - * config/arm/arm.h (THUMB_LEGITIMATE_CONSTANT_P): Accept anything - if generating PIC. + * config.gcc (*-*-netbsd*): Set thread_file to 'posix' + for --enable-threads=yes and --enable-threads=posix. - 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-09-15 Kazu Hirata -2002-02-19 Graham Stott + * 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. - * config/i386/i386.c (ix86_expand_builtin): Fix typo. +2002-09-14 Marek Michalkiewicz -2002-02-19 David Edelsohn + * config/avr/avr.c (output.h): Move after inclusion of tree.h. - * config/rs6000/linux64.h (LINK_OS_LINUX_SPEC): Look in /lib64. - ({STARTFILE,ENDFILE}_LINUX_SPEC): Define. - (FP_SAVE_INLINE): Delete. +2002-09-14 Kazu Hirata - * 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. + * 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-02-19 Philip Blundell +2002-09-14 Kazu Hirata - * 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. + * loop.c: Fix a comment typo. -2002-02-19 Philip Blundell +2002-09-14 Kazu Hirata - * 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. + * 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-02-19 matthew green +2002-09-14 Kazu Hirata - * config.gcc (sparc-*-netbsdelf*): Enable target. - (sparc64-*-netbsd*): New target. - * config/sparc/netbsd-elf.h: New file. - * config/sparc/t-netbsd64: New file. + * 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-02-19 Gaute B Strokkenes +2002-09-14 Stephane Carrez - * doc/rtl.texi (Flags, MEM_SCALAR_P): Fix typo. + * 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-02-19 Ryan T. Sammartino +2002-09-14 Alan Modra - * doc/invoke.texi: explicitly list the style guidelines that - -Weffc++ checks for. + * 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. -Tue Feb 19 12:37:23 CET 2002 Jan Hubicka +2002-09-10 Theodore A. Roth - * regmove.c (regmove_optimize): Avoid increasing of register pressure. + * gcc/config/avr/avr.h: Set default options for C++ for avr. -2002-02-19 Neil Booth +2002-09-13 Richard Henderson - 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. + * Makefile.in (toplev.o): Depend on real.h. + (print-rtl.o, varasm.o, ifcvt.o): Likewise. -2002-02-19 Kazu Hirata +2002-09-14 Alan Modra - * config/h8300/h8300.h (REGNO_REG_CLASS): Replace a literal - register number with an appropriate macro. + * 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-02-19 Bryce McKinlay +2002-09-13 Nathan Sidwell - * doc/rtl.texi (Constants): Close @code tag. + * ggc-common.c (ggc_mark_roots): Don't iterate NULL hash tables. -2002-02-19 Aldy Hernandez +2002-09-13 Steve Ellcey - * config/i386/i386.md ("mmx_uavgv8qi3"): Use const_vector. - ("mmx_uavgv4hi3"): Same. - ("pmulhrwv4hi3"): Same. + * 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. - * tree-inline.c (walk_tree): Handle vectors. +2002-09-13 Kazu Hirata - * c-common.c (constant_expression_warning): Handle vectors. - (overflow_warning): Same. + * 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. - * sched-deps.c (sched_analyze_2): Handle vectors. +2002-09-13 Alan Modra - * 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. + * 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. - * 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. +2002-09-12 Zack Weinberg - * resource.c (mark_referenced_resources): Handle vectors. - (mark_set_resources): Same. + * toplev.c: Move default definition of USER_LABEL_PREFIX... + * defaults.h: ... here. - * reload1.c (eliminate_regs): Handle vectors. - (elimination_effects): Same. - (scan_paradoxical_subregs): Same. +2002-09-12 Richard Henderson - * reload.c (subst_reg_equivs): Handle vectors. + * vax.c: Include tree.h earlier. - * regrename.c (scan_rtx): Handle vectors. +2002-09-12 Stan Shebs - * regclass.c (reg_scan_mark_refs): Handle vectors. + * config/darwin.c (machopic_finish): Remove #if 0 chunks. + (machopic_operand_p): Ditto. - * recog.c (find_single_use_1): Handle vectors. +2002-09-12 Kazu Hirata - * local-alloc.c (equiv_init_varies_p): Handle vectors. - (contains_replace_regs): Same. - (memref_referenced_p): Same. + * config/arm/arm.c (arm_compute_initial_elimination_offset): + Fix a comment typo. - * integrate.c (copy_rtx_and_substitute): Handle vectors. - (subst_constants): Same. +2002-09-12 Kazu Hirata - * genattrtab.c (attr_copy_rtx): Handle vectors. - (encode_units_mask): Same. - (clear_struct_flag): Same. - (count_sub_rtxs): Same. + * toplev.c (do_abort): Fix a comment typo. - * 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. +2002-09-12 Kazu Hirata - * function.c (purge_addressof_1): Do not allow paradoxical subregs - of vectors. - (fixup_var_refs_1): Same. - (instantiate_virtual_regs_1): Same. + * cselib.c: Fix comment formatting. + * gengtype.c: Likewise. - * fold-const.c (operand_equal_p): Handle vectors. - (fold): Same. - (rtl_expr_nonnegative_p): Same. +2002-09-12 Kazu Hirata - * flow.c (mark_used_regs): Handle vectors. + * config/h8300/h8300.md (udivmodqi4): Do not use an expander. + (udivmodhi4): Likewise. - * df.c (df_uses_record): Handle vectors. +2002-09-12 Graham Stott + Roger Sayle - * cselib.c (cselib_subst_to_values): Handle vectors. - (cselib_mem_conflict_p): Same. - (hash_rtx): Same. + * 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. - * cse.c (canon_reg): Handle vectors. - (fold_rt): Same. - (cse_process_notes): Same. - (count_reg_usage): Same. - (canon_hash): Same. +2002-09-12 Jason Merrill - * alias.c (nonlocal_mentioned_p): Add case for CONST_VECTOR. + * diagnostic.c (output_add_identifier): New fn. + * diagnostic.h: Declare it. - * combine.c (mark_used_regs_combine): Add case for CONST_VECTOR. + * calls.c (store_one_arg): Use size_in_bytes to determine the + amount of space to push. - * 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. +2002-09-12 Jakub Jelinek - * doc/c-tree.texi (Expression trees): Document VECTOR_CST. + * config/sparc/linux64.h (STARTFILE_SPEC32): Fix a typo. - * doc/rtl.texi (Constants): Document const_vector. - (CONST0_RTX): Update for vectors. - (RTL sharing): Same. +2002-09-12 Ulrich Weigand - * print-tree.c (print_node): Add case for VECTOR_CST. + * 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. - * tree.h (TREE_VECTOR_CST_ELTS): New. - (struct tree_vector): New. - (union tree_node): Add vector node. - (build_vector): Add prototype. +2002-09-11 Hartmut Penner - * tree.def (VECTOR_CST): New. + * fold-const.c (make_range): Only narrow to signed range if + the signed range is smaller than the unsigned range. - * tree.c (build_vector): New. +2002-09-12 Alan Modra - * expmed.c (make_tree): Handle CONST_VECTOR. + * 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. - * rtl.h (CONSTANT_P): CONST_VECTORs are constants too. - (CONST_VECTOR_ELT): New. - (CONST_VECTOR_NUNITS): New. +2002-09-11 Eric Botcazou - * machmode.h (GET_MODE_INNER): New. - (DEF_MACHMODE): Accept 8th arg. + * optabs.c (expand_binop): Minor cleanup. + (expand_twoval_binop): Convert CONST_INTs like in expand_binop. - * machmode.def: Add 8th argument for vector inner mode. - Add inner vector modes for vectors. +2002-09-11 Dan Nicolaescu - * rtl.def (VEC_CONST): Remove. - (CONST_VECTOR): New. + * print-tree.c (print_node): Print the restrict qualifier. - * expr.c (clear_storage): Allow vectors. - (is_zeros_p): Handle VECTOR_CST. +2002-09-11 Janis Johnson - * 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. + * doc/install.texi: Fix typos. - * config/rs6000/rs6000-protos.h: Add zero_constant. +2002-09-11 Zack Weinberg - * 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. + * 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. - * 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-09-11 David Edelsohn -2002-02-18 Kazu Hirata + * 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. - * config/h8300/h8300.c (notice_update_cc): Use - cc_status.value2. +2002-09-10 John David Anglin -2002-02-18 Kazu Hirata + * pa.md (extzv): Check predicates before emitting extzv_32. + (insv): Likewise. - * config/h8300/h8300.md (divmod patterns): Change the - constraints for operands[1] to register_operand. +2002-09-10 Ulrich Weigand -2002-02-18 Kazu Hirata + * config/s390/s390.h (MOVE_MAX): Define to correct value. + (MAX_MOVE_MAX): Define. + (MOVE_BY_PIECES_P): Define. + (CLEAR_BY_PIECES_P): Define. - * 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-09-10 Denis Chertykov -2002-02-18 Philip Blundell + * config/avr/avr.md (movstrhi): Use right operands for conversion. - * 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-09-10 Richard Earnshaw -2002-02-18 Franz Sirl + PR c/7873 + * arm.md (insv): Use reg_or_int_operand for operand[3]. - * 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-09-10 David Edelsohn -2002-02-18 Ulrich Weigand + * 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. - * config/s390/s390.c (s390_emit_prologue): Do not set the - frame_related flag for call-clobbered registers. +2002-09-09 Per Bothner -Mon Feb 18 15:07:35 CET 2002 Jan Hubicka + * print-tree.c (print_node): In a STRING_CST, escape non-ascii + characters, and only print TREE_STRING_LENGTH chars. - * 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. +2002-09-09 Steve Ellcey -Mon Feb 18 11:55:55 CET 2002 Jan Hubicka + * 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. - * regrename.c (kill_set_value): Handle subregs properly. +2002-09-09 John David Anglin -2002-02-18 David Billinghurst + * pa.md (exception_receiver, builtin_setjmp_receiver): Add blockage + on TARGET_64BIT before pic register restore. - * objc/objc-act.c (handle_impent): Remove leading '*' - from objc_class_name. +2002-09-09 David Edelsohn -2002-02-17 Richard Henderson + * doc/tm.texi (TARGET_HAVE_SRODATA_SECTION): New description. + (TARGET_HAVE_TLS): New description. - * 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-09-09 Janis Johnson -2002-02-17 Roland McGrath + * doc/extend.texi (Statement Exprs): Fix broken link. - * 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-09-09 Denis Chertykov -2002-02-17 Jakub Jelinek + * config/avr/avr.md (movstrhi, clrstrhi): Use gen_int_mode for + right conversion of operands[1]. - PR c/3444: - * c-typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit - shortening. +2002-09-09 Ulrich Weigand -2002-02-17 Philipp Thomas + * 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. - * config/cris/cris.h: Undefine STARTFILE_SPEC and - ENDFILE_SPEC before (re)defining them. + ("*tmdi_mem", "*tmsi_mem", "*tmhi_mem", "*tmqi_mem"): Do not mark + as commutative. -2002-02-17 Kazu Hirata + ("*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. - * config/h8300/h8300.c: Fix formatting. - * config/h8300/h8300.h: Likewise. + ("movstrictsi"): Fix typo in insn name. -2002-02-17 Philipp Thomas +2002-09-09 Jan Hubicka - * doc/tm.texi: Explain why empty strings should not be - marked for translation. + * 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-02-17 Philipp Thomas +2002-09-09 Nick Clifton - * 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/fr30/fr30.c (output.h): Move after inclusion of tree.h. + Fix folding marks. - * config/i386/i386.c (print_operand): Likewise. Remove use of - sprintf. +2002-09-09 Toshiyasu Morita + J"orn Rennecke - * 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. + * sh/sh.h (OVERRIDE_OPTIONS): align_functions is in bytes, not bits. -2002-02-17 Kazu Hirata +2002-09-09 Alan Modra - * 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. + * config/rs6000/rs6000.c (rs6000_binds_local_p): Return bool. + (function_ok_for_sibcall): Use binds_local_p. Respect longcall + attributes. -2002-02-17 Philipp Thomas +2002-09-08 Kaveh R. Ghazi - * config/i386/i386.h: Don't mark empty strings for translation. + * fr30.c (fr30_print_operand): Fix bug in output of CONST_DOUBLE. -2002-02-16 H.J. Lu +2002-09-08 Richard Henderson - * config/mips/linux.h (ASM_PREFERRED_EH_DATA_FORMAT): New. + * 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. -2002-02-16 Zack Weinberg + * config/i386/i386.h (ASM_OUTPUT_DWARF_DTPREL): New. + * config/i386/i386.c (i386_output_dwarf_dtprel): New. + * config/i386/i386-protos.h: Update. - * cppinit.c (merge_include_chains): Check for brack being - NULL before attempting to merge it with qtail. +2002-09-08 Roger Sayle -2002-02-16 Andrew Cagney + 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). - * config/rs6000/netbsd.h (PREFERRED_DEBUGGING_TYPE): Set to - DBX_DEBUG. +2002-09-08 Roger Sayle -2002-02-16 John David Anglin + * 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). - * pa/t-pa, pa/t-pro, som.h: Revert last patch. +2002-09-08 Krister Walfridsson -2002-02-16 John David Anglin + * config/arm/netbsd.h (INITIALIZE_TRAMPOLINE): Redefine. + (CLEAR_INSN_CACHE): Define. - * pa/t-pa (LIB2FUNCS_EXTRA): Don't build lib2funcs.asm. - * pa/t-pro (LIB2FUNCS_EXTRA): Likewise. - * som.h (DO_GLOBAL_DTORS_BODY): Delete define. +2002-09-08 Kazu Hirata -Sat Feb 16 13:48:50 2002 Richard Kenner + * 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. - * config/alpha/alpha.md (*movsi_nt_vms_nofix): Was *movsi_nt_vms; - now only if !TARGET_FIX. - (*movsi_nt_vms_fix): New pattern. +2002-09-08 Jan Hubicka -2002-02-16 Douglas B Rupp + * emit-rtl.c (set_mem_attributes_minus_bitpos): Fix array_ref + handling. - * 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. + * loop.c (loop_givs_reduce): Emit addition after. -Sat Feb 16 13:39:09 2002 Richard Kenner +2002-09-08 Alan Modra - * expr.c (store_constructor): Handle target REG case for ARRAY_TYPE. + * 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-02-16 Ulrich Weigand +2002-09-08 Alan Modra - * 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. + * reload.c (find_reloads

): Pass operand_mode to + find_reloads_address. - * config/s390/s390.h (S390_REL_MAX): Delete. - (S390_CHUNK_MAX, S390_CHUNK_OV): Adjust values. +2002-09-08 Kazu Hirata - * config/s390/s390.md (cjump, icjump, jump): Fix length - attribute calculation. + * config/h8300/h8300.md (udivmodqi4): Enable on H8/300. + (anonymous pattern): Likewise. +2002-09-07 Scott Snyder -2002-02-15 David Edelsohn + PR target/7374 + * config/alpha/alpha.md (abstf2): Fix typo: 'neg' for 'abs'. - * config/rs6000/linux64.h (STRIP_NAME_ENCODING): Delete. - * config/rs6000/ppc-asm.h (JUMP_TARGET): Define for powerpc64. +2002-09-07 Roger Sayle -2002-02-15 John David Anglin + * basic-block.h (struct loop): Remove unused cont_dominator field. - * 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-09-07 Igor Shevlyakov -2002-02-15 Richard Sandiford + * varasm.c (decode_rtx_const): Don't check undefined field for + CONST_VECTOR. - * c-decl.c (grokdeclarator): Prevent a segfault on unnamed decls. +2002-09-07 Glen Nakamura -2002-02-15 Richard Sandiford + 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. - * reload.c (find_dummy_reload): Check that an output register - is valid for its mode. +2002-09-07 Igor Shevlyakov -2002-02-14 Alexandre Oliva + * combine.c (simplify_shift_const): Calculate rotate count + correctly for vector operands. - * combine.c (known_cond): After replacing the REG of a SUBREG, try - to simplify it. +2002-09-07 Ansgar Esztermann - * function.c (assign_parms): Demote promoted argument passed by - transparent reference. + * 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. -2001-02-14 Joel Sherrill +2002-09-07 Richard Henderson - * config/arm/rtems-elf.h, config/h8300/rtems.h: Removed redundant - -Acpu() and -Amachine() to eliminate warnings. + * builtins.def (inf, inff, infl): Mark const. + (huge_val, huge_valf, huge_vall): Likewise. + (BUILT_IN_GETEXP, BUILT_IN_GETMAN): Remove. -2002-02-14 Ulrich Weigand + * real.c (ereal_inf): Clear E before use. - * config/s390/linux.h (ASM_OUTPUT_ALIGNED_BSS): New. +2002-09-07 Kazu Hirata -2002-02-14 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. - * 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-09-07 Kazu Hirata -2002-02-14 Hans-Peter Nilsson + * config/h8300/h8300.c: Fix formatting. + * config/h8300/h8300.h: Likewise. + * config/h8300/h8300.md: Likewise. - * config.gcc (c4x-*-rtems*): Fix typo in tm_file setting. +2002-09-07 Zdenek Dvorak -2002-02-14 Jakub Jelinek + * cfgcleanup.c (try_crossjump_to_edge): Fix updating of liveness + information. - PR c/5503: - * c-decl.c (duplicate_decls): If builtin type has TYPE_ARG_TYPES NULL, - use arguments from newtype. +2002-09-07 Graham Stott -2002-02-13 Eric Christopher + * rtlanal.c (dead_or_set_regno_p): Fix typo. - * 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-09-07 Alan Modra -2002-02-14 Aldy Hernandez + * config/rs6000/linux64.h (ASM_PREFERRED_EH_DATA_FORMAT): Define. - * config/rs6000/darwin.h (ROUND_TYPE_ALIGN): Adjust for vectors. + * 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. - * config/rs6000/sysv4.h (ROUND_TYPE_ALIGN): Add MAX. +2002-09-06 Jakub Jelinek -2002-02-14 Aldy Hernandez + * configure.in (HAVE_AS_OFFSETABLE_LO10): Use -xarch=v9 + unconditionally when gcc_cv_as_flags64 checks are gone. + * configure: Rebuilt. - * config/rs6000/rs6000.md ("*movv4si_internal"): Add m<-r and r<-r - alternatives. - ("*movv8hi_internal1"): Same. - ("*movv16qi_internal1"): Same. - ("*movv4sf_internal1"): Same. +2002-09-06 Alan Modra - * config/rs6000/rs6000.c (rs6000_legitimize_reload_address): Do - not push_reload for altivec modes. + * config/rs6000/rs6000.md (extzvsi_internal2): Revert most of + 2002-07-26 change. Comment. -2002-02-13 Joel Sherrill +2002-09-05 Kaveh R. Ghazi - * 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++. + * 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. -Wed Feb 13 23:41:15 CET 2002 Jan Hubicka +2002-09-05 Dale Johannesen - * regmove.c (kill_value): Handle subregs. + * reload1.c (reload): Retain only those memory clobbers + added for variable-array handling. -Wed Feb 13 23:34:30 CET 2002 Jan Hubicka +2002-09-05 Jason Thorpe - * 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. + * config/arm/arm.c (arm_return_in_memory): Implement ATPCS + return-in-memory rules. + * config/arm/arm.h (ARM_FLAG_ATPCS, TARGET_ATPCS): Define. - * i386.c (ix86_prepare_fp_compare_args): Fix condition for swapping - operands. +2002-09-05 David Edelsohn -2002-02-13 Jakub Jelinek + * config/rs6000/xcoff.h (HOT_TEXT_SECTION_NAME): Delete. + (UNLIKELY_EXECUTED_TEXT_SECTION_NAME): Delete. - PR c/5681: - * expr.c (safe_from_p): Pass VOIDmode to true_dependence instead of - GET_MODE (x). +2002-09-05 Jason Thorpe -2002-02-13 Jakub Jelinek + * 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. - 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-09-05 David Edelsohn -2002-02-13 Ulrich Weigand + * doc/install.texi: Correct text of s390-*-linux* and s390x-*-linux* + URLs. Fix AIX wording. - * config/s390/s390.c (s390_final_chunkify): Re-run shorten_branches - after emitting ltorg insns. +2002-09-05 Stan Shebs - * 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. + * config/rs6000/rs6000.c (rs6000_override_options): Make -fpic and + -fPIC equivalent on Darwin. -2002-02-13 Douglas B Rupp +2002-09-05 J"orn Rennecke - * mkconfig.sh: Avoid using a subshell redirect. - ($output.T): Change to $(output)T. - (ENABLE_NLS): Remove unneeded undef. + * sh.c (sh_expand_builtin): Return early if encountering an + error_mark for a type. - * config/alpha/vms.h (MD_EXEC_PREFIX, MD_STARTFILE_PREFIX): Define. - * config/alpha/x-vms (libsubdir): Define. +2002-09-05 Ulrich Weigand - * config/alpha/vms.h (MD_FALLBACK_FRAME_STATE_FOR): Handle - register frame procedures. Optimize retrieving context. + * config/s390/s390.c (s390_expand_plus_operand): Do not require + double-word scratch register. + config/s390/s390.md ("reload_indi", "reload_insi"): Adapt. - * config/alpha/t-vms (MULTILIB_OPTIONS): Define. - (MULTILIB_DIRNAME, LIBGCC, INSTALL_LIBGCC): Likewise. - * config/alpha/vms.h (ASM_FILE_START): Write .arch directive. + ("*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. -Wed Feb 13 09:45:08 2002 Richard Kenner +2002-09-05 Kazu Hirata - * alias.c (find_base_term, case ZERO_EXTEND, case SIGN_EXTEND): - Make same change as for find_base_value. + * config/h8300/h8300.c (asm_file_start): Add a missing + semicolon. -2002-02-13 Kazu Hirata +2002-09-04 Krister Walfridsson - * config/h8300/h8300.h (MODES_TIEABLE_P): Accept a combination - of QImode and SImode. + * 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-02-13 Kazu Hirata +2002-09-04 Kaveh R. Ghazi - * config/h8300/h8300.c (h8300_adjust_insn_length): Correct the - length computation of movsi. - * config/h8300/h8300.md (movsi_h8300hs): Correct the length. + * frv.c (frv_encode_section_info): Fix error in last change. -2002-02-13 Kazu Hirata +2002-09-04 David Edelsohn - * config/h8300/h8300.md (subqi3): Tighten the predicate for - operands[2] to register_operand. + * 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. -Wed Feb 13 10:35:56 CET 2002 Jan Hubicka +2002-09-04 Dale Johannesen - * i386.md (fop_*_comm_*): allow nonimmediate in the first operand. + * varasm.c (struct rtx_const, decode_rtx_const): + Make veclo and vechi fields not share storage. -2002-02-12 Aldy Hernandez +2002-09-05 J"orn Rennecke - * 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. + * 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. - * config/rs6000/rs6000.c (altivec_register_operand): New. +2002-09-04 Richard Henderson - * config/rs6000/rs6000.h (PREDICATE_CODES): Add - altivec_register_operand. + * 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-02-13 Hans-Peter Nilsson +2002-09-04 Richard Henderson - * config/mmix/mmix.c (mmix_assemble_integer) : Don't - handle SYMBOL_REF. + * cse.c (cse_insn): Avoid subreg games if the equivalence + is already in the proper mode. -2002-02-13 Stan Shebs +2002-09-04 Eric Botcazou - * c-typeck.c (digest_init): Handle vectors. - (really_start_incremental_init): Same. - (pop_init_level): Same. - (process_init_element): Same. + PR c/7102 + * optabs.c (expand_binop): Convert CONST_INTs in all cases. - * varasm.c (output_constant): Same. +2002-09-04 John David Anglin - * expr.c (clear_storage): Same. - (store_constructor): Same. + * pa.md (setccfp0, setccfp1): New patterns. -2002-02-12 Eric Christopher +2002-09-04 Kaveh R. Ghazi - * explow.c (hard_function_value): Add comment explaining - signed/unsigned comparison. + * 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-02-12 Jakub Jelinek +2002-09-04 Kaveh R. Ghazi - * 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. + * 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-02-12 Graham Stott +2002-09-04 Janis Johnson - * config/hp/pa.h (GO_IF_LEGITIMATE_ADDRESS): Fix typos. + * doc/trouble.texi (Interoperation): Update information about C++ ABI + issues. -2002-02-12 Kazu Hirata +2002-09-04 Jason Thorpe - * 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. + * config/sparc/t-netbsd64: Disable multilib for now. -2002-02-12 Graham Stott +2002-09-04 David Edelsohn - * config/pa/pa.c (compute_movstrsi_length): Fix typos. + * 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. -Tue Feb 12 10:12:56 2002 Richard Kenner +2002-09-04 John David Anglin - * alias.c (find_base_value, case ZERO_EXTEND, case SIGN_EXTEND): - Handle #ifdef POINTERS_EXTEND_UNSIGNED. + * expr.c (emit_group_load): Revise to allow splitting TCmode source + into DImode pieces. -2002-02-11 Hans-Peter Nilsson + * 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. - * 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-09-04 J"orn Rennecke -2002-02-11 John David Anglin + * combine.c (make_compound_operation): Don't generate zero / sign + extensions in floating point modes. - * 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-09-04 Janis Johnson -2002-02-11 Andrew Haley + * 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. - * config/stormy16/stormy16.md (zero_extendqihi2): New. +2002-09-04 Richard Henderson -2002-02-11 Alexandre Oliva + * c-common.c (builtin_define_with_hex_fp_value): New. + (builtin_define_float_constants): Use it. Fix H_FLOAT mant_dig. - * regrename.c (regrename_optimize): Don't accept a - part-clobbered register if the replaced register is not part - clobbered. +2002-09-04 Janis Johnson - * calls.c (store_one_arg): In the non-BLKmode non-partial case, - take padding into account when computing the argument value. + * 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. - * config/sh/sh.h (FUNCTION_ARG_REGNO_P): Fix parenthesizing error. +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. - * combine.c (try_combine): Apply substitutions in - CALL_INSN_FUNCTION_USAGE too. + * 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-02-11 Aldy Hernandez +2002-09-03 Neil Booth - * config/rs6000/rs6000.c (altivec_init_builtins): Handle - __builtin_altivec_abs*. - (bdesc_abs): New. + 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. - * config/rs6000/rs6000.h (rs6000_builtins): Add - ALTIVEC_BUILTIN_ABS*. +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 - * config/rs6000/altivec.h: Use const char for builtins expecting - literals. - (vec_abs): New versions for C and C++. - (vec_abss): Same. + * 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. -2002-02-10 Kazu Hirata + * 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/h8300/h8300.h (INITIALIZE_TRAMPOLINE): Simplify by - using Pmode. + * 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-02-10 Kazu Hirata +2002-09-03 Stan Shebs - * 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. + * 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-02-10 Kazu Hirata +2002-09-03 Steve Ellcey - * config/h8300/h8300.c (print_operand): Remove redundant code. + * 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-02-10 Kazu Hirata +2002-09-03 Ulrich Weigand - * config/h8300/h8300-protos.h: Remove the prototype for byte_reg. - * config/h8300/h8300.c (byte_reg): Make it static. + * config/s390/s390.md ("movti"): Add Q->Q alternative. + ("*movdi_64", "*movdi_31", "*movsi", "movhi", "movqi_64", + "movqi", "*movdf_64", "*movdf_31", "*movsf"): Likewise. -2002-02-10 Richard Henderson + ("*movti_ss", "*movdi_ss", "*movsi_ss", "*movdf_ss", + "*movsf_ss"): Remove. - PR c/5623 - * c-typeck.c (incomplete_type_error): Handle flexible array members. +2002-09-03 John David Anglin -2002-02-10 Richard Henderson + * pa32-regs.h (CLASS_CANNOT_CHANGE_MODE, CLASS_CANNOT_CHANGE_MODE_P): + Delete macros. - PR c++/5624 - * tree.c (append_random_chars): Don't abort if main_input_filename - does not exist. +2002-09-03 Arati Dikey -2002-02-10 Hans-Peter Nilsson + * h8300.c (asm_file_start): Corrected optimization comment. - * config/mmix/t-mmix (MULTILIB_EXTRA_OPTS): Disable. +2002-09-03 Stan Shebs -2002-02-10 Kazu Hirata + * 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. - * config/h8300/h8300.md (pushhi1_h8300): Correct the mode used. - (pushhi1): Likewise. +2002-09-03 Ulrich Weigand -2002-02-10 John David Anglin + * 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. - * pa.c (reg_before_reload_operand): Don't accept a SUBREG operand. - * pa.h (PREDICATE_CODES): Adjust codes for reg_before_reload_operand. +2002-09-03 Nicola Pero -2002-02-09 David O'Brien + 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 ). - * config/sparc/freebsd.h(TARGET_DEFAULT): Add MASK_EPILOGUE setting and - remove MASK_VIS. - (ASM_CPU_DEFAULT_SPEC): Remove. Default setting is fine. +2002-09-03 Graham Stott -2002-02-09 Kazu Hirata + * config/i386/i386.md ("femms"): Add "memory" attr "none". - * config/h8300/h8300.c (output_logical_op): Use sub.w to clear - a half of an SImode register on H8/300. +2002-09-03 Graham Stott -Sat Feb 9 18:28:02 CET 2002 Jan Hubicka + * expr.c (expand_expr): Remove extraneous comment and code. - * i386.md (movdi_2): Add missing '!'. +2002-08-31 Richard Henderson -2002-02-09 Kazu Hirata + * expr.c (block_move_libcall_safe_for_call_parm): Fix thinko. - * config/h8300/h8300.h: Fix formatting. Remove commented-out - definitions. +2002-08-31 John David Anglin -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. + * pa.c (pa_globalize_label): Add ATTRIBUTE_UNUSED to prototype. -2002-02-07 Tom Rix +2002-08-30 Richard Henderson - * 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. + 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-02-07 Jeff Sturm +2002-08-30 Janis Johnson - * config/sparc/sparc.c (compute_frame_size): Don't correct frame - offset for stack bias. + * doc/install.texi (Configuration, Building): Fix a typo and + some formatting directives. -2002-02-07 H.J. Lu +2002-08-30 Paul Koning - * config/mips/linux.h (SUBTARGET_ASM_DEBUGGING_SPEC): Defined. + * 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-02-07 Ulrich Weigand +2002-08-30 Denis Chertykov - * testsuite/gcc.dg/cpp/charconst-2.c: Add -fsigned-char option. + * config/ip2k/ip2k.c (ip2k_set_compare): Remove all const_double + stuff. + (ip2k_gen_unsigned_comp_branch): Handle CONST_INT and + CONST_DOUBLE constants. -Thu Feb 7 12:14:17 CET 2002 Jan Hubicka +2002-08-30 Jason Thorpe - * 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. + * 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-02-07 Richard Henderson +2002-08-30 Krister Walfridsson - 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. + * 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-02-07 Alexandre Oliva +2002-08-29 Rodney Brown - * config/mips/mips.md (define_delay) [mips16]: Adjust required - length. + * doc/install.texi (Specific, alpha*-dec-osf*): Add "virtual + memory exhausted" workarounds. -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. +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/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. + * 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-02-05 Jason Merrill +2002-08-29 "Dhananjay R. Deshpande" - * collect2.c (dump_file): Pass DMGL_VERBOSE to cplus_demangle. + * h8300.c (shift_alg_hi): Various tweaks to improve performance + of HImode shifts. + (get_shift_alg): Corresponding changes. -2002-02-05 Andreas Jaeger +2002-08-29 John David Anglin - * crtstuff.c: Fix comments. + * 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-02-05 Richard Henderson +2002-08-29 John David Anglin - 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. + * install.texi (hppa64-hp-hpux11*): Document installation procedure. - PR fortran/3392 - * config/mips/mips.c (function_arg): Handle TImode. - (function_arg_advance): Likewise. +2002-08-29 Catherine Moore -2002-02-05 Aldy Hernandez + * 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. - * config/rs6000/altivec.h (vec_step_help): Rename to - __vec_step_help. + * sh.h (SH5_WOULD_BE_PARTIAL_NREGS): Also handle TImode case. -2002-02-05 Aldy Hernandez +2002-08-28 Jason Thorpe - * config/rs6000/altivec.h: Fix typos. + * 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-02-05 Jason Thorpe +2002-08-27 Mark Mitchell - * config/arm/netbsd.h: Correct a comment. + * 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-02-05 Aldy Hernandez +2002-08-27 Nicola Pero - * config/rs6000/rs6000.c (altivec_init_builtins): Fix typo - building void typed builtins. + * 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. - * config/rs6000/altivec.h (vec_ld*): Fix typos. - (vec_step): Implement for C++. +2002-08-27 Nick Clifton + Catherine Moore + Jim Wilson -Mon Feb 4 19:23:19 2002 Richard Kenner + * 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. - * final.c (final_scan_insn): Add case for NOTE_INSN_LOOP_END_TOP_COND. +2002-08-27 J"orn Rennecke + Aldy Hernandez -2002-02-04 Richard Henderson + * doc/tm.texi: Applied numerous fixes to the automaton based + scheduler descrition. - * combine.c (nonzero_bits): Re-introduce special case for - sp/fp/ap wrt REGNO_POINTER_ALIGN. +2002-08-27 Jan Hubicka -2002-02-05 Aldy Hernandez + * i386.c (classify_argument): Handle variable sized objects. - * doc/extend.texi: Warn about unsupported usage of altivec - builtins. +2002-08-27 Jan Hubicka - * config/rs6000/rs6000.md (altivec_vcmp*_p): Remove. - (altivec_predicate_*): New. + * i386.c (ix86_expand_int_movcc): Fix RTL sharing problem - * config/rs6000/altivec.h: Rewrite predicates to use new builtins. - Add C++ version of vec_*() functions. +2002-08-27 Jan Hubicka - * 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. + * libgcc2.c (__bb_exit_func): Properly write the summarized statistics. -2002-02-04 John David Anglin +2002-08-27 Jan Hubicka - * 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. + * i386.c (classify_argument): Properly compute word size of the analyzed object. -2002-02-04 John David Anglin +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. - * unwind-dw2-fde-glibc.c: Define _GNU_SOURCE if not defined. + * config/rs6000/linux64.h (ADJUST_FIELD_ALIGN): Undef before define. -2002-02-04 Jakub Jelinek +2002-08-27 J"orn Rennecke - 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. + * sh.h (MAX_FIXED_MODE_SIZE): Define. -2002-02-04 John David Anglin +2002-08-27 Gabriel Dos Reis - * pa.h (PREFERRED_STACK_BOUNDARY): Define to match standard rounding. - (BIGGEST_ALIGNMENT): Change to 128. + * doc/cpp.texi (Common Predefined Macros): Don't mess with table + delimiter. -2002-02-04 John David Anglin +2002-08-27 Gabriel Dos Reis - * pa32-linux.h (LINK_COMMAND_SPEC): Define. + * c-common.c (cpp_define_data_format): New function. + (cb_register_builtins): Call it. -2002-02-04 John David Anglin + * 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__. - * pa.md (call_internal_reg_64bit): Remove unused variable. +2002-08-26 Ziemowit Laski -2002-02-04 Nick Clifton + * 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. - * 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-08-26 Ulrich Weigand -2002-02-04 Richard Sandiford + * 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. - * c-typeck.c (build_c_cast): Warn when qualifiers are added to - function types, not when they're taken away. + 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. -Mon Feb 4 09:05:58 2002 Jeffrey A Law (law@redhat.com) + 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. - * cfgrtl.c (try_redirect_by_replacing_jump): Remove associated - CODE_LABEL and jump table when replacing a table jump with a - simple jump. + (s390_function_count): Remove. + (s390_output_symbolic_const): Replace s390_function_count by + current_function_funcdef_no. + (s390_output_constant_pool): Likewise. -2002-02-04 Ulrich Weigand + (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. - * config/s390/s390-protos.h (legitimize_la_operand, - s390_secondary_input_reload_class, s390_plus_operand, - s390_expand_plus_operand): Add prototypes. +2002-08-26 Neil Booth - config/s390/s390.c (s390_secondary_input_reload_class, - s390_plus_operand, s390_expand_plus_operand): New functions. + * 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. - (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. +2002-08-24 Stuart Hastings - config/s390/s390.h (SECONDARY_INPUT_RELOAD_CLASS): Define. - (PREDICATE_CODES): Add s390_plus_operand. + * 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. - config/s390/s390.md (adddi3_inv_64, addaddr_ccclobber): Delete. - (la_ccclobber): Allow GENERAL_REGS as output operand. +2002-08-23 Zack Weinberg - (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. + * ggc-page.c (compute_inverse): Short circuit calculation for + object sizes larger than half a page. -2002-02-04 Ulrich Weigand +2002-08-23 David Edelsohn - * gcc/config/s390/s390.h (CRT_CALL_STATIC_FUNCTION): Fixed - register names for regular asm () construct. + * 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-02-04 Jakub Jelinek +2002-08-23 Kaveh R. Ghazi - * config/i386/i386.md (movsf_1): Allow moving SF values in MMX - registers. + * ns32k.c (ns32k_globalize_label): Delete. + * ns32k.h (ASM_OUTPUT_LABEL, TARGET_ASM_GLOBALIZE_LABEL): Delete. -2002-02-04 Jakub Jelinek +2002-08-23 Alan Modra - * combine.c (recog_for_combine): Create a dummy insn with PATTERN - pat for recog. + * 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-02-04 Hartmut Penner +2002-08-22 Jason Merrill - * varasm.c (decode_rtx_const): Allow unspec (symbol_ref) in - constant pool to be identical by string address and index. + * 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-02-04 Anthony Green +2002-08-22 Zack Weinberg - * output.h (SECTION_OVERRIDE): Define. - * varasm.c (named_section): Obey SECTION_OVERRIDE. + * 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-02-03 Jason Thorpe +2002-08-22 Tom Tromey - * config.gcc (arm*-*-netbsdelf*): Placeholder to prevent match - by existing arm*-*-netbsd* (a.out) target. - (ns32k-*-netbsdelf*): Likewise. - (sparc-*-netbsdelf*): Likewise. - (vax-*-netbsdelf*): Likewise. + * doc/install.texi (Configuration): Document --datadir. -2002-02-03 Danny Smith +2002-08-22 Alexandre Oliva - * gthr-win32.h: Protect against conflicting typedef for BOOL in windows - headers and libobjc headers. + * Makefile.in ($(BUILD_PREFIX_1)varray.o): Depend on $(GGC_H). -2002-02-03 Mumit Khan +2002-08-22 Hans-Peter Nilsson - * gthr-win32.h (__mingwthr_key_dtor): Use extern "C" linkage for C++. - (_mingw.h): Remove duplicate include. + * gengtype-lex.l (ID): Allow underscore as first character. -2002-02-03 Jason Thorpe +2002-08-21 David Edelsohn - * config.gcc: Set cpu_type to m68k for 68010, as well. - (m68010-*-netbsdelf*): New... - (m68k*-*-netbsdelf*): ...targets. - * config/m68k/netbsd-elf.h: New file. + * 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-02-02 Kazu Hirata +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. - * config/h8300/h8300.c (hand_list): Move inside function_arg. +2002-08-21 John David Anglin -2002-02-02 Kazu Hirata + * cppinit.c (remove_dup_nonsys_dirs): Fix warning and return value. - * config/h8300/h8300.c (h8_push_ops): Move inside - h8300_init_once. - (h8_pop_ops): Likewise. - (h8_move_ops): Likewise. +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-02-02 Kazu Hirata +2002-08-20 John David Anglin - * config/h8300/h8300.c (os_task): Make it static. - (monitor): Likewise. - (pragma_saveall): Likewise. + * 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-02-02 Alexandre Oliva +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. - * config/sh/sh.md (ic_invalidate_line): Make sure the immediate - constant is a valid sign-extension for Pmode. +2002-08-18 Neil Booth -2002-02-02 Kazu Hirata + PR preprocessor/7602 + * cppinit.c (path_include): Treat the system environment + variables as being cxx_aware. - * config/h8300/h8300.c: Fix formatting. +2002-08-17 Joseph S. Myers -2002-02-02 Kazu Hirata + * 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. - * config/h8300/h8300.md: Fix formatting. +2002-08-17 Richard Sandiford -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. + * 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-02-01 Janis Johnson +2002-08-16 Stan Shebs - * 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. + * c-common.c (cb_register_builds): Define __NEXT_RUNTIME__ + for ObjC with -fnext-runtime. + * doc/cpp.texi: Document it. -2002-02-01 DJ Delorie +2002-08-16 Janis Johnson - * 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. + * doc/install.texi (Final installation): Replace links to individual + build status pages with a link to a common page that lists them all. -2002-02-01 David O'Brien +2002-08-16 Sylvain Pion - * config/sparc/sol2-sld-64.h: Include sparc/biarch64.h rather than - sparc/sparc_bi.h. + * doc/invoke.texi: Fix typo. -2002-02-01 Janis Johnson +2002-08-16 David Edelsohn - * 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. + * doc/install.texi (*-ibm-aix*): Explain AIX shared object versioning. -2002-02-01 Craig Rodrigues +2002-08-16 Andrew Haley - * doc/install.texi (avr): Update outdated URL. + * 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-01-30 Andrew Haley +2002-08-15 Richard Henderson - * 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. + * 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-01-31 Jason Merrill +2002-08-15 Alexandre Oliva - * Makefile.in (c-parse.c): Handle .output file. - * objc/Make-lang.in (objc-parse.c): Likewise. + * 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-02-01 Alexandre Oliva +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/mips/mips.h (ENDIAN_SPEC): Output the endianness flag if - the -me[lb] option is given. Don't output the default flag - twice. + * config/alpha/alpha-protos.h: Update. -2002-01-31 Zack Weinberg + * 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. - * 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. + (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. -2002-01-31 Kazu Hirata + (alpha_need_linkage): Rewrite. + (alpha_use_linkage): New global function. + (alpha_write_linkage): Rewrite and make static. + (alpha_write_one_linkage): Rewrite - * 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. + (alpha_start_function): Remove procedure descriptor output. + (alpha_end_function): Write linkages at end of each function. -2002-01-31 Joseph S. Myers + * config/alpha/alpha.md (call_vms, call_value_vms): Rewrite. + (call_vms_1, call_value_vms_1): Rewrite. - * gccbug.in: Follow GNU Coding Standards for --version. Use GCC - version rather than GNATS version in --version output. + * config/alpha/vms.h (ASM_FILE_END): Remove. -2002-01-31 Richard Sandiford +2002-08-14 Richard Henderson - * ifcvt.c (noce_process_if_block): Make a copy of the destination - when copying back from a temporary. + * 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-01-30 Richard Henderson +2002-08-14 Richard Henderson - * ifcvt.c (dead_or_predicable): Handling merging when other_bb - and new_dest are the same. + * calls.c: Include target.h. + * Makefile.in (calls.o): Update. -2002-01-30 Richard Henderson + * config/alpha/alpha.c (alpha_end_function): Use targetm.binds_local_p. + * config/alpha/alpha.h (FUNCTION_OK_FOR_SIBCALL): Likewise. - 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-08-14 Richard Henderson -2002-01-30 Alexandre Oliva + * Makefile.in (LOOSE_WARN): Add -fno-common. + * c-common.h (constant_string_class_name): Add missing extern. - * config/mips/mips.h (PARM_BOUNDARY): Guarantee alignment of - arguments to 64-bit boundaries on 64-bit ABIs. +2002-08-15 Neil Booth -2002-01-30 Steve Ellcey + 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. - * loop.c (loop_invariant_p): Special case pic_offset_table_rtx. +2002-08-14 Neil Booth -2002-01-31 Joseph S. Myers + PR preprocessor/7526 + * cpplib.c (run_directive): Kludge so _Pragma dependency works. - * c-decl.c (grokdeclarator): Handle type being a typedef for an - invalid type. +2002-08-14 Nathan Sidwell -2002-01-30 David O'Brien + * doc/invoke.texi (-a): Remove documentation. + (-fprofile-arcs): Remove reference to -a, -ax options. + * doc/gcov.texi (Gcov Data Files): Data might be merged. - * 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-08-14 Gabriel Dos Reis -2002-01-30 Richard Henderson + Fix PR/7566 + * c-semantics.c (genrtl_case_label): Don't (mis)use + warning_with_decl. - * sched-deps.c (sched_analyze): Make a call read the frame pointer. +2002-08-14 Dale Johannesen -2002-01-30 Zack Weinberg + * 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)). - * expmed.c (emit_store_flag): Call protect_from_queue on op0 and op1. +2002-08-14 Neil Booth -2002-01-30 Jason Merrill + * c-opts.c (c_common_post_options): Correct test. - * 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. +2002-08-14 Kaveh R. Ghazi - * dwarf2out.c (dwarf2out_finish): Don't abort if there were errors. + * m88k.h (ASM_OUTPUT_SOURCE_FILENAME): Fix incorrect argument + order in call to fprintf. -2002-01-29 Jakub Jelinek +2002-08-14 Rainer Orth - * cselib.c (cselib_record_sets): Use IF_THEN_ELSE result - in cselib_lookup. + * config/sparc/sol2.h (SUBTARGET_EXTRA_SPECS): Define. -2002-01-29 Aldy Hernandez +2002-08-14 Ulrich Weigand - * 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. + * 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. -2002-01-29 Richard Henderson + * defaults.h (EXTRA_MEMORY_CONSTRAINT): Provide a default. + (EXTRA_ADDRESS_CONSTRAINT): Likewise. + * doc/tm.texi: Document these two new target macros. - * config/alpha/elf.h (SDB_DEBUGGING_INFO): Undef. + * 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. -2002-01-29 Richard Henderson + * config/s390/s390.md: Throughout the machine description, + replace all instances of the constraint combinations 'Qo' + or 'oQ' with simply 'Q'. - * 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-08-14 Stephane Carrez -2002-01-29 Richard Henderson + * 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. - * 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-08-14 Stephane Carrez -2002-01-29 Jakub Jelinek + * doc/invoke.texi: Document -minmax for 68HC12. - * config/i386/i386.h (LIMIT_RELOAD_CLASS): Handle LEGACY_REGS - and INDEX_REGS the same as GENERAL_REGS. - (SECONDARY_OUTPUT_RELOAD_CLASS): Likewise. + * config/m68hc11/m68hc11.md ("umaxqi3"): Use TARGET_MIN_MAX. + ("uminqi3"): Likewise. + ("uminhi3", "umaxhi3"): Likewise. -2002-01-29 Neil Booth + * config/m68hc11/m68hc11.h (MASK_MIN_MAX): Define. + (TARGET_MIN_MAX): Define. + (TARGET_SWITCHES): New option -minmax/-mnominmax. - * tree.c (build_nonstandard_integer_type): Correct prototype. +2002-08-14 Stephane Carrez -2002-01-29 Ulrich Weigand + * config/m68hc11/t-m68hc11-gas (LIB1ASMFUNCS): Build __far_trampoline. + (MULTILIB_OPTIONS): Must also generate for -mlong-calls. - * 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. + * 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. - (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. + * config/m68hc11/m68hc11-crt0.S: Put a mode for ELF ABI flags. + (jsr): New macro to transform a 'jsr' into a 'call'. - (divmoddi4): Don't partially initialize TImode register. +2002-08-14 Stephane Carrez -2002-01-29 Geoffrey Keating + * doc/invoke.texi: Document -mlong-calls for 68HC12. - * doc/sourcebuild.texi (C Tests): Document gcc.dg/debug directory. + * 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. -2002-01-29 Richard Henderson + * 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. - * 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. + * 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-01-29 Neil Booth +2002-08-14 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. + * 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-01-29 Jakub Jelinek +2002-08-13 Kaveh R. Ghazi - 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. + * c-opts.c (lang_flags): Const-ify. + * ra-build.c (undef_table): Likewise. + * ra.c (eliminables): Likewise. - 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-08-14 Gabriel Dos Reis -2002-01-29 Kazu Hirata + * tree.h: Guard against multiple inclusion. - * 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-08-14 Hans-Peter Nilsson -2002-01-29 Kazu Hirata + * reload1.c (reload_cse_simplify): Before checking + REG_FUNCTION_VALUE_P, check REG_P. - * 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-08-13 Geoffrey Keating -2002-01-28 Kazu Hirata + * Makefile.in (attribs.o): Remove $(OBSTACK_H) dependency. - * 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-08-13 Neil Booth -2002-01-28 Kazu Hirata + * c-opts.c (c_common_init_options): Extra braces needed. - * conifg/h8300/h8300.c (h8300_adjust_insn_length): Remove - redundant code. +2002-08-13 J"orn Rennecke -2002-01-28 John David Anglin + * 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. - * 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-08-13 Ulrich Weigand -2002-01-28 Jason Merrill + * 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. - * dwarf2.h: Sync with src version. + * s390-protos.h (s390_tm_ccmode): Declare. + s390.c (s390_tm_ccmode): New function. + (s390_match_ccmode): Allow VOIDmode as REQ_MODE. -2002-01-28 Paul Koning + * s390.md ("*cmpdi_tm2"): Rename to "*tmdi_ext". + ("*cmpsi_tm2"): Rename to "*tmsi_ext". + ("*cmpqi_tm2"): Rename to "*tmqi_ext". - * 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. + ("*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. -2002-01-28 Kazu Hirata + ("*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. - * config/h8300/h8300-protos.h: Remove an unused prototype. + ("*cmpsidi_ccs"): Remove, replace by ... + ("*cmpsi_ccs_sign"): ... this new pattern. + ("*cmpdi_ccs_sign", "*cmpdi_ccu_zero"): New patterns. -2002-01-28 Roman Zippel + ("*cmpqi_ccu_0", "*cmpqi_ccu_immed"): Remove, replace by ... + ("*cli"): ... this new pattern. - * toplev.c (lang_independent_init): Round up identifier size. + ("*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. -2002-01-28 Richard Earnshaw + ("*addsi3_cc"): Allow "general_operand" for operand 2. + ("*addsi3_carry1_cc", "*addsi3_carry1_cconly", + "*addsi3_carry2_cc", "*addsi3_carry2_cconly"): New patterns. - * config.gcc: Revert previous change. + ("addhi3", "addqi3"): Remove, replace by ... + ("*addsi3_sign", "*addsi3_sub"): ... these new patterns. -2002-01-28 Andris Pavenis + ("*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. - * config/i386/djgpp.h: Use STRIP_NAME_ENCODING in macro UNIQUE_SECTION + ("*subsi3_borrow_cc", "*subsi3_borrow_cconly"): New patterns. -2002-01-28 Richard Earnshaw + ("subhi3", "subqi3"): Remove, replace by ... + ("*subsi3_sign", "*subsi3_sub"): ... these new patterns. - * 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. + ("*muldi3_sign"): New pattern. + ("muldi3"): Do not clobber CC. + ("mulsi3"): Likewise. + ("mulsi_6432"): Likewise. -2002-01-28 Kazu Hirata +2002-08-13 Denis Chertykov - * config/h8300/h8300.h: Fix formatting. - * config/h8300/h8300.md: Likewise. + * config/avr/avr.md: Call CC_STATUS_INIT in all peepnoles + which can change CC0. -2002-01-28 Loren J. Rittle +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 - * fixinc/inclhack.def (strict_ansi_not): Add a bypass based on - the old, removed AAA_standards fix. - * fixinc/fixincl.x: Rebuilt. + PR target/7531: + * doc/invoke.texi (i386 and x86-64 Options): Document -mcmodel. -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-08-10 Ziemowit Laski -2002-01-28 Aldy Hernandez + * 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. - * config/rs6000/altivec.h: Remove spurious semicolons. +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-01-27 Kazu Hirata +2002-08-08 Jakub Jelinek - * config/h8300/h8300.md: Replace dead bit extraction patterns - with ones that work. + * 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. -Sun Jan 27 13:23:40 2002 Richard Kenner +2002-08-08 Devang Patel - * emit-rtl.c (get_mem_attrs): Don't default alignment for non-BLKmode - if not STRICT_ALIGNMENT. - * rtl.h (MEM_ALIGN): Likewise. + * 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-01-27 Craig Rodrigues +2002-08-08 Stephen Clarke - * doc/invoke.texi (-fdump-translation-unit): Revert this - patch: 2001-10-21 Craig Rodrigues + * config/sh/sh.c (prepare_move_operands): Only call + target_reg_operand if TARGET_SHMEDIA. -2002-01-27 Kazu Hirata +2002-08-08 Jakub Jelinek - * config/h8300/h8300.md (define_constants): New. - (anonymous patterns) Use defined constants appropriately. + * 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-01-27 Kazu Hirata +2002-08-08 Lars Brinkhoff + Richard Henderson - * config/h8300/h8300.c (function_arg): Remove redundant code. + * emit-rtl.c (gen_rtx_REG): After reload, only return + frame_pointer_rtx or hard_frame_pointer_rtx if frame_pointer_needed. -2002-01-26 Richard Henderson +2002-08-08 Jakub Jelinek - * 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. + * 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-01-26 Richard Henderson +2002-08-08 Adam Nemet - * 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/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. - * 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. +2002-08-08 Nathan Sidwell - * 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. + * 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. - * 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. + * 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. - * config/mcore/mcore-elf.h (FORCE_CODE_SECTION_ALIGN): Replace - FORCE_{INIT,FINI}_SECTION_ALIGN. +2002-08-08 Neil Booth - * config/s390/s390.h (CRT_CALL_STATIC_FUNCTION): Update for new - invocation sequence. - * config/sh/sh.h (CRT_CALL_STATIC_FUNCTION): Likewise. + * 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. - * doc/tm.texi (CRT_CALL_STATIC_FUNCTION): Update. - (FORCE_CODE_SECTION_ALIGN): New. +2002-08-08 David Edelsohn -2002-01-26 Richard Henderson + * config/rs6000/aix.h (TARGET_ALTIVEC): Define to 0. + (TARGET_ALTIVEC_ABI): Same. + (TARGET_ALTIVEC_VRSAVE): Same. - * config/cris/cris.c (cris_print_operand): Handle 64-bit CONST_INT. + * config/rs6000/rs6000.c (rs6000_expand_ternop_builtin): Check + icode not CODE_FOR_nothing. Change switch to if. -2002-01-26 Richard Henderson +2002-08-08 Alan Modra - * 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. + * config/rs6000/rs6000.h (ASM_CPU_SPEC): Pass -mpower4 when cpu=power4. -2002-01-26 Kazu Hirata +2002-08-08 Jakub Jelinek - * 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. + * stor-layout.c (place_union_field): For bitfields if + PCC_BITFIELD_TYPE_MATTERS and TYPE_USER_ALIGN, set record's + TYPE_USER_ALIGN. -2002-01-26 Joseph S. Myers +2002-08-07 John David Anglin - * doc/include/texinfo.tex: Update to version 2002-01-04.07. + * pa.c (struct deferred_plabel): Constify name field. -2002-01-26 Kazu Hirata +2002-08-07 Neil Booth - * 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. + * cppmacro.c (_cpp_builtin_macro_text): Remove unused variable. -2002-01-26 Kaveh R. Ghazi +2002-08-07 John David Anglin - * builtins.c (expand_builtin_strncat): Remove redundant check for - INTEGER_CST. + * configure.in (PREFIX_INCLUDE_DIR): Don't define if prefix and + local_prefix are the same. + * configure: Rebuilt. -2002-01-25 David O'Brien +2002-08-07 Jakub Jelinek + Richard Henderson - * 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. + * 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-01-25 Geoffrey Keating +2002-08-07 Neil Booth - * dbxout.c (dbxout_init): Use assemble_name rather than just - stripping off the first character. - (dbxout_source_file): Likewise. + * 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-01-25 DJ Delorie +2002-08-07 Chris Demetriou - * config/sparc/sparc.c (sparc_emit_set_symbolic_const64): Compare - using rtx_equal_p, not by comparing pointers. + * config/mips/mips.md (sunlt_sf, suneq_sf, sunle_sf): Remove + dependency on TARGET_DOUBLE_FLOAT. -2002-01-25 Steve Ellcey +2002-08-07 Stephen Clarke - * 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. + * config/sh/lib1funcs.asm (GCC_shcompact_incoming_args): Don't + overwrite callee-save registers. Fix comment. -2002-01-25 David O'Brien +2002-08-06 Chris Demetriou - * 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. + * 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-01-25 Douglas B Rupp +2002-08-06 Kaveh R. Ghazi - * config/alpha/x-vms (version): Make static. + * ip2k.c (ip2k_set_compare): Add missing iteration variable. - * config/alpha/vms.h (MD_FALLBACK_FRAME_STATE_FOR): Fix error - in previous checkin. + * Makefile.in (dummy-conditions.o): Depend on $(HCONFIG_H) not + $(GCONFIG_H). - * Makefile.in (install-headers-cp): New target. - * config.gcc (alpha-dec-*vms*): Install headers with - install-headers-cp +2002-08-06 Aldy Hernandez -Fri Jan 25 22:42:49 CET 2002 Jan Hubicka + * c-decl.c (duplicate_decls): Error out for incompatible TLS + declarations. - * unroll.c (unroll_loop): Lower final_value to nonmemory operand; - avoid it's copies. + * testsuite/gcc.dg/tls/diag-3.c: New. -Fri Jan 25 08:26:19 2002 Richard Kenner +2002-08-06 Dale Johannesen - * 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. + * c-common.c (fname_decl): Use line number 0 for + __func__, to avoid confusing debuggers. -2002-01-25 Ulrich Weigand +2002-08-06 Nathan Sidwell - * reload1.c (eliminate_regs_in_insn): Recognize frame pointer - adjustments even if they are implemented by more than two insns. + * 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. -Fri Jan 25 20:43:56 CET 2002 Jan Hubicka +2002-08-06 Neil Booth - * 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. + * dwarf2out.c: Remove unused macros. - * basic-block.h (PROP_EQUAL_NOTES): New flag. - * flow.c (propagate_one_insn): Use it. - (mark_used_regs): Handle NIL. +2002-08-06 Neil Booth -2002-01-25 Geoffrey Keating + * function.c (TRAMPOLINE_ALIGNMENT): Always defined. - * config/stormy16/stormy16.md (tablejump_pcrel): Use a MEM - to help folding. +2002-08-06 Neil Booth -2002-01-25 David Edelsohn + * 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. - * rs6000.md (prefetch): Make address V4SI mode so that the address - is restricted to legitimate form for instruction. +2002-08-06 Jakub Jelinek -2002-01-25 Bob Wilson + * config/i386/mmintrin.h (__m64): Make the type 64-bit aligned. - * doc/install.texi (xtensa-*-elf): New target. - (xtensa-*-linux*): New target. - * doc/contrib.texi: Add myself. +2002-08-06 Jakub Jelinek -2002-01-25 Nick Clifton + * config/i386/i386.c (x86_field_alignment): Apply min for all MODE_INT + and MODE_CLASS_INT modes. - * config/arm/arm.c (arm_hard_regno_mode_ok): Allow any general - purpose register to hold an SImode (or smaller) value. +2002-08-06 Jakub Jelinek -2002-01-25 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. - * unwind-dw2-fde-glibc.c: If inhibit_libc, use __register_frame* - registry only. - * crtstuff.c: Likewise. +2002-08-06 David Edelsohn -2002-01-25 Kazu Hirata + * doc/install.texi (Binaries): Update Bull Freeware URL. - * config/h8300/h8300.md (negation patterns): Tighten - predicates to register_operand. +2002-08-06 Gerald Pfeifer -2002-01-24 Aldy Hernandez + * doc/gcc.texi (Top): Rename Index to Keyword Index. - * loop.c (emit_prefetch_instructions): Use the prefetch insn's - mode, not Pmode. +2002-08-05 Nathan Sidwell - * builtins.c (expand_builtin_prefetch): Same. + * gcov.c (output_data): Round to % to nearest, tweak formatting. -2002-01-24 Alexandre Oliva +2002-08-05 Jakub Jelinek - * config/sh/sh.md (sym_label2reg): Make sure all CONSTs have - modes. + * fold-const.c (associate_trees): Only optimize NEGATE_EXPR in one + of the operands into MINUS_EXPR if code is PLUS_EXPR. -2002-01-24 Kazu Hirata +2002-08-05 Douglas B Rupp - * 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'. + * 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-01-24 Kazu Hirata +2002-08-05 Geoffrey Keating - * config/h8300/h8300.c (print_operand): Remove support for - operand character 'U'. + * 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. -2002-01-24 Andris Pavenis + * 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. - * config/i386/t-djgpp: Use NATIVE_SYSTEM_HEADER_DIR. +2002-08-04 Joseph S. Myers -2002-01-24 Nick Clifton + * doc/include/gcc-common.texi (version-GCC): Increase to 3.3. - * config/arm/arm.c (arm_hard_regno_mode_ok): Allow SImode - values to be assigned to the stack pointer. +2002-08-04 Nathan Sidwell -2002-01-14 Hartmut Penner + * 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. - * emit_rtl.c (gen_lowpart_common): Conversion from const_int - to const_double needs to be done right for big-endian systems. +2002-08-02 Krister Walfridsson -2002-01-24 Jason Merrill + * Makefile.in (gengtype-lex.o, gengtype-yacc.o): Add path to + gengtype-* dependencies. - PR c++/2432 - * config/sparc/sparc.md (call-jump peepholes): Pass the right insn - to can_throw_internal. +2002-08-02 Eric Christopher -2002-01-23 Richard Henderson + * 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. - * fold-const.c (fold): Change UINT_MAX test to check vs precision - rather than TYPE_MAX_VALUE. Fix indentation and a bogus negation. +2002-08-02 David Edelsohn -2002-01-24 Alexandre Oliva + PR optimize/7067 + * config/rs6000/rs6000.h (RTX_COSTS): Artificially make MULT + small if optimizing for size. - * 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-08-02 Daniel Jacobowitz -2002-01-23 Kazu Hirata + * configure.in (FORBUILD): Use $build_alias. + * configure: Regenerated. - * config/h8300/h8300.md: Fix xorqi and xorqi so that they will - accept to accept 0x80 as operands[2]. +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 -2002-01-24 Alexandre Oliva + * 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. - * config/sparc/sparc.md (fix_trunctfdi2): Correct typo in mode. +2002-08-02 Kaveh R. Ghazi -2002-01-23 Richard Henderson + * 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. - * config/alpha/alpha.md (call_value_osf_1_er peepholes): Fix typo. +2002-08-02 Toon Moene -2002-01-23 Aldy Hernandez + * 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. - * c-parse.in (parmlist_or_identifiers): Add maybe_attribute. - (parmlist_or_identifiers_1): Verify that only a parmlist follows - an attribute. +2002-08-02 Jason Merrill -2002-01-23 Richard Henderson + * gdbinit.in (pct): New macro. - * expr.c (move_by_pieces_1): Extend size before negation. +2002-08-01 Stan Shebs + Andreas Tobler - * 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. + * ginclude/stddef.h (_BSD_SIZE_T_DEFINED_): Define if not defined, + plays nice with Darwin headers. + (_BSD_RUNE_T_DEFINED_): Likewise. -2002-01-23 Bob Wilson +2002-08-01 Zack Weinberg - * 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. + * c-common.c (c_common_init): -Wtraditional also implies -Wlong-long. + * cppinit.c (cpp_post_options): Likewise. -2002-01-23 Zack Weinberg + * cppexp.c (cpp_classify_number): Suppress -Wtraditional + warning about 'LL' suffix (but not 'ULL' etc) when + -Wno-long-long is in effect. - * diagnostic.c (internal_error): Do ICE suppression only - when ENABLE_CHECKING is not defined. + * 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. - * c-typeck.c (require_complete_type): Return error_mark_node - if type is error_mark_node. + * doc/cpp.texi, doc/extend.texi: Document behavior of __DATE__ + and __TIME__ when the date and time cannot be determined. -2002-01-23 Janis Johnson +2002-08-02 Alan Modra - * toplev.c (process_options): Disable -fprefetch-loop-arrays with - -Os and issue a warning. + * config/rs6000/rs6000.c (output_cbranch): Hint differently for power4. -2002-01-23 Zack Weinberg +2002-08-01 Daniel Jacobowitz - * doc/fragments.texi, doc/hostconfig.texi: Update to reflect - current (lack of) need for host configuration by hand. + * Makefile.in ($(BUILD_PREFIX_1)ggc-none.o): Use $(GGC_H). - * 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-08-01 Chris Demetriou -2002-01-23 Will Cohen + * 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. - * config/arm/arm.h (THUMB_FUNCTION_PROFILER): Define if not currently - defined. +2002-08-01 David Edelsohn -2002-01-23 Kazu Hirata + * 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. - * config/h8300/h8300.md (*andorhi3): Accept 0x8000 as an - operand[3]. +2002-08-01 Chris Demetriou -2002-01-23 Jason Merrill + * config/mips/mips.h (BRANCH_LIKELY_P): Remove unused macro. - * tree.c (build1): Don't set TREE_READONLY on INDIRECT_REF. +2002-08-02 Alan Modra - * function.c (assign_parms): Don't put args of inline functions - into registers when not optimizing. + * config/rs6000/linux64.h (DBX_OUTPUT_BRAC): Define. + (DBX_OUTPUT_LBRAC, DBX_OUTPUT_RBRAC): Define. -2002-01-23 Nick Clifton + * config/rs6000/rs6000.c (output_toc): Don't use lshift_double when + HOST_BITS_PER_WIDE_INT == 64. - * 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-08-01 Kaveh R. Ghazi -2002-01-23 Hans-Peter Nilsson + * 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. - * loop.c [!HAVE_prefetch] (CODE_FOR_prefetch): Define to 0. +2002-08-01 Franz Sirl -2002-01-23 Neil Booth + * c-common.c (cb_register_builtins): Always define __GXX_ABI_VERSION. - PR c/3504 - * doc/extend.texi: Correct documentation of __alignof__. +2002-08-01 Richard Henderson -2002-01-22 Zack Weinberg + * toplev.c (parse_options_and_default_flags): Don't set + flag_reorder_blocks for -Os. - * params.h: Rename arguments of DEFPARAM so that it will be - recognized as a translation keyword. + * 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-01-22 Aldy Hernandez +2002-08-01 H.J. Lu + Richard Henderson - * extend.texi: Document altivec functions. - Fix N-bit adjectives in X86 builtin documentation. + * 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-01-22 Alexandre Oliva +2002-08-01 Richard Henderson - * reload.c (reg_overlap_mentioned_for_reload_p): Handle PLUS and - auto_inc_dec values. + * integrate.c (copy_rtx_and_substitute): Squash MEM_EXPR when it + refers to a subroutine parameter. -2002-01-22 Richard Earnshaw +2002-08-01 Jakub Jelinek - * config/netbsd-aout.h (SWITCH_TAKES_ARG): Remove bogus white space - after backslash. - (ASM_DECLARE_OBJECT_NAME): Add missing backslash before final line. + * varasm.c (assemble_visibility): Strip name encoding. -2002-01-22 Alexandre Oliva +2002-08-01 Ian Dall - * config/i386/freebsd-aout.h (ASM_QUAD): Undefine. + * 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-01-22 Richard Henderson +2002-08-01 Aldy Hernandez - * config/alpha/alpha.c (split_small_symbolic_mem_operand): Use - copy_insn not copy_rtx. + * config/rs6000/rs6000.h (SPU_CONST_OFFSET_OK): Change to 0xff. -2002-01-23 Alan Modra +2002-08-01 Neil Booth - * 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. + * c-common.c (__GXX_ABI_VERSION): Correct spelling. -2002-01-22 Richard Henderson +2002-08-01 Benjamin Kosnik - * 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. + * 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-01-22 Richard Henderson +2002-07-31 John David Anglin - * config/alpha/alpha.md (divmodsi_internal_er): Generate lituse - sequence number for the literal. - (divmoddi_internal_er): Likewise. + * 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-01-22 Craig Rodrigues +2002-07-31 David Edelsohn - PR java/4972 - * aclocal.m4 (AM_ICONV): Put linking flags for libiconv - in LIBICONV variable. - * configure: Regenerated. + * 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-01-22 Krister Walfridsson +2002-07-30 David Edelsohn + Zack Weinberg - * dependence.c (build_def_use): Remove array_idx. + * 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. - * dwarfout.c (last_filename): Remove. - (output_compile_unit_die): Remove last_filename. +2002-07-30 Franz Sirl -2002-01-22 Roger Sayle - Richard Henderson + * gcc.c (cpp_unique_options): Define __GXX_ABI_VERSION, bump it to 101. - PR opt/3640 - * fold-const.c (fold): Optimize unsigned comparisons against - UINT_MAX (and similar unsigned constants). +2002-07-30 Richard Sandiford -2002-01-22 Janis Johnson + * config/mips/mips.h (SUBTARGET_ASM_DEBUGGING_SPEC): Fix typo. - * Makefile.in (loop.o): Depend on OPTABS_H. - * loop.c (emit_prefetch_instructions): Check the prefetch operand - against the predicate. +2002-07-30 J"orn Rennecke - PR target/5379 - * config/i386/i386.md (prefetch_sse): Specify "p" as a constraint - for the address operand. + * 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-01-22 Richard Henderson +2002-07-30 J"orn Rennecke - * config/alpha/freebsd.h (FUNCTION_PROFILER): Remove. + * unroll.c (copy_loop_body): Don't copy NOTE_INSN_LOOP_CONT. -2002-01-22 Craig Rodrigues +2002-07-30 Kazu Hirata - PR other/5450 - * config/i386/sysv4.h (CPP_SPEC): Define, and add CPU - preprocessor flags. + * fold-const.c: Fix comment typos. + * gcse.c: Likewise. + * reload1.c: Likewise. -2002-01-22 Jason Thorpe +2002-07-29 Aldy Hernandez - * config.gcc (x86_64-*-netbsd*): New target. - * config/i386/netbsd64.h: New file. + * config/rs6000/rs6000.md: Disallow CCEQ compare with crnor/crnot + for TARGET_SPE. -2002-01-22 Aldy Hernandez +2002-07-30 Gabriel Dos Reis - * regrename.c (kill_value): Fix typo. + * 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-01-22 Aldy Hernandez +2002-07-30 Kaveh R. Ghazi - * doc/tm.texi: Remove STARTING_FRAME_PHASE. + * 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. - * config/rs6000/rs6000.h: Same. + * defaults.h (ASM_OUTPUT_LABEL): Provide a default. + * doc/tm.texi (ASM_OUTPUT_LABEL): Update docs. - * function.c (instantiate_virtual_regs): Remove - STARTING_FRAME_PHASE. - (assign_stack_local_1): Same. - Calculate frame phase. +2002-07-30 Gabriel Dos Reis -2002-01-22 Nick Clifton + * 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. - * 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. +2002-07-29 Kaveh R. Ghazi - * 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. + * 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-01-22 Jason Merrill +2002-07-29 Roger Sayle - * c-semantics.c (genrtl_compound_stmt): Only check nesting - consistency if this COMPOUND_STMT is scoped. + * 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-01-22 Kazu Hirata +2002-07-29 John David Anglin - * 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. + * 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. -Tue Jan 22 06:26:33 2002 Richard Kenner +2002-07-29 Richard Henderson - * tree.c (int_fits_type_p): If bounds of a subtype are variable, see - if fits in bounds of base type. + * unroll.c (verify_addresses): Remove. + (find_splittable_givs): Never split DEST_ADDR givs. - * 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-07-29 Geoffrey Keating -2002-01-22 Hans-Peter Nilsson + * doc/gty.texi (GGC Roots): Clarify that the list of syntaxes + is exhaustive. + (Files): Improve documentation on generated source files. - * c-typeck.c (parser_build_binary_op): If result from - build_binary_op is ERROR_MARK just return error_mark_node without - further processing. + * 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-01-21 Jason Thorpe +2002-07-30 Gabriel Dos Reis - * 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. + * 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-01-21 Joseph S. Myers +2002-07-30 Neil Booth - * 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. + * objc/objc-act.c (objc_init): Return immediately if filename + is NULL. -2002-01-20 Kazu Hirata +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/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. + * config/rs6000/rs6000.h (RTX_COSTS): Add MULT case for 8540. -2002-01-20 Kazu Hirata +2002-07-29 Aldy Hernandez - * config/h8300/h8300.c: Revise comments about shift code. + * config/rs6000/rs6000.md: Move altivec patterns from here... + + * config/rs6000/altivec.md: ...to here. -2002-01-20 Kazu Hirata +2002-07-29 Aldy Hernandez - * config/h8300/h8300.c (function_arg): Update a comment. + * config/rs6000/spe.md ("spe_evmra"): Change to unspec. -2002-01-20 Kazu Hirata +2002-07-29 Richard Henderson - * config/h8300/h8300.md: Update the comments at the beginning - of the file. + * 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-01-20 Kazu Hirata +2002-07-29 Gabriel Dos Reis - * config/i370/i370.c: Fix comment formatting. - * config/i370/i370.h: Likewise. - * config/i370/i370.md: Likewise. - * config/i370/linux.h: Likewise. + * 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. -Sun Jan 20 18:40:14 2002 Richard Kenner +2002-07-29 Aldy Hernandez - * reg-stack.c (subst_stack_regs): Properly check for deleted insn. + * 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. - * 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-07-29 David Edelsohn -2002-01-20 Graham Stott + * varasm.c (assemble_variable): Narrow test for uninitialized + without BSS target support. - * cfgloop.c (flow_loop_preheader_scan): Fix typo. +2002-07-29 Nathan Sidwell -2002-01-19 John David Anglin + * 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. - * config.gcc (hppa*64*-*-hpux11*): Fix tmake_file. +2002-07-29 Bob Wilson -2002-01-19 Tom Rix + * 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. - * config/rs6000/rs6000.md: Fix DF split for 64 bit hosts. +2002-07-29 Zack Weinberg -2002-01-18 Aldy Hernandez + * 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. - * doc/tm.texi (STARTING_FRAME_PHASE): Document. + * 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. - * 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. + * 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. - * config/rs6000/rs6000.h (STARTING_FRAME_PHASE): New. +2002-07-29 Mike Stump -2002-01-19 Alexandre Oliva + * config.gcc (target_gtfiles): Initialize, as otherwise cross + compilers hosted on powerpc-apple-darwin6.0 won't even build. - * config/sh/sh.md (movdf_i4 split): Fix alter_subreg calls. +2002-07-29 Richard Earnshaw -2002-01-18 Craig Rodrigues + * 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. - * doc/install.texi (hppa*-hp-hpux11): Clarify that GCC 2.95.x cannot - be used for bootstrapping GCC 3.0. +2002-07-29 Gabriel Dos Reis -2002-01-18 Kazu Hirata + * pretty-print.h: Define more macros. + * diagnostic.h (output_formatted_integer): Moved from... + * diagnostic.c: ... here. - * config/h8300/h8300.md: Fix an insn length. +2002-07-28 Kaveh R. Ghazi -2002-01-18 Kazu Hirata + * stormy16.h (ASM_OUTPUT_SYMBOL_REF): Use ASM_OUTPUT_LABEL_REF. - * 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. +2002-07-28 Zack Weinberg -Thu Jan 17 15:28:26 2002 Richard Kenner + * 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. - * attribs.c (decl_attributes): Clear ATTR_FLAG_TYPE_IN_PLACE - if type_required and passed decl. + * 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-01-17 Aldy Hernandez +2002-07-28 Kaveh R. Ghazi - * config.gcc (cpu_type): Include altivec.h in powerpc - extra_headers. - Same for darwin. + * Makefile.in (gengtype-lex.c): Fix error in last change. - * config/rs6000/altivec.h: New. + * alpha/freebsd.h (TARGET_OS_CPP_BUILTINS): Add missing + backslash. -2002-01-17 David Edelsohn + * Makefile.in (vmsdbgout.o): Depend on function.h. - * 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. + * vmsdbgout.c: Include function.h. -2002-01-17 Jason Merrill +2002-07-28 Alan Modra - * dbxout.c (dbxout_type): Support const and volatile. + * 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. - * except.c (add_partial_entry): Remove backwards compatibility code. - (end_protect_partials): Likewise. +2002-07-27 Roger Sayle -2002-01-17 Jakub Jelinek + * 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. - * 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. + * c-decl.c (builtin_function): No need to explicitly mark + BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn. -2002-01-16 Eric Christopher +2002-07-27 Roger Sayle - * 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. + * Makefile.in: rtlanal.o now depends upon real.h. -2002-01-16 H.J. Lu + * flags.h [flag_signaling_nans]: New flag. + [HONOR_SNANS]: New macro. - * config/mips/linux.h: Include "mips/abi64.h". + * 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. -2002-01-16 H.J. Lu + * c-common.c (cb_register_builtins): Define __SUPPORT_SNAN__ + when -fsignaling-nans. First step to implementing WG14's N965. - * config/mips/t-linux: New. + * 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. - * config.gcc: Add mips/t-linux to tmake_file for mips*-*-linux*. + * simplify-rtx.c (simplify_relational_operation): Conditionalize + transforming abs(x) < 0.0 into false on !HONOR_SNANS. - * config/mips/linux.h: Don't include "gofast.h". - (INIT_SUBTARGET_OPTABS): Removed. + * 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). -2002-01-16 Kazu Hirata + * doc/invoke.texi: Document new -fsignaling-nans compiler option. - * config/h8300/h8300-protos.h: Replace emit_a_shift with - output_a_shift. - * config/h8300/h8300.c: Likewise. - * config/h8300/h8300.md: Likewise. +2002-07-27 Kaveh R. Ghazi -2002-01-16 Kazu Hirata + * Makefile.in (gengtype-lex.c): Work around a bug in flex. + * gengtype-lex.l (YY_USE_PROTOS): Undef. + (YY_DECL): Define. - * config/h8300/h8300.md (pushqi1_h8300): Use a tab instead of - spaces after an opcode name. - (pushqi1_h8300hs): Likewise. - (pushhi1_h8300hs): Likewise. +2002-07-27 Roger Sayle -2002-01-16 Kazu Hirata + * doc/invoke.texi: Document that both -fno-builtin-foo and + -fno-builtin are supported by the g++ front-end. - * doc/extend.texi: Replace "option" with "attribute" - appropriately. +2002-07-27 Stan Shebs -2002-01-16 Jakub Jelinek + * 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. - * 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-07-25 Aldy Hernandez -2002-01-16 Jakub Jelinek + * config/rs6000/rs6000.c (function_arg_advance): SPE vararg + vectors are split into two registers. + (function_arg): Same. - 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-07-26 J"orn Rennecke -2002-01-16 Kazu Hirata + * pa.md (extv): Check predicates before emitting extv_32. - * doc/invoke.texi: Change the dump file name of block - reordering pass from 28.bbro to 29.bbro. - Mention -dk option. +2002-07-27 Alan Modra -Wed Jan 16 17:54:22 CET 2002 Jan Hubicka + * 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. - * i386.md (minsf splitter): Fix pasto. + * config/rs6000/rs6000.c (output_profile_hook): Don't generate profile + label reference when NO_PROFILE_COUNTERS. -2002-01-16 Nick Clifton +2002-07-26 Jason Merrill - * 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. + * function.c (assign_parms): Handle frontend-directed pass by + invisible reference. -2002-01-16 Jakub Jelinek +2002-07-26 Neil Booth - PR target/5357: - * config/sparc/sparc.c (sparc_override_options): Avoid MASK_V9 and - MASK_V8 being both set. + * doc/cppopts.texi: Update. -2002-01-16 Ulrich Weigand +2002-07-26 Neil Booth - * 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. + * cppmacro.c (_cpp_create_definition): Don't attempt redefinition + warnings on assertions. -2002-01-16 Nick Clifton +2002-07-26 Neil Booth - * config/arm/arm.c: General formatting tidy up. + * 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-01-16 Graham Stott +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. - * 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-07-25 Neil Booth -2002-01-16 Graham Stott + * dwarfout.c (VERSION_ASM_OP, DERIV_BEGIN_LABEL_FMT, + DERIV_END_LABEL_FMT): Remove. + (SL_BEGIN_LABEL_FMT, SL_END_LABEL_FMT): Move. - * sched-rgn.c (passed): Use sbitmap_free. - (header): Likewise. - (inner): Likewise. - (in_queue): Likewise. - (in_stack): Likewise. +2002-07-25 Neil Booth -2002-01-15 Eric Christopher + * objc/objc-act.c (UTAG_STATICS, UTAG_PROTOCOL_LIST, USERTYPE): + Remove. - * flow.c (propagate_one_insn): Change to use fatal_insn. +2002-07-25 Stan Shebs -2002-01-15 Kazu Hirata + * config/rs6000/rs6000.c (rs6000_emit_prologue): Remove unused + local var dwarfp. + (output_compiler_stub): Remove unused locals. + (output_call): Always initialize line number. - * 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-07-25 J"orn Rennecke -2002-01-15 Aldy Hernandez + * sh.h (LOAD_EXTEND_OP): QImode zero-extends on SHmedia. + * sh.md (truncdiqi2, movqi_media): Likewise. - * 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-07-25 Neil Booth -2002-01-15 Aldy Hernandez + * 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. - * config.gcc: Change altivec.h to altivec-defs.h. +2002-07-25 Richard Sandiford - * config/rs6000/altivec.h: Delete. + * 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 - * config/rs6000/altivec-defs.h: Add. + * toplev.c (rest_of_compilation): Dump loops before clobbering + the structure. -2002-01-15 John David Anglin +2002-07-24 Jan Hubicka - * vax.c (vax_rtx_cost): Return MAX_COST for unsupported MULT, UDIV - and UMOD modes. + * rtlanal.c (keep_with_call_p): Avoid overflow in fixed_regs. - * vax.h (INDEX_TERM_P): Restrict indexing to modes which have a size - less than or equal to eight bytes. +2002-07-24 Frank van der Linden - * 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. + PR optimization/7291 + * config/i386/i386.c (ix86_expand_clrstr): Fix bzero alignment + problem on x86_64. -2002-01-15 Jason Merrill +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 - * 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. + * 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-01-15 Eric Christopher +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. - * flow.c (propagate_one_insn): Add error message and print out - insn for debugging. +2002-07-23 Steve Ellcey -2002-01-15 Joseph S. Myers + * 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. - * 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-07-23 Gabriel Dos Reis -2002-01-15 Craig Rodrigues + 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. - * doc/install.texi (hppa*-hp-hpux11): --enable-threads does - not work on this platform currently. +2002-07-23 Jan Hubicka -2002-01-15 Joseph S. Myers + * 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. - * c-typeck.c (build_unary_op): Don't wrap msgid argument of - readonly_warning in _(). +2002-07-23 J"orn Rennecke -2002-01-15 Douglas B Rupp + * 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. - * gcc.c (delete_if_ordinary): Backout previous change. +2002-07-23 Neil Booth -2002-01-15 Kazu Hirata + * config/m88k/m88k.h (SECTION_ASM_OP): Remove. - * config/h8300/h8300.c (print_operand): Remove support for - unused operand characters. +2002-07-23 Neil Booth - * 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. + * vmsdbgout.c (SECTION_ASM_OP): Remove. -2002-01-15 Kazu Hirata +2002-07-23 Neil Booth - * config/i386/i386.c: Fix formatting. + * config/i386/i386.c (AT_BP): Remove. -2002-01-15 Jakub Jelinek +2002-07-23 Neil Booth - * c-typeck.c (process_init_element): Don't save_expr - COMPOUND_LITERAL_EXPR if just its initializer will be used. + * 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-01-15 David Edelsohn +2002-07-22 Stephane Carrez - * 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. + PR target/6744 + * config/m68hc11/m68hc11.c (m68hc11_z_replacement): Also replace + ASM_OPERANDS instructions. -2002-01-15 Andreas Jaeger +2002-07-22 Stephane Carrez - * config.gcc (x86_64-*-*): Install mmintrin.h and xmmintrin.h. + PR target/7361 + * config/m68hc11/m68hc11.c (go_if_legitimate_address_internal): Accept + constant addresses only on 68HC12. -2002-01-15 Kazu Hirata +2002-07-22 Neil Booth - * mips-tfile.c: Fix formatting. + * cppfiles.c (stack_include_file): Correct test of whether + a dependency should be output. -Tue Jan 15 00:56:11 CET 2002 Jan Hubicka +2002-07-22 David Edelsohn - * unroll.c (final_reg_note_copy): Fix previous commit. + * collect2.c (is_ctor_dtor): Add other possible JOINER values. -2002-01-14 Kazu Hirata +2002-07-22 Richard Earnshaw - * config/h8300/h8300-protos.h: Remove the prototype for - eq_operator. - * config/h8300/h8300.c (eq_operator): Remove. + * 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-01-14 Richard Henderson +2002-07-22 Neil Booth - * config/i386/i386.md (prefetch): Tidy. - (prefetch_3dnow): Fix locality operand. + * ssa-ccp.c (PHI_PARMS): Remove. -2002-01-14 Richard Henderson +2002-07-22 Richard Sandiford - * config/mips/mips.h (HI_AND_FP_REGS): New register class. - (CLASS_CANNOT_CHANGE_MODE): Disallow HI in little-endian mode. + * config/mips/mips.h (CLASS_CANNOT_CHANGE_MODE): Include FP_REGS + on big-endian targets. -2002-01-14 Hans-Peter Nilsson +2002-07-22 Kaveh R. Ghazi - * reload1.c (reload_combine): Pass reg_sum replacement through - copy_rtx in loop performing multiple changes. + * 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. -2002-01-14 Jakub Jelinek + * ra-debug.c (dump_static_insn_cost): Avoid string concatenation. - * 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. +2002-07-22 J"orn Rennecke -Mon Jan 14 21:26:13 CET 2002 Jan Hubicka + * rtlanal.c (subreg_regno_offset): Return correct offset for + big endian paradoxical subregs. - * toplev.c (rest_of_compilation): Rebuild jump labels after - gcse. + * optabs.c (expand_vector_unop): Don't expand using sub_optab + if we got the wrong mode. -2002-01-14 Joseph S. Myers + * hwint.c (define HOST_WIDE_INT_PRINT_DEC_C): New define. + * genrecog.c (write_switch, write_cond): Use it. + * genemit.c (gen_exp): Likewise. - * 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-07-22 Jakub Jelinek -2002-01-13 Christopher Faylor + * c-decl.c (build_compound_literal): Set decl TREE_READONLY from TYPE. - * cppfiles.c (TEST_THRESHOLD): New macro. - (SHOULD_MMAP): Ditto. - (read_include_file): Use SHOULD_MMAP macro to decide when mmap should - be used. +2002-07-22 Jakub Jelinek -Mon Jan 14 20:23:34 CET 2002 Jan Hubicka + * c-decl.c (build_compound_literal): Defer compound literal decls + until until file end to emit them only if they are actually used. - * unroll.c (final_reg_note_copy): Properly handle - REG_LABEL - (unroll_loops): Fix LOOP_CONDITION heuristics. +2002-07-21 Kaveh R. Ghazi -2002-01-14 Geoffrey Keating + * 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 - * doc/invoke.texi (Xstormy16 Options): Add xstormy16 option. - * doc/md.texi (Machine Constraints): Use @minus{} where appropriate. +2002-07-21 Richard Henderson -Mon Jan 14 20:18:19 CET 2002 Jan Hubicka + * expr.c (expand_expr) [TRY_FINALLY_EXPR]: Don't use + GOTO_SUBROUTINE_EXPR when finally_block can be re-expanded. - * cfgcleanup.c (try_forward_edges): Avoid infinite loop at infinite - threaded loop. +2002-07-21 Richard Henderson -2002-01-14 Tom Rix + * unroll.c (find_splittable_givs): Do not split DEST_ADDR givs + that are not unrolled completely. - * config/rs6000/rs6000.md: Fix typo with sradi. +2002-07-21 Richard Henderson -2002-01-14 Ulrich Weigand + * 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. - * config/s390/s390.md (movstrdix_64, movstrsix_31, movstrdi_64, - movstrsi_31, clrstrsi_64, clrstrsi_31): Improve RTL templates. - (clrstrdi, clrstrsi): Adapt callers. +2002-07-21 Richard Henderson - (extendsidi2, zero_extendsidi2): Remove no-conflict blocks. + * 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. - (movti splitter): Never use register 0 as base register. +2002-07-21 Hartmut Schirmer -2002-01-14 Hartmut Penner + * libgcc2.c (__divdi3, __moddi3): Use unary minus operator + instead of __negdi2 directly. - * combine.c (simplify_shift_const): Always generate new rtx - for shift expression instead of reusing given expression. +2002-07-21 Neil Booth -Mon Jan 14 07:08:55 2002 Richard Kenner + * 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. - * config/alpha/alpha.c (alpha_expand_mov): Don't call - alpha_legitimize_address unless mode is Pmode. +2002-07-21 Neil Booth -2002-01-13 Geoffrey Keating + * 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. - * doc/md.texi (Modifiers): Document the '*' constraint for the - user. +2002-07-21 Gabriel Dos Reis - * doc/md.texi (Machine Constraints): Add constraints for xstormy16. - * doc/extend.texi (Function Attributes): 'interrupt' is valid - for xstormy16 too. + * 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-01-13 Richard Henderson +2002-07-21 Neil Booth - * reload.c (find_reloads): Use a hard reg destination as reload reg - for an input reload of the source. + * c-format.c (T99_I, T99_UI): Remove. -2002-01-13 Gerald Pfeifer +2002-07-21 Neil Booth - * doc/install.texi (Binaries): Make link to ftp.writtenword.com - more generic. + * c-typeck.c (SAVE_SPELLING_DEPTH): Remove. -Sun Jan 13 07:23:01 2002 Douglas B Rupp +2002-07-21 Jan Hubicka - * Makefile.in (LIB2FUNCS): Split into LIB2FUNCS_1 and LIB2FUNCS_2. - * mklibgcc.in (LIB2FUNCS): Split into LIB2FUNCS_1 and LIB2FUNCS_2. + * gcse.c (do_local_cprop): Do not extend lifetimes of registers set by + do_local_cprop. - * config/alpha/x-vms (USE_COLLECT2): Set to empty. +2002-07-21 Andreas Jaeger -Sun Jan 13 06:55:31 2002 Richard Kenner + * reload1.c (fixup_abnormal_edges): Remove unused variable. - * dwarf2out.c (mem_loc_descriptor, case ADDRESSOF): New case. +2002-07-21 Bernd Schmidt -2002-01-12 Tom Rix + 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. - * config/rs6000/rs6000.c (rs6000_emit_set_long_const): Use ior for - TARGET_POWERPC64. + (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. -2002-01-12 Richard Henderson + (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. - * config/i386/i386.c (bdesc_2arg): Mark psadbw MASK_3DNOW_A. + (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. - * doc/invoke.texi: Update Alpha options. + (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. - * doc/invoke.texi: Update i386 built-in function lists. +2002-07-21 Jan Hubicka -Sat Jan 12 17:38:11 CET 2002 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. - * unroll.c (final_reg_note_copy): Avoid crash on REG_LABEL note - referencing outside. +2002-07-20 Roger Sayle -Sat Jan 12 08:54:51 2002 Richard Kenner + * simplify-rtx.c (simplify_relational_operation): Optimize + abs(x) < 0.0 (and abs(x) >= 0.0 when using -ffast-math). - * 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-07-20 Michae Matz -2002-01-12 Graham Stott + * ra-build.c: (remember_web_was_spilled): Use GENERAL_REGS. - * 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-07-20 Neil Booth -2002-01-12 Nick Clifton + * 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. - * config/arm/arm.h (ARM_LEGITIMIZE_RELOAD_ADDRESS): Use - MODE_BASE_REG_CLASS. - (THUMB_LEGITIMIZE_RELOAD_ADDRESS): Use MODE_BASE_REG_CLASS. +2002-07-19 David Edelsohn -2002-01-12 Richard Henderson + * 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. - * 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-07-19 Momchil Velikov -2002-01-11 Richard Henderson + * reload1.c (reload_as_needed): Duplicate oldpat. - * 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-07-20 Alan Modra -2002-01-12 Michael Hayes + 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. - * conflict.c (conflict_graph_compute): Free regsets when finished. - * ssa.c (compute_coalesced_reg_partition): Likewise. +2002-07-19 Zack Weinberg -2002-01-12 Herman A.J. ten Brugge + * 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. - * global.c (find_reg): Check for HARD_REGNO_CALL_PART_CLOBBERED - every where we allocate a register. + * 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. -2002-01-12 Michael Hayes + * 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. - * gcse.c (compute_pre_data, pre_gcse): Use sbitmap_free. - * lcm.c (compute_earliest, compute_farthest): Likewise. + * 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-01-11 Janis Johnson +2002-07-19 Rainer Orth - * expr.c (expand_assignment): Fix misuse of MEM_KEEP_ALIAS_SET. + * config/mips/iris5gas.h (DWARF2_DEBUGGING_INFO): Define. + (PREFERRED_DEBUGGING_TYPE): Use DWARF2_DEBUG. + (LINK_SPEC): Define. + (STARTFILE_SPEC): Define. + (ENDFILE_SPEC): Define. -2002-01-11 Janis Johnson + * config/mips/iris6-o32.h (LINK_SPEC): Move ... + * config/mips/iris6-o32-as.h (LINK_SPEC): ... here. - * doc/rtl.texi (Insns): Fix 2 typos. + * config/mips/iris6-o32-gas.h: New file. + * config.gcc (mips-sgi-irix6*o32): Use it. -2002-01-11 Joseph S. Myers + * config/mips/t-iris5-gas: New file. + * config.gcc (mips-sgi-irix6*o32, mips-sgi-irix5*): Use it. - * 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-07-19 Neil Booth -2002-01-11 Craig Rodrigues + * 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. - 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-07-19 Marek Michalkiewicz -2002-01-11 Nick Clifton + * config/avr/avr.c (debug_hard_reg_set): Remove. - * config/arm/arm.c (arm_gen_constant): Correct test of 'remainder' - and 'subtargets'. +2002-07-19 Chris Demetriou -2002-01-11 Andreas Jaeger , - Brad Lucier + * gcc.c (cpp_options): Include "%1" (cc1_spec). - * config/i386/i386.h (CPP_CPUCOMMON_SPEC): Remove wrong - mcpu. +2002-07-19 Richard Henderson -Fri Jan 11 07:35:12 2002 Douglas B Rupp + * loop.c (loop_givs_rescan): Delete the REG_EQUAL note, not the insn. - * config/alpha/vms.h: (MD_FALLBACK_FRAME_STATE_FOR): Fix errors. - Protect with IN_LIBGCC. - (LINK_EH_SPEC): Add required trailing space. +2002-07-19 Alan Modra -Fri Jan 11 09:25:05 2002 Nicola Pero + * prefix.c (update_path): Don't zap single `.' path components + unless followed by another `.' and fix typo last patch. - * 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-07-18 Neil Booth -2002-01-11 Andreas Jaeger + * 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. - * config/i386/i386.h (CPP_CPUCOMMON_SPEC): Remove duplicated - march. +2002-07-18 Bo Thorsen -2002-01-10 Richard Henderson + * config/i386/linux64.h (STARTFILE_PREFIX_SPEC): Define this always. - * 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-07-18 J"orn Rennecke -2002-01-10 Aldy Hernandez + * 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. - * 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. +2002-07-18 John David Anglin - * config/rs6000/rs6000.h (rs6000_builtins): Same. + * pa-linux.h (DWARF2_UNWIND_INFO): Delete define. + * pa.h (EH_RETURN_DATA_REGNO): Revise TARGET_64BIT and correct + numbering. - * 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-07-18 John David Anglin -2002-01-10 Richard Henderson + * pa.c (output_deferred_plabels): Remove unused millicode enum mulU. - * 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-07-18 Richard Henderson -2002-01-10 Zack Weinberg + PR optimization/7147 + * ifcvt.c (noce_get_condition): Make certain that the condition + is valid at JUMP. - * 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-07-18 J"orn Rennecke -2002-01-10 Zack Weinberg + * sh.c (barrier_align, push): Shut up compiler warnings. + (initial_elimination_offset,sh_media_init_builtins): Likewise. + (reg_no_subreg_operand): Delete. - * configure.in: Set stage1_cflags for powerpc-*-darwin*. - * configure: Regenerate. +2002-07-17 Bo Thorsen - * 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/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. - * 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. +2002-07-18 Jan Hubicka - * 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. + * gcse.c (hoist_expr_reaches_here_p): Stop once expr_bb is reached. - * 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. + * gcse.c (try_replace_reg): Do not return false positives. - * config.gcc: Update to match above changes. +2002-07-18 Alan Modra -2002-01-10 Kazu Hirata + * prefix.c: (update_path): Strip ".." components when prior dir + doesn't exist. Pass correct var to UPDATE_PATH_HOST_CANONICALIZE. - * config/h8300/h8300.h: Fix comment typos. - * config/h8300/h8300.md: Likewise. - * config/h8300/lib1funcs.asm: Likewise. + * config/rs6000/sysv4.h (ASM_OUTPUT_REG_PUSH): Remove 64-bit support. + (ASM_OUTPUT_REG_POP): Likewise. -2002-01-10 Dale Johannesen +2002-07-18 Alan Modra - PR optimization/5269 - * unroll.c (precondition_loop_p): Make *increment be the correct - sign when n_iterations known, to avoid confusing caller. + * 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-01-10 Kazu Hirata +2002-07-17 Neil Booth - * doc/extend.texi (deprecated): Fix a typo. + * 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. -Thu Jan 10 22:35:54 CET 2002 Jan Hubicka +2002-07-17 J"orn Rennecke - * 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. + * regrename.c (maybe_mode_change): New function. + (find_oldest_value_reg, copyprop_hardreg_forward_1): Use it. - * i386.c (ix86_decompose_address): Return -1 if address contains - shift. - (legitimate_address_p): Require ix86_decompose_address to return 1. +2002-07-17 Rodney Brown - * gcse.c (hash_scan_set): Use CONSTANT_INSN_P. - (cprop_insn): Likewise. + * config/i386/i386.c (ix86_expand_int_movcc): In the general case + suppress addition when either ct or cf are zero. -2002-01-10 Kazu Hirata +2002-07-17 Eric Botcazou + Glen Nakamura - * 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. + PR optimization/6713 + * loop.c (loop_givs_rescan): Explicitly delete the insn that + sets a non-replaceable giv after issuing the new one. -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. +2002-07-17 Neil Booth -Thu Jan 10 17:19:12 CET 2002 Jan Hubicka + * 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. - * cfgcleanup.c (try_forward_edges): Properly initialize nthreaded_edges; - update edge probabilities to match. +2002-07-17 J"orn Rennecke -2002-01-10 Joseph S. Myers + * config/sh/lib1funcs.asm (udivsi3_i4): Implement SHcompact version in + SHmedia code. - * 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. + * 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. -Thu Jan 10 16:39:58 CET 2002 Jan Hubicka +2002-07-16 Hans-Peter Nilsson - * i386.md (sse_mov?fcc_const0_?): Fix constraints. + * config/cris/linux.h (CRIS_LINK_SUBTARGET_SPEC): Don't + --gc-sections if -r. + * config/cris/cris.h: Ditto. -Thu Jan 10 12:45:50 2002 Nicola Pero +2002-07-16 Rodney Brown - * doc/cpp.texi: Document the __OBJC__ preprocessor macro. + * 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. -Thu Jan 10 11:19:18 CET 2002 Jan Hubicka +2002-07-16 Nathanael Nerode - * optabs.c (expand_fix): Look for wider integer modes first. + * Makefile.in: Delete references to enquire. + * enquire.c: Move to contrib. - * 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-07-16 Stan Shebs -2002-01-10 Graham Stott + * 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. - * dwarf2out.c (indirect_string_alloc, output_indirect_string): - Move prototype into DWARF2_DEBUGGING_INFO conditional block. + * 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-01-10 Richard Henderson +2002-07-17 Jan Hubicka - * config/alpha/alpha.md (extendsidi2_fix): Penalize f/f alternative. + * m68hc11.c (m68hc11_reorg): Do not rebuild CFG. -2002-01-10 Richard Henderson +2002-07-17 Jan Hubicka - * regrename.c (find_oldest_value_reg): Fix typo in mode change check. - (copyprop_hardreg_forward_1): Likewise. Use mode_change_ok. + * i386.md (prefetch): Fix for 64bit mode. + (prefetch_sse_rex, prefetch_3dnow_rex): New patterns. -2002-01-10 Kazu Hirata +2002-07-17 Jan Hubicka - * combine.c (can_combine_p): Fix a comment typo. + * i386.h (MACHINE_DEPENDENT_REORG): New macro. + * i386.c (x86_machine_dependent_reorg): New function. + * i386-protos.h (x86_machine_dependent_reorg): Declare. -2002-01-09 Zack Weinberg +2002-07-16 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. + * 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. -2002-01-08 Aldy Hernandez + * 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. - * testuite/gcc.dg/altivec-4.c: Add test for mtvscr, dssall, - mfvscr, dss, lvsl, lvsr, dstt, dstst, dststt, dst. +2002-07-16 J"orn Rennecke - * 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. + * regrename.c (copy_value): Don't record high part copies. - * 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. +2002-07-16 Steve Ellcey - * config/rs6000/rs6000.h (rs6000_builtins): Add mtvscr, dssall, - mfvscr, dss, lvsl, lvsr, dstt, dstst, dststt, dst. + * 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-01-09 Richard Henderson +2002-07-16 Ian Dall - * config/alpha/alpha.md (prologue_mcount): Remove lituse_jsr reloc. + * doc/invoke.texi (NS32K Options): Document -mieee-compare option -2002-01-10 Hans-Peter Nilsson + * config/ns32k/ns32k.md (addsi3, *frame_addr, *stack_addr): merge + into addsi3 using register class "x" and "y". - * 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. + * config/ns32k/ns32k.md (*madddf, *maddsf, *msubdf, *msubsf): + "earlyclobber" constraint modifier for some alternative. -2002-01-09 Kazu Hirata + * 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. - * 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. + * 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-01-09 Kazu Hirata +2002-07-16 Steve Ellcey - * rtlanal.c (find_reg_fusage): Use XEXP instead of SET_DEST - to extract items in the expr_list chain. + * 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-01-09 Richard Henderson +2002-07-16 Jeroen Dobbelaere - * config/vax/vax.c (vax_rtx_cost): Never abort. + * arm.c (emit_sfm): Don't set RTX_FRAME_RELATED_P on DWARF. - * config/vax/vax.h (REAL_ARITHMETIC): Define. +2002-07-16 Jeroen Dobbelaere + Richard Earnshaw -2002-01-09 Jan Hubicka + * arm.h (LEGITIMATE_PIC_OPERAND_P): Only test + CONSTANT_POOL_ADDRESS_P if a SYMBOL_REF. Simplify logic. - * gcse.c (cprop_jump): Delete insn if simplified jump is no-op. +2002-07-16 Richard Earnshaw -2002-01-09 Richard Henderson + * 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. - * config/arm/arm.c (arm_gen_constant): Use trunc_int_for_mode. - Unify code from various alternatives. +2002-07-16 Daniel Berlin -2002-01-09 Richard Henderson + * 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. - * regrename.c (copy_value): Ignore the copy if the source register - is present in the value chain with a narrower mode. +2002-07-16 J"orn Rennecke -2002-01-09 Herman A.J. ten Brugge + * expr.c (emit_move_insn_1): Handle arbitrary moves that are + the same size as a word. - * real.c (c4xtoe, toc4x): Do some special conversion on long doubles - for the c4x target. Also improve layout. + * regrename.c (find_oldest_value_reg): Take WORDS_BIG_ENDIAN / + BYTES_BIG_ENDIAN into account. -2002-01-09 Richard Henderson +2002-07-16 Jan Hubicka - * 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. + * i386.md (prefetch): Fix for 64bit mode. + (prefetch_sse_rex, prefetch_3dnow_rex): New patterns. -2002-01-09 Richard Henderson + * 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 . - * regrename.c (find_oldest_value_reg): Use gen_rtx_raw_REG. - (copyprop_hardreg_forward_1): Likewise. +2002-07-15 Eric Botcazou -2002-01-09 John David Anglin + PR optimization/7153 + * regmove.c (optimize_reg_copy_3): Don't optimize if the register + dies in more than one insn. - * pa.md (decrement_and_branch_until_zero): Change predicate for - operand 0 from register_operand to reg_or_nonsymb_mem_operand. +2002-07-15 Jason Thorpe -2002-01-09 Bryce McKinlay + * config/sparc/netbsd-elf.h (TRANSFER_FROM_TRAMPOLINE): Remove. - * ginclude/stddef.h: Define _BSD_WCHAR_T_DEFINED_ if _BSD_WCHAR_T_ - gets undefined. For Darwin. +2002-07-15 Michael Matz , + Daniel Berlin , + Denis Chertykov -2002-01-09 Herman A.J. ten Brugge + Add a new register allocator. - * config/c4x/c4x.h: Use PUSH_ARGS and PUSH_ROUNDING for stack passing. + * 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. -2002-01-09 Michael Hayes + * 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. - * config/c4x/c4x/md: Remove extraneous constraints from define_splits. + * 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. -2002-01-08 Richard Henderson + * 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. - * regrename.c (copy_value): Ignore overlapping copies. + * 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. -2002-01-08 Richard Henderson + * gengtype.c (main): Add the pseudo-type "HARD_REG_SET". + * regclass.c (reg_scan_mark_refs): Ignore NULL rtx's. - * config/alpha/alpha.c (alpha_split_conditional_move): Call copy_rtx - as needed to avoid shared structure. + 2002-06-20 Michael Matz -2002-01-08 Kazu Hirata + * df.h (struct ref.id): Make unsigned. + * df.c (df_bb_reg_def_chain_create): Remove unsigned cast. - * config/h8300/h8300.c (get_shift_alg): Fix 15-bit LSHIFTRT on - H8/300H and H8/S. + 2002-06-13 Michael Matz -2002-01-08 Joseph S. Myers + * 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. - * 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-05-07 Michael Matz -2002-01-08 Ulrich Weigand + * reload1.c (fixup_abnormal_edges): Don't insert on NULL edge. - * 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. + 2002-05-03 Michael Matz - * config/s390/s390.c (s390_function_profiler): Fix thinko. + * sbitmap.c (sbitmap_difference): Accept sbitmaps of different size. - * 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. + Sat Feb 2 18:58:07 2002 Denis Chertykov -2002-01-08 Richard Henderson + * regclass.c (regclass): Work with all regs which have sets or + refs. + (reg_scan_mark_refs): Count regs inside (clobber ...). - * Makefile.in (toplev.o): Depend on options.h. - (gcc.o): Depend on specs.h. + 2002-01-04 Michael Matz -2002-01-08 Jakub Jelinek + * 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. - * expr.c (store_expr): Convert VOIDmode constants back to target's - mode. + * sbitmap.c (dump_sbitmap_file): New. + (debug_sbitmap): Use it. -2002-01-08 Gerald Pfeifer + * sbitmap.h (dump_sbitmap_file): Add prototype. - * 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. + 2001-08-07 Daniel Berlin -2002-01-08 Dale Johannesen + * df.c (df_insn_modify): Grow the UID table if necessary, rather + than assume all emits go through df_insns_modify. - * config/rs6000/rs6000.md: Add missing int register - target case to movdf_low. + 2001-07-26 Daniel Berlin -2002-01-08 Zack Weinberg + * 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. - * 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. + 2001-01-28 Daniel Berlin - * 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". + * sbitmap.h (EXECUTE_IF_SET_IN_SBITMAP_REV): New macro, needed for + dataflow analysis. - * 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-07-15 Jakub Jelinek -2002-01-08 Ulrich Weigand + 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. - * 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-07-14 Alan Modra -2002-01-08 Graham Stott + PR target/7282 + * config/rs6000/rs6000.md (floatsidf2): Enable for POWERPC64. + (floatunssidf2): Likewise. + (floatsidf_ppc64): New insn_and_split. + (floatunssidf_ppc64): Likewise. - * 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-07-14 Andreas Jaeger -2002-01-08 Joseph S. Myers + * config.gcc (sh64): Remove unused + target_requires_64bit_host_wide_int. - * gcc.c (option_map): Remove --version. - (process_command): Handle -fversion following the GNU Coding - Standards. Partially addresses PR other/704. +2002-07-12 Roger Sayle -2002-01-08 Graham Stott + * 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. - * combine.c (combine_instructions): Fix typo. + * doc/tm.texi: Document these two new target macros. -2002-01-08 Graham Stott +2002-07-12 Stephane Carrez - * debug.h: Use "tree" and "rtx" throughout. + * 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. - * debug.c: Likewise. +2002-07-12 Marek Michalkiewicz -2002-01-08 Nick Clifton + * 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. - * dbxout.c (dbxout_symbol_location): If a symbol ref is in the - constant pool, use the pool's version of the symbol instead. +2002-07-12 J"orn Rennecke -2002-01-07 Richard Henderson + * 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. - * 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-07-11 J"orn Rennecke -2002-01-07 Aldy Hernandez + * combine.c (try_combine): When converting a paradoxical subreg + to an extension, take LOAD_EXTEND_OP into account. - * config/rs6000/rs6000.c (bdesc_2arg): Add altivec predicates. - (altivec_init_builtins): New node v4si_ftype_v16qi_v16qi. +2002-07-11 Rainer Orth - * config/rs6000/rs6000.h (rs6000_builtins): Add enums for altivec - predicates. + * config.gcc (mips-sgi-irix6*o32): New configuration. - * config/rs6000/rs6000.md: Add altivec predicate patterns. + * configure.in (libgcc_visibility): Disable for mips-sgi-irix6*o32 + configurations. + * configure: Regenerate. -2002-01-07 John David Anglin + * config/mips/iris6-o32-as.h: New file. + * config/mips/iris6-o32.h: New file. - * 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. + * config/mips/iris5gas.h (TARGET_ASM_NAMED_SECTION): Define. + (NM_FLAGS): Define. + (HAVE_AS_SHF_MERGE): Undefine. -2002-01-07 Aldy Hernandez + * config/mips/t-iris5-as: New file. + * config.gcc (mips-sgi-irix6*o32, mips-sgi-irix5*): Use it. - * 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. + * 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. -2002-01-07 Richard Henderson + * config/mips/iris6.h: Remove duplicate comment. - * config/rs6000/xcoff.h (ASM_FILE_START): Reverted to profile_flag. + * 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. -2002-01-07 Jason Merrill + * config/mips/mips.h (ASM_DECLARE_FUNCTION_NAME): Fix comment. - * unwind-dw2.c (execute_cfa_program): Use < again. +2002-07-11 John David Anglin -2002-01-07 Jakub Jelinek + * 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. - * predict.c (combine_predictions_for_insn): Avoid division by zero. +2002-07-11 Roger Sayle -2002-01-07 Jakub Jelinek + * c-decl.c (duplicate_decls): Preserve the noreturn attribute on + non-ANSI builtin functions. - * simplify-rtx.c (simplify_plus_minus): Bump n_ops for NOT. - Don't allow -1 - x -> ~x simplifications in the first pass. +2002-07-11 J"orn Rennecke -2002-01-07 Aldy Hernandez + * 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. - * 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. +2002-07-11 John David Anglin - * rs6000.h (rs6000_builtins): Add vupk* enums. + * 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. - * rs6000.md: Add altivec_vupk* variants. +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. -2002-01-07 Joseph S. Myers + * configure: Regenerate. - * doc/gcc.texi, doc/gccint.texi, doc/cppinternals.texi, - doc/install.texi, doc/invoke.texi, doc/rtl.texi: Update copyright - and last update dates. + * gengtype-lex.l (parse_file): Make parameter const. -2002-01-07 Janis Johnson + * 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. - * doc/rtl.texi (Flags): Clean up documentation of RTL flags + * gengtype.h (parse_file): Amend prototype for const parameter. -2002-01-07 Marek Michalkiewicz + * doc/sourcebuild.texi: Document gtfiles variable. - * 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. + * doc/gty.texi: Document changes to gtfiles variable for front + ends. - * 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. + * objc/config-lang.in (gtfiles): Add files needed for objc front + end. - * diagnostic.h: Update copyright date. - (output_buffer_state): Add parenthesis. - (output_buffer_format_args): Likewise. +2002-07-10 Roger Sayle - * combine.c (combine_instructions): Replace XEXP (links, 0) - with link. + PR c/2454 + * combine.c (nonzero_bits): LOAD_EXTEND_OP should only apply + to SUBREGs of MEMs. (num_sign_bit_copies): Likewise. -2002-01-06 H.J. Lu +2002-07-10 Roger Sayle + Zack Weinberg - * cfgcleanup.c (thread_jump): Fix 2 typos. + * builtins.def: Make the argument types of abort and exit + independent of the front-end. -2002-01-06 Aldy Hernandez +2002-07-11 Alan Modra - * config.gcc: Add support for --enable-altivec. + * config/rs6000/linux64.h (ASM_SPEC): Define. -2002-01-06 Craig Rodrigues +2002-07-10 Aldy Hernandez - * emit-rtl.c (gen_highpart): Add check for NULL_RTX. + * 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-01-06 Jakub Jelinek +2002-07-10 Toon Moene - * objc/objc-act.c (handle_impent): Use assemble_variable to emit - __objc_class_name_*. + 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-01-06 Craig Rodrigues +2002-07-10 Marek Michalkiewicz - * doc/install.texi (sparcv9-*-solaris2*): Add documentation. + * config/avr/avr.md: Fix two 0x80000000 constants to make them + negative also on 64-bit hosts. -2002-01-06 Richard Henderson + 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. - * 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. + 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-01-05 Richard Henderson +2002-07-10 Douglas B Rupp - * cfgcleanup.c (try_forward_edges): Detect infinite loops while - jump threading. + * config/i386/i386.c (ix86_svr3_asm_out_constructor): Add + HAS_INIT_SECTION to protection. -2002-01-05 Richard Henderson +2002-07-10 Mark Mitchell - * 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. + * doc/invoke.texi (Debugging Options): Mention that -gdwarf is + deprecated. -2002-01-05 Kazu Hirata +2002-07-10 J"orn Rennecke - * 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. + * combine.c (gen_lowpart_for_combine): Handle vector modes. + Supply non-VOID mode to simplify_gen_subreg. -2002-01-05 Kazu Hirata +2002-07-10 Jan Hubicka - * combine.c: Fix formatting. + * i386.c (ix86_init_mmx_sse_builtins): Fix thinko. -2002-01-05 Craig Rodrigues +2002-07-10 Jeffrey A Law - PR middle-end/1557 - * config/ia64/ia64.h (RENAME_EXTENDED_BLOCKS): Remove. + * mn10200.c (expand_prologue): Create REG_MAYBE_DEAD notes + as appropriate. -2002-01-05 David Edelsohn + * 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. - * config/rs6000/rs6000.h (TARGET_POWERPC): For IN_LIBGCC2, define - as 1 for __powerpc64__ as well. +2002-07-05 Stephane Carrez - * config/rs6000/t-aix43 (T_ADAFLAGS): Define. + * 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). - * alias.c (find_base_value, PLUS/MINUS): If we found a base, - return it. +2002-07-05 Stephane Carrez -2002-01-05 Daniel Berlin + * config/m68hc11/m68hc11.md ("*ashlsi3"): Avoid saving y if we know + it is dead. + ("*ashrsi3"): Likewise. + ("*lshrsi3"): Likewise. - * lcm.c: Revert change, due to performance regression it causes on - SPEC because it's slightly more conservative (sigh, I hate - edge-based LCM). +2002-07-05 Vladimir Makarov -Sat Jan 5 11:52:05 CET 2002 Jan Hubicka + * genautomata.c (output_max_insn_queue_index_def): Take latencies + into account. - * cfgcleanup.c (try_forward_edges): Allow multiple jump threading. +2002-07-05 Stephane Carrez -2002-01-05 Neil Booth + * config/m68hc11/m68hc11.md (peephole2): New peephole2 to optimize + address computation and memory moves. - * doc/cppinternals.texi: Update. +2002-07-03 Mark Mitchell -2002-01-05 Hans-Peter Nilsson + PR c++/6706 + * dwarfout.c (output_reg_number): Fix warning message. + (output_bound_representation): Check SAVE_EXPR_RTL is not NULL + before using it. - * 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. +2002-07-05 Rainer Orth -Sat Jan 5 02:20:22 CET 2002 Jan Hubicka + * gcc/gcc.c (asm_debug): Move initialization ... + (init_spec): ... here. - * cfgcleanup.c (thread_jump): Fix handling of reversed branches. +2002-07-05 Nathan Sidwell -Sat Jan 5 01:35:29 CET 2002 Jan Hubicka + * c-parse.in (extdef): Append ';'. + (old_style_parm_decls): Append ';'. - * cfgcleanup.c: Include tm_p.h - (mark_effect): Fix handling of hard register; fix handling of SET +2002-07-04 Daniel Jacobowitz -2002-01-04 Kazu Hirata + * 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. - * config/h8300/h8300.md (anonymous patterns): Check that - operands are registers before using REGNO on them. +2002-07-04 Geoffrey Keating -2002-01-03 Roland McGrath + * ggc.h (ggc_add_root): Document as obsolete. - * doc/invoke.texi (RS/6000 and PowerPC Options): Add -mcall-gnu. +2002-07-04 J"orn Rennecke -2002-01-04 Jakub Jelinek + * sh.md (mshfhi_b, mshflo_b, mshfhi_l, mshflo_l, mshfhi_w): Add DONE. + (mshflo_w): Likewise. - * 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. +2002-07-04 J"orn Rennecke -Fri Jan 4 11:45:05 2002 Jeffrey A Law (law@redhat.com) + * 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. - * 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-07-03 Eric Christopher -2002-01-04 William Cohen + * 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. - * 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-07-03 Stan Shebs -2002-01-04 Daniel Berlin + * config/darwin.h (APPLE_CC): Remove, not meaningful in FSF GCC. + (STRINGIFY_THIS, REALLY_STRINGIFY): Remove. + (CPP_SPEC): Remove insertion of APPLE_CC definition. - * 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-07-03 Roger Sayle -2002-01-03 Richard Henderson + * 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. - * local-alloc.c (function_invariant_p): Update commentary. + (make_extraction): Add cast to avoid compilation warning. + (force_to_mode): Remove cast to avoid compilation warning. -2002-01-04 H.J. Lu +2002-07-03 Eric Botcazou + Jeff Law - * toplev.c (rest_of_compilation): Fix a typo when calling - cleanup_cfg. + * 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-01-03 Kazu Hirata +2002-07-03 David Edelsohn - * c-common.c: Fix formatting. - * diagnostic.c: Likewise. - * doloop.c: Likewise. - * dwarf2out.c: Likewise. + * 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-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 +2002-07-03 Will Cohen + + * config/i386/i386.c (x86_integer_DFmode_moves): Disable for PPro. + +2002-07-03 J"orn Rennecke - * builtins.c: Fix formatting. - * c-typeck.c: Likewise. - * combine.c: Likewise. - * expr.c: Likewise. - * loop.c: Likewise. + * 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. -2002-01-03 Andreas Schwab + * 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. - * 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-07-02 Kaveh R. Ghazi -2002-01-03 Graham Stott + * 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. - * loop.h: Update copyright date. - (LOOP_MOVABLES): Fix typo. - (LOOP_REGS): Likewise. - (LOOP_IVS): Likewise. + * doc/invoke.texi (-Wtraditional): Document new behavior. -2002-01-03 Graham Stott +2002-07-02 Chris Demetriou - * cppinit.c: Update copyright date. - Don't include output.h - * Makefile.in: Update copyright date. - Update dependency. + * config.gcc (mips*el-*-*): Use tm_defines to set + TARGET_ENDIAN_DEFAULT, rather than including mips/little.h. + * config/mips/little.h: Remove. -2002-01-02 Craig Rodrigues +2002-07-02 Devang Patel - PR c/5226 - * invoke.texi (-mthreads): Remove from documented RS/6000 options. - (-pthread) Add to RS/6000 options. + * 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-01-02 Kazu Hirata +2002-07-03 Neil Booth - * except.c: Fix comment typos. - * loop.c: Likewise. - * varasm.c: Likewise. - * doc/tm.texi: Fix a typo. + * cpptrad.c: Update comment. -2002-01-02 Jakub Jelinek +2002-07-02 Neil Booth - * c-typeck.c (output_init_element): Allow initializing static storage - duration objects with compound literals. + * doc/cpp.texi: Update for traditional preprocessing changes. + * goc/cppopts.texi: Similarly. -2002-01-02 Richard Henderson +2002-07-02 Ziemowit Laski - * objc/objc-act.c (hack_method_prototype): Clear current_function_decl - after abusing it. + * 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-01-02 Kaveh R. Ghazi +2002-07-02 J"orn Rennecke - * 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 + * 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. - * 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-07-02 Neil Booth -2002-01-02 Joseph S. Myers + PR preprocessor/7029 + * cppinit.c (cpp_handle_option): Suppress warnings with an + implicit "-w" for "-M" and "-MM". + * doc/cppopts.texi: Update. - * 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-07-01 Roger Sayle -2002-01-02 David Edelsohn + * config/sh/sh.c (sh_media_init_builtins): Change use of poisoned + identifier "bzero" to "memset". Pass extra NULL_TREE argument to + builtin_function. - * config/rs6000/t-aix43: Revert previous change. +2002-07-02 Alan Modra + + * README.Portability: Fix typos. + +2002-07-01 Hans-Peter Nilsson -2002-01-02 Jason Merrill + PR target/7177 + * config/cris/cris.h (LEGITIMIZE_RELOAD_ADDRESS): Correct number + of indirections for register inside sign-extended mem part. - * c-decl.c (c_expand_body): Call outlining_inline_function when - emitting an inline function out of line. +2002-07-01 Roger Sayle -2002-01-02 Richard Henderson + * tree.h: Modify builtin_function interface to take an extra + argument ATTRS, which is a tree representing an attribute list. - * 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. + * 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. -2002-01-02 Nathan Sidwell + * 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. - PR c++/5089 - * doc/invoke.texi (-Wold-style-cast): Only warn about non-void casts. + * 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-01-02 Kazu Hirata +2002-07-01 Zack Weinberg - * config/h8300/fixunssfsi.c: Update copyright. - Fix comment typos. - Fix formatting. - * config/h8300/h8300.c: Update copyright. - Eliminate warnings. + * config/ip2k/t-ip2k: Remove LIBGCC1, CROSS_LIBGCC1, and LIBGCC1_TEST. + * config/mips/t-isa3264: Likewise. + * config/mmix/t-mmix: Likewise. -2002-01-02 Kazu Hirata +2002-07-01 John David Anglin - * 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. + * emit-rtl.c (init_emit_once): Add missing cast to HOST_WIDE_INT. -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. +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 --git a/contrib/gcc/ChangeLog.0 b/contrib/gcc/ChangeLog.0 index 5cd3fdb..4ed0652 100644 --- a/contrib/gcc/ChangeLog.0 +++ b/contrib/gcc/ChangeLog.0 @@ -2670,7 +2670,7 @@ Thu Jun 4 01:26:57 1998 Craig Burley Thu Jun 4 00:54:21 1998 Graham - * loop.c (check_dbra_loop): Initialise final_value before + * loop.c (check_dbra_loop): Initialize final_value before normalizing the loop. Wed Jun 3 20:00:04 1998 J"orn Rennecke @@ -4435,7 +4435,7 @@ Sun May 3 23:57:25 1998 Robert Lipe Sun May 3 13:51:34 1998 Richard Henderson - Support for official Sparc V9 ABI: + 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 @@ -6574,8 +6574,8 @@ Wed Mar 11 12:05:20 1998 Teemu Torma * 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 + (__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. @@ -10440,7 +10440,7 @@ Tue Nov 4 20:36:50 1997 Richard Henderson (rth@cygnus.com) * alpha.c (alpha_handle_trap_shadows): Init sum.defd to zero. - * alpha.md (attr trap): Make TRAP_YES non-zero for sanity's sake. + * 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) @@ -12000,7 +12000,7 @@ Wed Sep 10 11:49:20 1997 Jason Merrill 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. + (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 --git a/contrib/gcc/ChangeLog.1 b/contrib/gcc/ChangeLog.1 index 0530536..ef67034 100644 --- a/contrib/gcc/ChangeLog.1 +++ b/contrib/gcc/ChangeLog.1 @@ -469,7 +469,7 @@ Sun May 2 15:16:42 1999 Joseph S. Myers (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_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. @@ -1732,7 +1732,7 @@ Fri Apr 9 10:40:10 1999 Kaveh R. Ghazi 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. + 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 @@ -2152,7 +2152,7 @@ Fri Apr 2 12:58:26 1999 Michael Hayes Fri Apr 2 12:19:17 1999 Michael Hayes * config/c4x/c4x.md (*db): Enable pattern if TARGET_LOOP_UNSIGNED - is non-zero. + is nonzero. (movstrqi_small, movstrqi_large, *cmpstrqi): Add + modifier to address register constraints. (*movhi_clobber+1): Modify splitter pattern to handle destination @@ -2625,7 +2625,7 @@ Tue Mar 23 23:32:14 1999 Jeffrey A Law (law@cygnus.com) 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 + * expr.c (expand_assignment): Do not try to optimize an aggregate address which has VOIDmode. Tue Mar 23 22:51:48 1999 Mumit Khan @@ -4287,7 +4287,7 @@ Thu Feb 25 21:52:54 1999 J"orn Rennecke in registers. * expr.h (PRETEND_OUTGOING_VARARGS_NAMED): Provide default definition. - * function.c (assign_parms): Honour PRETEND_OUTGOING_VARARGS_NAMED. + * 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 / @@ -4454,7 +4454,7 @@ Mon Feb 22 19:36:33 1999 Andrew Cagney StrongARM. (arm_is_6_or_7): New variable: true iff the target processor is an ARM6 or and ARM7. - (arm_select): Fields reorganised. + (arm_select): Fields reorganized. (struct processors): processor_type field removed. (all_procs): Remove. (all_cores): New array: Definitions of all known ARM cpu cores. @@ -5184,10 +5184,10 @@ Mon Feb 8 21:31:06 1999 Richard Henderson (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. + (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 non-zero. + as a parameter. Assume nonzero. 1999-02-08 Zack Weinberg @@ -7018,7 +7018,7 @@ Thu Jan 7 03:08:17 1999 Richard Henderson Thu Jan 7 03:03:42 1999 Stan Cox Richard Henderson - Support for Hypersparc and Sparclite86x: + 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. @@ -10282,7 +10282,7 @@ Wed Oct 28 16:46:07 1998 Andreas Schwab 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. + if pending_types is nonzero. (dwarfout_finish): Verify pending_types is zero before finishing. Wed Oct 28 10:29:09 1998 Nick Clifton @@ -11967,7 +11967,7 @@ Fri Oct 9 14:26:44 1998 Jeffrey A Law (law@cygnus.com) Fri Oct 9 11:44:47 1998 David Edelsohn - * loop.c (insert_bct): Ensure loop_iteration_var non-zero before use. + * loop.c (insert_bct): Ensure loop_iteration_var nonzero before use. Thu Oct 8 21:59:47 1998 Dave Brolley @@ -13059,7 +13059,7 @@ Sat Sep 19 12:05:09 1998 Richard Henderson 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. + 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. @@ -13371,7 +13371,7 @@ Sun Sep 13 08:13:39 1998 Ben Elliston 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 + the Objective-C header files. The Makefile for the runtime library will do this. * objc/Makefile.in (all.indirect): Only build the front-end. @@ -15068,7 +15068,7 @@ Mon Aug 10 19:02:55 1998 John Carr Mon Aug 10 04:28:13 1998 David S. Miller Richard Henderson - Rewrite Sparc backend for better code generation and + Rewrite SPARC backend for better code generation and improved sparc64 support. * config/sparc/sp64-elf.h: Set JUMP_TABLES_IN_TEXT_SECTION to zero. @@ -15155,7 +15155,7 @@ Mon Aug 10 04:28:13 1998 David S. Miller (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. + 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 @@ -15570,7 +15570,7 @@ Mon Jul 27 14:22:36 1998 Dave Brolley Mon Jul 27 11:43:54 1998 Stan Cox - * longlong.h (count_leading_zeros): Sparclite scan instruction was + * longlong.h (count_leading_zeros): SPARClite scan instruction was being invoked incorrectly. * i386.c (ix86_prologue): Added SUBTARGET_PROLOGUE invocation. diff --git a/contrib/gcc/ChangeLog.2 b/contrib/gcc/ChangeLog.2 index e49d764..a7cff36 100644 --- a/contrib/gcc/ChangeLog.2 +++ b/contrib/gcc/ChangeLog.2 @@ -262,7 +262,7 @@ Fri Dec 24 12:34:26 1999 Richard Kenner Thu Dec 23 23:15:22 1999 J"orn Rennecke - * reload1.c (emit_input_reload_insns): Restore old behaviour + * reload1.c (emit_input_reload_insns): Restore old behavior wrt. 'special' reloads. 1999-12-23 Zack Weinberg @@ -1531,7 +1531,7 @@ Thu Dec 2 18:59:48 1999 J"orn Rennecke 1999-12-02 Nick Clifton - * config/fp-bit.c: Initialise all fields of the NAN + * config/fp-bit.c: Initialize all fields of the NAN constants. * c-lex.c (check_newline): Pass pragma_getc and pragma_ungetc @@ -2434,10 +2434,10 @@ Thu Nov 18 11:10:03 1999 Jan Hubicka 1999-11-18 Nick Clifton - * toplev.c (main): Correctly detect an unrecognised option. + * 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 recognised. + a -f option if it has not been recognized. Thu Nov 18 00:59:11 1999 Michael Gschwind @@ -3184,13 +3184,13 @@ Wed Nov 3 15:11:27 1999 David S. Miller * 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. + 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. + 3 on UltraSPARC. * config/sparc/sparc.c (ultra_schedule_insn): Insert launched insn into ready list, do not use just a raw swap. @@ -3567,7 +3567,7 @@ Sat Oct 30 14:31:48 1999 Richard Henderson (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. + (ggc_alloc_obj): Poison nonzeroed memory. Sat Oct 30 14:28:52 1999 Mark Mitchell @@ -4002,7 +4002,7 @@ Mon Oct 18 21:16:06 1999 Fred Fish Thu Oct 28 10:00:48 1999 Nick Clifton - * config/arm/arm.c: Initialise arm_structure_size_boundary to + * 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. @@ -4782,7 +4782,7 @@ Tue Oct 19 15:26:11 1999 Richard Earnshaw (rearnsha@arm.com) 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 + unrecognized command line switch is recognisable by another language. If extra_warnings are enabled, then generate a warning message instead. @@ -4960,7 +4960,7 @@ Sat Oct 16 13:42:29 1999 Michael Hayes Sat Oct 16 13:37:46 1999 Michael Hayes - * config/c4x/c4x.md (movstrqi_small): Utilise parallel move + * config/c4x/c4x.md (movstrqi_small): Utilize parallel move instructions. Sat Oct 16 13:26:47 1999 Michael Hayes @@ -6509,15 +6509,15 @@ Sat Sep 25 09:03:17 1999 Kaveh R. Ghazi 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 + the assembler statements necessary to declare an uninitialized variable. - (ASM_EMIT_LOCAL): New macro: Emit a local, uninitialised + (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 - uninitialised variable. + uninitialized variable. Fri Sep 24 17:10:56 1999 Nick Clifton @@ -8316,7 +8316,7 @@ Thu Sep 9 13:46:06 1999 Geoffrey Keating * 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, + * 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. @@ -8325,7 +8325,7 @@ Thu Sep 9 13:46:06 1999 Geoffrey Keating * 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, + (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. @@ -9759,7 +9759,7 @@ Sun Aug 29 04:30:52 1999 John Wehle (john@feith.com) All uses updated. (prescan_loop, strength_reduce): New argument loop_info. All callers updated. - (scan_loop): New variable loop_info, initialise to address of + (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 @@ -14093,7 +14093,7 @@ Wed Jun 2 12:25:55 1999 Richard Henderson Wed Jun 2 08:42:55 1999 Nick Clifton - * config/arm/tcoff.h (USER_LABEL_PREFIX): Synchronise with + * 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 --git a/contrib/gcc/ChangeLog.3 b/contrib/gcc/ChangeLog.3 index c3a4461..067d9ad 100644 --- a/contrib/gcc/ChangeLog.3 +++ b/contrib/gcc/ChangeLog.3 @@ -1353,7 +1353,7 @@ Wed Jun 7 20:34:33 2000 Denis Chertykov * 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++. + 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. @@ -1538,7 +1538,7 @@ Mon Jun 5 06:46:28 2000 Richard Kenner 2000-06-04 Kaveh R. Ghazi - * Makefile.in (intl.*): Honor non-zero exit codes in the intl + * Makefile.in (intl.*): Honor nonzero exit codes in the intl subdir. 2000-06-03 Geoff Keating @@ -2036,7 +2036,7 @@ Sun May 28 18:37:07 2000 Clinton Popetz Sun May 28 23:26:59 2000 Philippe De Muyter - * mklibgcc.in (all): Variable initialised to `libgcc'. + * mklibgcc.in (all): Variable initialized to `libgcc'. 2000-05-28 Gabriel Dos Reis @@ -2088,10 +2088,10 @@ Sun May 28 23:26:59 2000 Philippe De Muyter * 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. + (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): Initialise and free reg_changes_size. If a register + (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. @@ -2161,7 +2161,7 @@ Sun May 28 23:26:59 2000 Philippe De Muyter * reload.c (get_secondary_mem): Don't widen floating-point modes. - * combine.c (subst): Honour CLASS_CANNOT_CHANGE_SIZE when + * combine.c (subst): Honor CLASS_CANNOT_CHANGE_SIZE when substituting the REG in a (subreg:X (reg:Y ...)). 2000-05-28 Neil Booth @@ -2174,7 +2174,7 @@ Sun May 28 23:26:59 2000 Philippe De Muyter 2000-05-28 Neil Booth - * cpplex.c (_cpp_init_toklist): No comment space to initialise. + * 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 @@ -2340,7 +2340,7 @@ Sat May 27 11:01:27 2000 Richard Kenner 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. + 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. @@ -3133,7 +3133,7 @@ Fri May 19 06:49:35 2000 Richard Kenner 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 + 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. @@ -3225,7 +3225,7 @@ Thu May 18 12:10:18 2000 Philippe De Muyter 2000-05-18 Neil Booth - * cppinit.c (cpp_reader_init): Initialise col_adjust and + * 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. @@ -7957,7 +7957,7 @@ Wed Apr 5 18:03:31 2000 Toshiyasu Morita (toshi.morita@sega.com) 2000-04-05 Chris Demetriou * mips.h (MASK_DEBUG_A, MASK_DEBUG_B, MASK_DEBUG_C): Zero the - remaining non-zero debugging masks. + remaining nonzero debugging masks. Wed Apr 5 09:44:07 2000 Jeffrey A Law (law@cygnus.com) @@ -10256,7 +10256,7 @@ Thu Mar 16 02:14:16 2000 Hans-Peter Nilsson 2000-02-03 Geoff Keating * rs6000.c (rs6000_sr_alias_set): New variable. - (rs6000_override_options): Initialise rs6000_sr_alias_set. + (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. @@ -10804,8 +10804,8 @@ Wed Feb 23 13:00:06 CET 2000 Jan Hubicka 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 + 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 @@ -15005,7 +15005,7 @@ Mon Jan 24 16:50:08 MET 2000 Jan Hubicka * 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_loop_level_compute): Initialize level to 1. (flow_loops_find): Set loops->levels. (flow_loops_dump): Print loops->levels. @@ -15047,7 +15047,7 @@ Mon Jan 24 16:50:08 MET 2000 Jan Hubicka 2000-01-22 Alan Modra - * config/elfos.h (UNIQUE_SECTION): Restore uninitialised data + * 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. @@ -15242,7 +15242,7 @@ Wed Jan 19 19:12:36 2000 J"orn Rennecke * 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. + and initialize to zero. (scan_loop): Set current_loop_info. * unroll.c (loop_iterations): Don't abort if REG_USERVAR_P set @@ -15281,7 +15281,7 @@ Wed Jan 19 19:12:36 2000 J"orn Rennecke (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 + (rest_of_compilation): Don't set it. Kill stupid in favor of flow1, local-alloc, and reload. (main): Don't set obey_regdecls. @@ -16500,25 +16500,25 @@ Thu Jan 6 13:44:59 CET 2000 Jan Hubicka uninitialized data decls. * config/i386/winnt.c (i386_pe_unique_section): Cope with - being called for uninitialised data. + being called for uninitialized data. * config/i386/interix.c (i386_pe_unique_section): Cope with - being called for uninitialised data. + being called for uninitialized data. * config/mips/elf.h (UNIQUE_SECTION): Cope with being called - for uninitialised data. + for uninitialized data. * config/mips/elf64.h (UNIQUE_SECTION): Cope with being called - for uninitialised data. + for uninitialized data. * config/mips/iri6gld.h (UNIQUE_SECTION): Cope with being called - for uninitialised data. + 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 - uninitialised data. + uninitialized data. (ASM_OUTPUT_ALIGNED_BSS): Redefine to use named_section(). (ASM_OUTPUT_ALIGNED_DECL_LOCAL): Redefine to use named_section(). @@ -16611,7 +16611,7 @@ Tue Jan 4 22:30:16 2000 Jeffrey A Law (law@cygnus.com) 2000-01-05 Michael Hayes - * config/c4x/c4x.h (IS_XXX_REG, IS_XXX_REGNO): Swap behaviour of + * 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 --git a/contrib/gcc/ChangeLog.4 b/contrib/gcc/ChangeLog.4 index 129c1f9..ac0f7e0 100644 --- a/contrib/gcc/ChangeLog.4 +++ b/contrib/gcc/ChangeLog.4 @@ -142,7 +142,7 @@ * c-parse.in (select_or_iter_stmt): Use truthvalue_conversion on the condition of a FOR statement, so that it gets typechecked - and optimised. + and optimized. 2000-12-29 Alexandre Oliva @@ -300,7 +300,7 @@ scavenging it. * dwarf2out_frame_debug_expr: Allow the (scratch) frame - pointer to be initialised from the stack pointer plus a + pointer to be initialized from the stack pointer plus a constant. 2000-12-22 Bernd Schmidt @@ -355,7 +355,7 @@ * reload.c (update_auto_inc_notes): New, broken out from ... (find_reloads_address_1): ... use here, also correct possible - use of uninitialised reloadnum. + use of uninitialized reloadnum. 2000-12-21 David O'Brien @@ -1235,7 +1235,7 @@ Mon Dec 11 13:51:09 2000 Jeffrey A Law (law@cygnus.com) 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 + (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. @@ -2120,7 +2120,7 @@ Tue Dec 5 20:09:14 2000 Jeffrey A Law (law@cygnus.com) (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 + Try to optimize memset with second argument nonzero using store_by_pieces. 2000-11-30 Marek Michalkiewicz @@ -2923,9 +2923,9 @@ Sun Nov 26 10:02:37 2000 Richard Kenner (cxx_target_objs): Substitute in the makefile. * configure: Regenerate. - * Makefile.in (C_TARGET_OBJS): Define and initialise from + * Makefile.in (C_TARGET_OBJS): Define and initialize from c_target_objs. - (CXX_TARGET_OBJS): Define and initialise from + (CXX_TARGET_OBJS): Define and initialize from cxx_target_objs. (C_AND_OBJC_OBJS): Include C_TARGET_OBJS. @@ -3046,7 +3046,7 @@ Fri Nov 24 19:48:09 2000 J"orn Rennecke 2000-11-23 Graham Stott - * cse.c (cse_insn): Initialise all regcost variables. + * cse.c (cse_insn): Initialize all regcost variables. Fix a typo add missing '='. Only compare costs if there is a replacement insn. @@ -3247,7 +3247,7 @@ Wed Nov 22 00:52:55 2000 J"orn Rennecke 2000-11-21 Jakub Jelinek - * configure.in (HAVE_AS_DWARF2_DEBUG_LINE): Sparc has .file/.loc + * configure.in (HAVE_AS_DWARF2_DEBUG_LINE): SPARC has .file/.loc support in as as well. * configure: Regenerate. @@ -3811,7 +3811,7 @@ Tue Nov 14 12:34:56 2000 Richard Kenner 2000-11-14 Jakub Jelinek - * reload1.c (emit_input_reload_insns): Honour forcing of constants + * reload1.c (emit_input_reload_insns): Honor forcing of constants into memory by PREFERRED_RELOAD_CLASS NO_REGS. 2000-11-14 Michael Matz @@ -5216,13 +5216,13 @@ Tue Oct 31 15:33:27 2000 J"orn Rennecke hash table. * cppinit.c (cpp_reader_init): Move cpp_init_completed test to top. - Initialise various members of cpp_reader, memory pools, and the + 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 initialise a + (cpp_start_read, cpp_finish): Don't take or initialize a printer. Update. * cpplib.h (cpp_printer, cpp_toklist, CPP_DEFINED, BOL, @@ -7147,7 +7147,7 @@ Fri Sep 29 13:20:42 MET DST 2000 Jan Hubicka error" tests. * cppinit.c (cpp_handle_option): Remove surplus \n. * cpplex.c (ON_REST_ARG): Delete. - (skip_block_comment): Initialise prevc. + (skip_block_comment): Initialize prevc. (parse_args): Improve error messages. (maybe_paste_with_next): Use CONTEXT_VARARGS rather than ON_REST_ARG. @@ -8018,14 +8018,14 @@ Mon 18-Sep-2000 19:21:35 BST Neil Booth * 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 + (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 behaviour of the lexer. + 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 @@ -8101,7 +8101,7 @@ Mon 18-Sep-2000 19:21:35 BST Neil Booth 2000-09-18 Joseph S. Myers - * c-common.c (check_format_types): Reorganise and clean up, + * 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. @@ -8547,9 +8547,9 @@ Fri 15-Sep-2000 06:49:07 BST Neil Booth * 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. + 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 @@ -9445,7 +9445,7 @@ Thu 07-Sep-2000 21:29:00 BST Neil Booth 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 + 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. @@ -11108,7 +11108,7 @@ Sun 20-Aug-2000 09:25:45 BST Neil Booth 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. + 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 @@ -11556,7 +11556,7 @@ Mon Aug 14 18:51:44 2000 J"orn Rennecke rather than DECL_OFFSET_ALIGN. (place_field): Likewise. * expmed.c (store_bit_field): Abort on align==0 to avoid - antisocial machine behaviour. + antisocial machine behavior. 2000-08-12 Richard Henderson @@ -12487,7 +12487,7 @@ Thu Aug 3 15:53:03 2000 J"orn Rennecke 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. + * h8300.h (OK_FOR_U): Accept a 32-bit constant address on H8S. * jump.c: Fix formatting. @@ -12911,7 +12911,7 @@ Mon Jul 31 20:35:50 2000 Denis Chertykov * 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. + on H8/300H and H8S. * h8300.c (split_adds_subs): Rearrange code for conciseness. @@ -13799,7 +13799,7 @@ Wed Jul 19 01:22:15 CEST 2000 Marc Espie 2000-07-18 Jakub Jelinek - * calls.c (store_arg): Return non-zero if sibcall_failure is desired. + * calls.c (store_arg): Return nonzero if sibcall_failure is desired. (expand_call): Adjust caller. 2000-07-17 Gabriel Dos Reis @@ -14169,7 +14169,7 @@ Fri Jul 14 10:25:53 2000 Clinton Popetz * 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. + honor digraphs. 2000-07-13 Zack Weinberg @@ -14482,7 +14482,7 @@ Tue Jul 11 16:26:17 2000 Clinton Popetz (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 + * cpplex.c: (lex_line, can_paste): Honor digraphs in accordance with the digraphs flag. * cpplib.h: (struct cpp_options): New option digraphs. diff --git a/contrib/gcc/ChangeLog.5 b/contrib/gcc/ChangeLog.5 index 40eccd1..9bd21c1 100644 --- a/contrib/gcc/ChangeLog.5 +++ b/contrib/gcc/ChangeLog.5 @@ -24,7 +24,7 @@ * 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. + * doc/invoke.texi: Document changed behavior of -B. 2001-06-29 DJ Delorie @@ -77,7 +77,7 @@ Fri Jun 29 12:27:24 2001 Jeffrey A Law (law@cygnus.com) * 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. + 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, @@ -1070,7 +1070,7 @@ Mon Jun 18 15:43:10 CEST 2001 Jan Hubicka 2001-06-18 Ben Elliston - * except.c (resolve_fixup_regions): Initialise "cleanup". + * except.c (resolve_fixup_regions): Initialize "cleanup". 2001-06-17 Neil Booth @@ -1131,7 +1131,7 @@ Fri Jun 15 18:05:22 2001 Richard Kenner Fri Jun 15 19:35:38 CEST 2001 Jan Hubicka - * optabs.c (expand_twoval_binop): Avoid undefined behaviour. + * optabs.c (expand_twoval_binop): Avoid undefined behavior. 2001-06-15 Rainer Orth @@ -2885,7 +2885,7 @@ Thu May 24 15:56:48 CEST 2001 Jan Hubicka 2001-05-22 Richard Henderson - * unwind-dw2-fde.c (__deregister_frame_info): Stubbify in favour of... + * 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. @@ -2903,7 +2903,7 @@ Thu May 24 15:56:48 CEST 2001 Jan Hubicka * 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. + "r2" to the assembly file. Only issue allocs with nonzero parameters. 2001-05-22 Loren J. Rittle David O'Brien @@ -4498,7 +4498,7 @@ Fri May 4 13:10:03 CEST 2001 Jan Hubicka (ix86_align_loops): Delete. (ix86_align_jumps): Delete. (override_options): Mark -malign-* as obsolete. Emulate their - behaviour with the -falign-* options. Default -falign-* from + 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. @@ -5194,7 +5194,7 @@ Wed Apr 25 17:09:50 2001 J"orn Rennecke 2001-04-25 Jakub Jelinek * emit-rtl.c (subreg_hard_regno): Only do HARD_REGNO_MODE_OK check - if check_mode is non-zero. + if check_mode is nonzero. 2001-04-25 Jakub Jelinek @@ -10795,7 +10795,7 @@ Fri Feb 9 15:05:27 2001 Christopher Faylor * config/i386/i386.c (ix86_frame_pointer_required): New. (ix86_setup_frame_addresses): New. - (struct machine_funciton): Add accesses_prev_frame. + (struct machine_function): Add accesses_prev_frame. * config/i386/i386.h (FRAME_POINTER_REQUIRED): Call ix86_frame_pointer_required. (SUBTARGET_FRAME_POINTER_REQUIRED): New. @@ -11536,7 +11536,7 @@ Mon Jan 29 20:38:19 2001 Christopher Faylor 2001-01-27 Michael Sokolov - * fixproto: Correctly install synthesised unistd.h and stdlib.h when + * fixproto: Correctly install synthesized unistd.h and stdlib.h when they didn't need fixing. 2001-01-27 Janis Johnson @@ -11558,7 +11558,7 @@ Mon Jan 29 20:38:19 2001 Christopher Faylor (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 + (pop_init_level): abort if constructor_range_stack is nonzero at explicit closing brace. Restore saved constructor_range_stack if not implicit. @@ -11587,10 +11587,10 @@ Mon Jan 29 20:38:19 2001 Christopher Faylor * loop.c (loop_giv_reduce_benefit): Copy mode size into int variable. - (check_ext_dependant_givs): Initialise u_start_val and + (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 initialise set. + (try_swap_copy_prop): Use INSN_P and initialize set. Fri Jan 26 23:22:58 2001 Denis Chertykov @@ -11700,7 +11700,7 @@ Wed Jan 24 23:51:55 2001 J"orn Rennecke * 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. + * cpp.texi (-M, -MM): Document -M -include behavior. 2001-01-24 Roger Collins @@ -11922,7 +11922,7 @@ Sun Jan 21 09:44:17 2001 Denis Chertykov * 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. + (encode_section_info): Optimize if/else. (avr_function_value): Fix formatting. * config/avr/avr.md (branch): Call to ret_cond_branch changed. @@ -12652,7 +12652,7 @@ Sat Jan 13 09:53:32 MET 2001 Jan Hubicka (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 + 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. @@ -12892,7 +12892,7 @@ Fri Jan 12 00:04:00 MET 2001 Jan Hubicka 2001-01-10 Nick Clifton - * config/d30v/d30v.c (d30v_init_machine_status): Initialise + * config/d30v/d30v.c (d30v_init_machine_status): Initialize machine_function structure to zero. Add prototypes for machine_status functions. @@ -13097,7 +13097,7 @@ Wed Jan 10 16:38:31 MET 2001 Jan Hubicka * config/d30v/d30v.h (struct_machine): Move here. Add eh_epilogue_sp_ofs field. - *config/d30v/d30v.md (epilogue): Initialise eh_epilogue_sp_ofs + *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 @@ -13179,7 +13179,7 @@ Tue Jan 9 21:25:19 2001 Jeffrey A Law (law@cygnus.com) (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. Support H8S. (function_epilogue): Do not output pop for a monitor function. 2001-01-09 Nick Clifton @@ -13264,7 +13264,7 @@ Tue Jan 9 21:25:19 2001 Jeffrey A Law (law@cygnus.com) 20001-01-09 Graham Stott * cppfiles.c (_cpp_execute_include): Move `len` initialisation - after `ptr` is initialised. + after `ptr` is initialized. 2001-01-09 Alexandre Oliva @@ -13876,7 +13876,7 @@ Fri Jan 5 16:29:49 MET 2001 Jan Hubicka 2001-01-05 Neil Booth - * cpp.texi: Update for -MP. Clarify behaviour of -MT. + * 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 --git a/contrib/gcc/ChangeLog.6 b/contrib/gcc/ChangeLog.6 index d0e9a23..5618eaa 100644 --- a/contrib/gcc/ChangeLog.6 +++ b/contrib/gcc/ChangeLog.6 @@ -995,7 +995,7 @@ Mon Dec 17 18:27:52 CET 2001 Jan Hubicka Mon Dec 17 17:57:05 CET 2001 Jan Hubicka - * Makefile.in (cfgcleanup.o): Add cselib.h dependancy. + * 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. @@ -1020,10 +1020,10 @@ Mon Dec 17 17:57:05 CET 2001 Jan Hubicka * 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_UNALIGNED_[HSDT]I_OP, TARGET_ASM_INTEGER): New initializers. (TARGET_ASM_ALIGNED_INT_OP, TARGET_ASM_UNALIGNED_INT_OP): Collect - the individual initialisers together. - (TARGET_ASM_OUT): Add the new initialisers. + 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. @@ -5339,9 +5339,9 @@ Wed Nov 14 06:37:54 2001 Richard Kenner 2001-11-13 Kazu Hirata * config/h8300/h8300.c (shift_alg_si): Use special code for - 25-bit shifts on H8/S. + 25-bit shifts on H8S. (get_shift_alg): Generate special code for 25-bit shifts on - H8/S. + H8S. 2001-11-13 Jakub Jelinek @@ -5449,10 +5449,10 @@ Tue Nov 13 05:45:40 2001 Richard Kenner 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. + 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 - H8/S. + H8S. 2001-11-12 Kazu Hirata @@ -6891,7 +6891,7 @@ Sat Nov 3 10:37:56 2001 Richard Kenner 2001-11-01 David S. Miller * doc/install.texi (Specific, sparc-sun-solaris2*): Bring - 64-bit Sparc description more in line with reality. + 64-bit SPARC description more in line with reality. 2001-11-01 Joseph S. Myers @@ -9881,7 +9881,7 @@ Fri Sep 28 14:59:34 CEST 2001 Jan Hubicka 2001-09-27 Richard Henderson * dwarf2out.c (dwarf2out_frame_finish): Never elide .debug_frame - in favour of .eh_frame. + in favor of .eh_frame. 2001-09-27 Aldy Hernandez @@ -10036,7 +10036,7 @@ Tue Sep 25 17:13:56 CEST 2001 Jan Hubicka (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_comi): Initialize new mask fields. (bdesc_2srg): Likewise. (bdesc_1arg): Likewise. @@ -12374,7 +12374,7 @@ Thu Aug 30 10:21:43 2001 J"orn Rennecke (INIT_SECTION_ASM_OP): Define. (FINI_SECTION_ASM_OP): Define. (SUBTARGET_EXTRA_SECTIONS): Remove trailing comma. - (RDATA_SECTION_FUNCITON): Provide prototype. + (RDATA_SECTION_FUNCTION): Provide prototype. 2001-08-29 Geoffrey Keating @@ -16219,7 +16219,7 @@ Thu Jul 26 14:04:03 EDT 2001 John Wehle (john@feith.com) * 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 + (propagate_block): Return nonzero if an INSN is deleted. 2001-07-26 Rainer Orth @@ -16689,7 +16689,7 @@ Sun Jul 22 21:31:04 CEST 2001 Jan Hubicka (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_global_decl): Defer initialized public vars to sdbout_finish. * varasm.c (assemble_variable): Don't output debug information for file-scope variables. @@ -16721,7 +16721,7 @@ Sun Jul 22 21:31:04 CEST 2001 Jan Hubicka (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_global_decl): Defer initialized public vars to sdbout_finish. * varasm.c (assemble_variable): Don't output debug information for file-scope variables. @@ -16990,7 +16990,7 @@ Fri Jul 20 13:24:16 CEST 2001 Jan Hubicka * Makefile.in (toplev.o, dwarfout.o, final.o): Don't depend on dwarfout.h. - * dbxout.c (dbxout_function): Rename dbxout_funciton_decl, move + * 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. @@ -18418,7 +18418,7 @@ Mon Jul 9 06:41:07 2001 Richard Kenner * 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 + (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): @@ -19186,13 +19186,13 @@ Sun Jul 1 11:53:52 2001 Richard Kenner * c-parse.in (OBJC_STRING): Kill. (objc_string): Decompose to [objc_string] '@' STRING. - (reswords): Take the leading '@' off all the Objective C keywords. + (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, + 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 --git a/contrib/gcc/ChangeLog.7 b/contrib/gcc/ChangeLog.7 new file mode 100644 index 0000000..dc7282b --- /dev/null +++ b/contrib/gcc/ChangeLog.7 @@ -0,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 --git a/contrib/gcc/FSFChangeLog.10 b/contrib/gcc/FSFChangeLog.10 index 0fea553..e7ae6c5 100644 --- a/contrib/gcc/FSFChangeLog.10 +++ b/contrib/gcc/FSFChangeLog.10 @@ -5704,7 +5704,7 @@ Sun Aug 13 14:50:58 1995 Jim Wilson * Makefile.in (gfloat.h): Add a - before the rm command. * loop.c (find_and_verify_loops): Set dest_loop only if - JUMP_LABEL (insn) is non-zero. + JUMP_LABEL (insn) is nonzero. Mon Jul 31 14:31:53 1995 Ian Lance Taylor @@ -6057,7 +6057,7 @@ Mon Jul 17 06:41:19 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) * xm-alpha.h (sbrk): Add declaration. - * convert.c (convert_to_integer): If TYPE is a enumeral type or + * convert.c (convert_to_integer): If TYPE is an enumeral type or if its precision is not the same as the size of its mode, convert in two steps. @@ -8538,7 +8538,7 @@ Tue Apr 25 18:52:43 1995 Stephen R. van den Berg (berg@pool.informatik.rwth-aa (mark_regs_pat, straighten_stack): New functions. (reg_to_stack): Amend initialisation of FP_mode_reg. Mark FP registers mentioned in USE insns before NOTE_INSN_FUNCTION_BEG. - (get_true_reg): Eliminate FP subreg accesses in favour of the + (get_true_reg): Eliminate FP subreg accesses in favor of the actual FP register in use. (record_reg_life_pat): Make it work on SUBREGs as well. Make use of the new mark_regs_pat function. Handle USE insns if called unnested. @@ -8552,7 +8552,7 @@ Tue Apr 25 18:52:43 1995 Stephen R. van den Berg (berg@pool.informatik.rwth-aa Delete the no_live_regs shortcut to save space. Use stackentry state to determine filled registers. (replace_reg): Accept COMPLEX_FLOAT as well. - (move_for_stack_reg): Optimise away some pointer dereferencing. + (move_for_stack_reg): Optimize away some pointer dereferencing. (subst_stack_regs): Make sure the stack is in the right order and of the right size for register passing. (goto_block_pat): Make sure the stack is in the right order @@ -8841,7 +8841,7 @@ Sat Apr 15 13:26:34 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) Sat Apr 15 12:11:46 1995 Brendan Kehoe * alpha/alpha.c (output_epilog): Initialize fp_offset to 0, and - make sure it's non-zero before we try to use it to restore the + make sure it's nonzero before we try to use it to restore the frame pointer. Fri Apr 14 19:45:05 1995 Jason Merrill diff --git a/contrib/gcc/FSFChangeLog.11 b/contrib/gcc/FSFChangeLog.11 index 38de90c..1e80eab 100644 --- a/contrib/gcc/FSFChangeLog.11 +++ b/contrib/gcc/FSFChangeLog.11 @@ -2636,7 +2636,7 @@ Wed Sep 10 11:49:20 1997 Jason Merrill EXCEPTION_SECTION, mark the start of the frame info with a collectable tag. * collect2.c (frame_tables): New list. - (is_ctor_dtor): Recognise frame entries. + (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. @@ -3114,7 +3114,7 @@ Wed Aug 27 20:15:53 1997 J"orn Rennecke (braf_branch_p, align_length, fixup_addr_diff_vecs): Likewise. (addr_diff_vec_adjust, get_dest_uid, gen_far_branch): Likewise. (split_branches, regs_used, gen_block_redirect): Likewise. - (from_compare): Can't compare non-zero DImode constant directly. + (from_compare): Can't compare nonzero DImode constant directly. Emit special code for TARGET_SH3E floating point with code == GE. Force 0.0 into a register for SH3E. (print_operand): Add ','. @@ -3935,7 +3935,7 @@ Mon Aug 4 08:06:48 1997 Bernd Schmidt integer argument of push_reload. * rtlanal.c (may_trap_p): Fix unintended fall-through so divisions by - non-zero constants are handled properly. Return 1 for FP divisions. + nonzero constants are handled properly. Return 1 for FP divisions. Mon Aug 4 06:52:20 1997 Andreas Schwab @@ -3948,7 +3948,7 @@ Sun Aug 3 21:57:31 1997 Jim Meyering Sun Aug 3 21:54:51 1997 Nick Burrett - * cpplib.c (cpp_start_read): Recognise suffixes 'cp' and 'c++'. + * cpplib.c (cpp_start_read): Recognize suffixes 'cp' and 'c++'. Sun Aug 3 19:18:27 1997 Ralf Baechle @@ -5105,7 +5105,7 @@ Thu Jun 19 21:18:20 1997 Jim Wilson Thu Jun 19 14:55:49 1997 Brendan Kehoe - * toplev.c (xmalloc): Only give the fatal msg if SIZE is non-zero. + * toplev.c (xmalloc): Only give the fatal msg if SIZE is nonzero. Sun Apr 27 23:19:13 1997 Ulrich Drepper @@ -9711,7 +9711,7 @@ Sun Oct 20 20:01:09 1996 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) Fri Oct 18 13:32:13 1996 Michael Meissner * rs6000.md (float conversion insns): Generate correct code - if the bit 15 of rs6000_fpmem_offset is non-zero. + if the bit 15 of rs6000_fpmem_offset is nonzero. Thu Oct 17 23:22:03 1996 Jason Merrill @@ -9814,7 +9814,7 @@ Tue Oct 15 16:52:33 1996 Ian Lance Taylor Tue Oct 15 11:19:17 1996 Lee Iverson - * mips.h (CPP_SPEC): Restore -D_LANGUAGE_C for Objective C. + * mips.h (CPP_SPEC): Restore -D_LANGUAGE_C for Objective-C. Mon Oct 14 18:03:35 1996 Jason Merrill @@ -9864,7 +9864,7 @@ Fri Oct 11 12:19:21 1996 Ian Lance Taylor (ASM_SPEC): Rewrite to use above specs. (SUBTARGET_CPP{,_SIZE}_SPEC): Define. (CPP_SPEC): Use above specs. Don't define _LANGUAGE_C if C++ or - Objective C. + Objective-C. ({,SUBTARGET_}EXTRA_SPECS): Define. * mips/dec-bsd.h ({CPP,ASM}_SPEC): Don't define. * mips/dec-osf1.h (CPP_SPEC): Don't define. @@ -11676,7 +11676,7 @@ Thu Jul 11 17:29:33 1996 Michael Meissner Thu Jul 11 10:12:50 1996 Jeffrey A Law (law@cygnus.com) - * h8300.h (OK_FOR_U): If generating H8/S code, accept + * h8300.h (OK_FOR_U): If generating H8S code, accept SYMBOL_REF and SYMBOL_REF + CONST_INT. * h8300.c ({shift,rotate}_one): Emit tabs between opcode and @@ -11684,7 +11684,7 @@ Thu Jul 11 10:12:50 1996 Jeffrey A Law (law@cygnus.com) (shift_two, rotate_two): Define. (get_shift_alg): Accept new argument "assembler2_p" for rotate/shift by two insns. All callers changed. Rework - to generate more efficient code on the H8/300, H8/300H, and H8/S. + to generate more efficient code on the H8/300, H8/300H, and H8S. Try to simplify somewhat. (emit_a_shift): Use shift-by-two insns when they're available. Emit tabs between opcode and operands to be consistent with @@ -11755,31 +11755,31 @@ Mon Jul 8 18:00:33 1996 Jim Wilson Mon Jul 8 16:27:33 1996 Jeffrey A. Law - * First cut at support for the H8/S. - * h8300.c (h8300_init_once): Handle the H8/S (treat it + * First cut at support for the H8S. + * h8300.c (h8300_init_once): Handle the H8S (treat it like the H8/300H). (dosize, adds_subs_operand, one_insn_adds_subs_operand): Likewise. (output_adds_subs, const_costs, print_operand): Likewise. (output_simode_bld, h8300_adjust_insn_length): Likewise. (push_order, pop_order): Reverse. (function_prologue): Try to use ldm.l and stm.l insns - on the H8/S. Minor cleanups. + on the H8S. Minor cleanups. (function_epilogue): Likewise. - (asm_file_start): Emit ".h8300s" when compiling for the H8/S. - * h8300/h8300.h (CPP_SPEC): Handle the H8/S. + (asm_file_start): Emit ".h8300s" when compiling for the H8S. + * h8300/h8300.h (CPP_SPEC): Handle the H8S. (TARGET_H8300S): New target. (TARGET_SWITCHES): Add "-ms" and "-mno-s". - (BITS_PER_WORD): Handle the H8/S (treat it like the H8/300H). + (BITS_PER_WORD): Handle the H8S (treat it like the H8/300H). (UNITS_PER_WORD, POINTER_SIZE, PARM_BOUNDARY): Likewise. (BIGGEST_ALIGNMENT, BIGGEST_FIELD_ALIGNMENT): Likewise. (INITIALIZE_TRAMPOLINE, MOVE_MAX, Pmode): Likewise. - * h8300.md: Handle H8/S just like H8/300H + * h8300.md: Handle H8S just like H8/300H throughout the entire file. * t-h8300 (MULTILIB_OPTIONS): Build "-ms" libraries too. - (MULTILIB_DIRNAMES): Put H8/S libraries in "h8300s" directory. + (MULTILIB_DIRNAMES): Put H8S libraries in "h8300s" directory. * h8300/lib1funcs.asm: Emit ".h8300s" pseudo-op when generating - h8300s object files. Otherwise treat the H8/S just like the H8/300H. - * ginclude/stdarg.h: Handle the H8/S. + h8300s object files. Otherwise treat the H8S just like the H8/300H. + * ginclude/stdarg.h: Handle the H8S. * ginclude/varargs.h: Likewise. Mon Jul 8 14:50:58 1996 Doug Evans @@ -14430,7 +14430,7 @@ Thu Apr 4 11:40:55 1996 Michael Meissner Wed Apr 3 14:10:16 1996 Jim Wilson - * expr.c (emit_push_insn): Clobber register only if it is non-zero. + * expr.c (emit_push_insn): Clobber register only if it is nonzero. Wed Apr 3 11:31:55 1996 Jeffrey A. Law diff --git a/contrib/gcc/LANGUAGES b/contrib/gcc/LANGUAGES index 8bc5156..d1e0719 100644 --- a/contrib/gcc/LANGUAGES +++ b/contrib/gcc/LANGUAGES @@ -18,7 +18,7 @@ Aug 31, 1998: from the input stream, and to push them back into the input stream respectively. The third argument is a pointer to a null terminate string which is the first word after #pragma. The expression supplied by HANDLE_PRAGMA should return - non-zero if it parsed and implemented the pragma. Otherwise it should return + nonzero if it parsed and implemented the pragma. Otherwise it should return zero, and leave the input stream as it was before the expression was evaluated. A new back-end definable macro has been added: INSERT_ATTRIBUTES. This macro diff --git a/contrib/gcc/Makefile.in b/contrib/gcc/Makefile.in index e7c29b9e..75e4d03 100644 --- a/contrib/gcc/Makefile.in +++ b/contrib/gcc/Makefile.in @@ -69,6 +69,13 @@ CFLAGS = -g STAGE1_CFLAGS = -g @stage1_cflags@ BOOT_CFLAGS = -g -O2 +# Flags to determine code coverage. When coverage is disabled, this will +# contain the optimization flags, as you normally want code coverage +# without optimization. The -dumpbase $@ makes sure that the auxilary +# files end up near the object files. +COVERAGE_FLAGS = @coverage_flags@ +coverageexts = .{da,bb,bbg} + # The warning flags are separate from BOOT_CFLAGS because people tend to # override optimization flags and we'd like them to still have warnings # turned on. These flags are also used to pass other stage dependent @@ -85,9 +92,17 @@ LOOSE_WARN = -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes STRICT_WARN = -Wtraditional @strict1_warn@ STRICT2_WARN = -Wtraditional -pedantic -Wno-long-long +# This is set by --enable-checking. The idea is to catch forgotten +# "extern" tags in header files. +NOCOMMON_FLAG = @nocommon_flag@ + +# These are set by --enable-checking=valgrind. +RUN_GEN = @valgrind_command@ +VALGRIND_DRIVER_DEFINES = @valgrind_path_defines@ + # This is how we control whether or not the additional warnings are applied. .-warn = $(STRICT_WARN) -GCC_WARN_CFLAGS = $(LOOSE_WARN) $($(@D)-warn) +GCC_WARN_CFLAGS = $(LOOSE_WARN) $($(@D)-warn) $(NOCOMMON_FLAG) # All warnings have to be shut off in stage1 if the compiler used then # isn't gcc; configure determines that. WARN_CFLAGS will be either @@ -101,6 +116,7 @@ T_CFLAGS = X_CPPFLAGS = T_CPPFLAGS = +ADAC = @ADAC@ AWK = @AWK@ CC = @CC@ BISON = @BISON@ @@ -111,7 +127,14 @@ AR = ar AR_FLAGS = rc DLLTOOL = dlltool RANLIB = @RANLIB@ -SHELL = /bin/sh +SHELL = @SHELL@ +# pwd command to use. Allow user to override default by setting PWDCMD in +# the environment to account for automounters. The make variable must not +# be called PWDCMD, otherwise the value set here is passed to make +# subprocesses and overrides the setting from the user's environment. +# Don't use PWD since it is a common shell environment variable and we +# don't want to corrupt it. +PWD_COMMAND = $${PWDCMD-pwd} # on sysV, define this as cp. INSTALL = @INSTALL@ # Some systems may be missing symbolic links, regular links, or both. @@ -154,15 +177,19 @@ INSTALL_HEADERS_DIR = @build_install_headers_dir@ # Header files that are made available under the same name # to programs compiled with GCC. -USER_H = $(srcdir)/ginclude/stdarg.h $(srcdir)/ginclude/stddef.h \ - $(srcdir)/ginclude/varargs.h \ - $(srcdir)/ginclude/stdbool.h $(srcdir)/ginclude/iso646.h \ - $(EXTRA_HEADERS) - -# The GCC to use for compiling libgcc.a, enquire, and crt*.o. +USER_H = $(srcdir)/ginclude/float.h \ + $(srcdir)/ginclude/iso646.h \ + $(srcdir)/ginclude/stdarg.h \ + $(srcdir)/ginclude/stdbool.h \ + $(srcdir)/ginclude/stddef.h \ + $(srcdir)/ginclude/varargs.h \ + $(srcdir)/unwind.h \ + $(EXTRA_HEADERS) + +# The GCC to use for compiling libgcc.a and crt*.o. # Usually the one we just built. # Don't use this as a dependency--use $(GCC_PASSES) or $(GCC_PARTS). -GCC_FOR_TARGET = ./xgcc -B./ -B$(build_tooldir)/bin/ -isystem $(build_tooldir)/include -isystem $(build_tooldir)/sys-include +GCC_FOR_TARGET = $(STAGE_CC_WRAPPER) ./xgcc -B./ -B$(build_tooldir)/bin/ -isystem $(build_tooldir)/include -isystem $(build_tooldir)/sys-include # This is used instead of ALL_CFLAGS when compiling with GCC_FOR_TARGET. # It omits XCFLAGS, and specifies -B./. @@ -230,6 +257,7 @@ HASHTAB_H = $(srcdir)/../include/hashtab.h OBSTACK_H = $(srcdir)/../include/obstack.h SPLAY_TREE_H= $(srcdir)/../include/splay-tree.h FIBHEAP_H = $(srcdir)/../include/fibheap.h +PARTITION_H = $(srcdir)/../include/partition.h # Default native SYSTEM_HEADER_DIR, to be overridden by targets. NATIVE_SYSTEM_HEADER_DIR = /usr/include @@ -253,6 +281,7 @@ tmake_file=@dep_tmake_file@ out_file=$(srcdir)/config/@out_file@ out_object_file=@out_object_file@ md_file=$(srcdir)/config/@md_file@ +tm_defines=@tm_defines@ tm_p_file_list=@tm_p_file_list@ tm_p_file=@tm_p_file@ build_xm_file_list=@build_xm_file_list@ @@ -369,11 +398,12 @@ TARGET_LIBGCC2_CFLAGS = # Options to use when compiling crtbegin/end. CRTSTUFF_CFLAGS = -O2 $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -g0 \ - -finhibit-size-directive -fno-inline-functions -fno-exceptions + -finhibit-size-directive -fno-inline-functions -fno-exceptions \ + -fno-zero-initialized-in-bss # Additional sources to handle exceptions; overridden on ia64. LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/unwind-dw2-fde.c \ - $(srcdir)/unwind-sjlj.c + $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c LIB2ADDEHDEP = unwind.inc unwind-dw2-fde.h # nm flags to list global symbols in libgcc object files. @@ -415,19 +445,11 @@ LIB2FUNCS_EXTRA = # Assembler files should have names ending in `.asm'. LIB2FUNCS_STATIC_EXTRA = -# Handle cpp installation. -INSTALL_CPP= -UNINSTALL_CPP= - -# We do not try to build float.h anymore. Let configure select the -# appropriate pre-built float.h file for the target. -FLOAT_H=@float_h_file@ - # Program to convert libraries. LIBCONVERT = # Control whether header files are installed. -INSTALL_HEADERS=install-headers +INSTALL_HEADERS=install-headers install-mkheaders # Control whether Info documentation is built and installed. BUILD_INFO = @BUILD_INFO@ @@ -449,7 +471,7 @@ COMPILERS = cc1$(exeext) @all_compilers@ # List of things which should already be built whenever we try to use xgcc # to compile anything (without linking). -GCC_PASSES=xgcc$(exeext) cc1$(exeext) cpp0$(exeext) specs $(EXTRA_PASSES) +GCC_PASSES=xgcc$(exeext) cc1$(exeext) specs $(EXTRA_PASSES) # List of things which should already be built whenever we try to use xgcc # to link anything. @@ -461,12 +483,12 @@ DIR = ../gcc # Flags to use when cross-building GCC. # Prefix to apply to names of object files when using them # to run on the machine we are compiling on. -HOST_PREFIX = @HOST_PREFIX@ +BUILD_PREFIX = @BUILD_PREFIX@ # Prefix to apply to names of object files when compiling them # to run on the machine we are compiling on. # The default for this variable is chosen to keep these rules # out of the way of the other rules for compiling the same source files. -HOST_PREFIX_1 = @HOST_PREFIX_1@ +BUILD_PREFIX_1 = @BUILD_PREFIX_1@ # Native compiler for the build machine and its switches. HOST_CC = @HOST_CC@ HOST_CFLAGS= @HOST_CFLAGS@ -DGENERATOR_FILE @@ -533,7 +555,7 @@ all: all.indirect .NOEXPORT: # GCONFIG_H lists the config files that the generator files depend on, while -# CONFIG_H lists the the ones ordinary gcc files depend on, which includes +# CONFIG_H lists the ones ordinary gcc files depend on, which includes # several files generated by those generators. GCONFIG_H = config.h $(host_xm_file_list) HCONFIG_H = hconfig.h $(build_xm_file_list) @@ -541,16 +563,18 @@ CONFIG_H = $(GCONFIG_H) insn-constants.h insn-flags.h TCONFIG_H = tconfig.h $(xm_file_list) TARGET_H = target.h HOOKS_H = hooks.h -LANGHOOKS_DEF_H = langhooks.h $(HOOKS_H) +LANGHOOKS_DEF_H = langhooks-def.h $(HOOKS_H) TARGET_DEF_H = target-def.h $(HOOKS_H) TM_P_H = tm_p.h $(tm_p_file_list) tm-preds.h -MACHMODE_H = machmode.h machmode.def +MACHMODE_H = machmode.h machmode.def @extra_modes_file@ RTL_BASE_H = rtl.h rtl.def $(MACHMODE_H) RTL_H = $(RTL_BASE_H) genrtl.h PARAMS_H = params.h params.def -TREE_H = tree.h real.h tree.def $(MACHMODE_H) tree-check.h version.h builtins.def -BASIC_BLOCK_H = basic-block.h bitmap.h sbitmap.h varray.h +TREE_H = tree.h tree.def $(MACHMODE_H) tree-check.h version.h builtins.def \ + location.h +BASIC_BLOCK_H = basic-block.h bitmap.h sbitmap.h varray.h $(PARTITION_H) \ + hard-reg-set.h DEMANGLE_H = $(srcdir)/../include/demangle.h RECOG_H = recog.h EXPR_H = expr.h @@ -559,10 +583,10 @@ REGS_H = regs.h varray.h $(MACHMODE_H) INTEGRATE_H = integrate.h varray.h LOOP_H = loop.h varray.h bitmap.h GCC_H = gcc.h version.h -GGC_H = ggc.h varray.h +GGC_H = ggc.h varray.h gtype-desc.h TIMEVAR_H = timevar.h timevar.def INSN_ATTR_H = insn-attr.h $(srcdir)/insn-addr.h $(srcdir)/varray.h -C_COMMON_H = c-common.h $(SPLAY_TREE_H) +C_COMMON_H = c-common.h $(SPLAY_TREE_H) $(CPPLIB_H) C_TREE_H = c-tree.h $(C_COMMON_H) SYSTEM_H = system.h hwint.h $(srcdir)/../include/libiberty.h PREDICT_H = predict.h predict.def @@ -587,8 +611,8 @@ INTERNAL_CFLAGS = -DIN_GCC @CROSS@ # This is the variable actually used when we compile. # If you change this line, you probably also need to change the definition # of HOST_CFLAGS in build-make to match. -ALL_CFLAGS = $(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) \ - $(CFLAGS) $(WARN_CFLAGS) $(XCFLAGS) @DEFS@ +ALL_CFLAGS = $(X_CFLAGS) $(T_CFLAGS) \ + $(CFLAGS) $(INTERNAL_CFLAGS) $(COVERAGE_FLAGS) $(WARN_CFLAGS) $(XCFLAGS) @DEFS@ # Likewise. ALL_CPPFLAGS = $(CPPFLAGS) $(X_CPPFLAGS) $(T_CPPFLAGS) @@ -609,15 +633,24 @@ HOST_LIBDEPS= $(BUILD_LIBIBERTY) # and the system's installed libraries. LIBS = $(INTLLIBS) @LIBS@ $(LIBIBERTY) +# Any system libraries needed just for GNAT. +SYSLIBS = @GNAT_LIBEXC@ + +# Libs needed (at present) just for jcf-dump. +LDEXP_LIB = @LDEXP_LIB@ + # Likewise, for use in the tools that must run on this machine # even if we are cross-building GCC. HOST_LIBS = $(BUILD_LIBIBERTY) -HOST_RTL = $(HOST_PREFIX)rtl.o read-rtl.o $(HOST_PREFIX)bitmap.o \ - $(HOST_PREFIX)ggc-none.o gensupport.o +HOST_RTL = $(BUILD_PREFIX)rtl.o read-rtl.o $(BUILD_PREFIX)bitmap.o \ + $(BUILD_PREFIX)ggc-none.o +HOST_SUPPORT = gensupport.o insn-conditions.o +HOST_EARLY_SUPPORT = gensupport.o dummy-conditions.o -HOST_PRINT = $(HOST_PREFIX)print-rtl.o -HOST_ERRORS = $(HOST_PREFIX)errors.o +HOST_PRINT = print-rtl1.o +HOST_ERRORS = $(BUILD_PREFIX)errors.o +HOST_VARRAY = $(BUILD_PREFIX)varray.o # Specify the directories to be searched for header files. # Both . and srcdir are used, in that order, @@ -704,60 +737,55 @@ CXX_TARGET_OBJS=@cxx_target_objs@ # Language-specific object files for C and Objective C. C_AND_OBJC_OBJS = attribs.o c-errors.o c-lex.o c-pragma.o c-decl.o c-typeck.o \ - c-convert.o c-aux-info.o c-common.o c-format.o c-semantics.o \ - c-objc-common.o libcpp.a $(C_TARGET_OBJS) + c-convert.o c-aux-info.o c-common.o c-opts.o c-format.o c-semantics.o \ + c-objc-common.o c-dump.o libcpp.a $(C_TARGET_OBJS) # Language-specific object files for C. -C_OBJS = c-parse.o c-lang.o $(C_AND_OBJC_OBJS) +C_OBJS = c-parse.o c-lang.o c-pretty-print.o $(C_AND_OBJC_OBJS) # Language-independent object files. -OBJS = alias.o bb-reorder.o bitmap.o builtins.o caller-save.o calls.o \ - cfg.o cfganal.o cfgbuild.o cfgcleanup.o cfglayout.o cfgloop.o cfgrtl.o \ - combine.o conflict.o convert.o cse.o cselib.o dbxout.o debug.o dependence.o \ - df.o diagnostic.o doloop.o dominance.o dwarf2asm.o dwarf2out.o dwarfout.o \ - emit-rtl.o except.o explow.o expmed.o expr.o final.o flow.o \ - fold-const.o function.o gcse.o genrtl.o ggc-common.o global.o graph.o \ - haifa-sched.o hash.o hashtable.o hooks.o ifcvt.o insn-attrtab.o insn-emit.o \ - insn-extract.o insn-opinit.o insn-output.o insn-peep.o insn-recog.o \ - integrate.o intl.o jump.o langhooks.o lcm.o lists.o local-alloc.o \ - loop.o mbchar.o optabs.o params.o predict.o print-rtl.o print-tree.o \ - profile.o real.o recog.o reg-stack.o regclass.o regmove.o regrename.o \ - reload.o reload1.o reorg.o resource.o rtl.o rtlanal.o rtl-error.o \ - sbitmap.o sched-deps.o sched-ebb.o sched-rgn.o sched-vis.o sdbout.o \ - sibcall.o simplify-rtx.o ssa.o ssa-ccp.o ssa-dce.o stmt.o \ - stor-layout.o stringpool.o timevar.o toplev.o tree.o tree-dump.o \ +OBJS = alias.o bb-reorder.o bitmap.o builtins.o caller-save.o calls.o \ + cfg.o cfganal.o cfgbuild.o cfgcleanup.o cfglayout.o cfgloop.o \ + cfgrtl.o combine.o conflict.o convert.o cse.o cselib.o dbxout.o \ + debug.o df.o diagnostic.o doloop.o dominance.o \ + dwarf2asm.o dwarf2out.o dwarfout.o emit-rtl.o except.o explow.o \ + expmed.o expr.o final.o flow.o fold-const.o function.o gcse.o \ + genrtl.o ggc-common.o global.o graph.o gtype-desc.o \ + haifa-sched.o hashtable.o hooks.o ifcvt.o insn-attrtab.o insn-emit.o \ + insn-extract.o insn-opinit.o insn-output.o insn-peep.o insn-recog.o \ + integrate.o intl.o jump.o langhooks.o lcm.o lists.o local-alloc.o \ + loop.o mbchar.o optabs.o params.o predict.o print-rtl.o print-tree.o \ + profile.o ra.o ra-build.o ra-colorize.o ra-debug.o ra-rewrite.o \ + real.o recog.o reg-stack.o regclass.o regmove.o regrename.o \ + reload.o reload1.o reorg.o resource.o rtl.o rtlanal.o rtl-error.o \ + sbitmap.o sched-deps.o sched-ebb.o sched-rgn.o sched-vis.o sdbout.o \ + sibcall.o simplify-rtx.o ssa.o ssa-ccp.o ssa-dce.o stmt.o \ + stor-layout.o stringpool.o timevar.o toplev.o tracer.o tree.o tree-dump.o \ tree-inline.o unroll.o varasm.o varray.o version.o vmsdbgout.o xcoffout.o \ - $(GGC) $(out_object_file) $(EXTRA_OBJS) + et-forest.o $(GGC) $(out_object_file) $(EXTRA_OBJS) BACKEND = main.o libbackend.a -# GEN files are listed separately, so they can be built before doing parallel -# makes for cc1 or cc1plus. Otherwise sequent parallel make attempts to load -# them before rtl.o is compiled. -GEN= genemit$(build_exeext) genoutput$(build_exeext) genrecog$(build_exeext) \ - genextract$(build_exeext) genflags$(build_exeext) gencodes$(build_exeext) \ - genconfig$(build_exeext) genpeep$(build_exeext) gengenrtl$(build_exeext) \ - gencheck$(build_exeext) genpreds$(build_exeext) genconstants$(build_exeext) - # Files to be copied away after each stage in building. STAGESTUFF = *$(objext) insn-flags.h insn-config.h insn-codes.h \ insn-output.c insn-recog.c insn-emit.c insn-extract.c insn-peep.c \ insn-attr.h insn-attrtab.c insn-opinit.c insn-constants.h tm-preds.h \ - tree-check.h \ - s-flags s-config s-codes s-mlib s-under s-genrtl \ - s-output s-recog s-emit s-extract s-peep s-check \ + tree-check.h insn-conditions.c \ + s-flags s-config s-codes s-mlib s-genrtl s-gtype gtyp-gen.h \ + s-output s-recog s-emit s-extract s-peep s-check s-conditions \ s-attr s-attrtab s-opinit s-preds s-constants s-crt0 \ genemit$(build_exeext) genoutput$(build_exeext) genrecog$(build_exeext) \ genextract$(build_exeext) genflags$(build_exeext) gencodes$(build_exeext) \ genconfig$(build_exeext) genpeep$(build_exeext) genattrtab$(build_exeext) \ genattr$(build_exeext) genopinit$(build_exeext) gengenrtl$(build_exeext) \ gencheck$(build_exeext) genpreds$(build_exeext) genconstants$(build_exeext) \ - genrtl.c genrtl.h \ - xgcc$(exeext) cpp$(exeext) cc1$(exeext) cpp0$(exeext) $(EXTRA_PASSES) \ + gengtype$(build_exeext) genconditions$(build_exeext) \ + genrtl.c genrtl.h gt-*.h gtype-*.h gtype-desc.c \ + xgcc$(exeext) cpp$(exeext) cc1$(exeext) $(EXTRA_PASSES) \ $(EXTRA_PARTS) $(EXTRA_PROGRAMS) gcc-cross$(exeext) cc1obj$(exeext) \ - enquire$(exeext) protoize$(exeext) unprotoize$(exeext) \ - specs collect2$(exeext) $(USE_COLLECT2) underscore.c tradcpp0$(exeext) \ + protoize$(exeext) unprotoize$(exeext) \ + specs collect2$(exeext) $(USE_COLLECT2) \ gcov$(exeext) *.[0-9][0-9].* *.[si] libcpp.a libbackend.a libgcc.mk \ $(LANG_STAGESTUFF) @@ -777,17 +805,30 @@ LIB2FUNCS_ST = _eprintf _bb __gcc_bcmp FPBIT_FUNCS = _pack_sf _unpack_sf _addsub_sf _mul_sf _div_sf \ _fpcmp_parts_sf _compare_sf _eq_sf _ne_sf _gt_sf _ge_sf \ _lt_sf _le_sf _unord_sf _si_to_sf _sf_to_si _negate_sf _make_sf \ - _sf_to_df _thenan_sf _sf_to_usi _usi_to_sf + _sf_to_df _sf_to_tf _thenan_sf _sf_to_usi _usi_to_sf DPBIT_FUNCS = _pack_df _unpack_df _addsub_df _mul_df _div_df \ _fpcmp_parts_df _compare_df _eq_df _ne_df _gt_df _ge_df \ _lt_df _le_df _unord_df _si_to_df _df_to_si _negate_df _make_df \ - _df_to_sf _thenan_df _df_to_usi _usi_to_df + _df_to_sf _df_to_tf _thenan_df _df_to_usi _usi_to_df + +TPBIT_FUNCS = _pack_tf _unpack_tf _addsub_tf _mul_tf _div_tf \ + _fpcmp_parts_tf _compare_tf _eq_tf _ne_tf _gt_tf _ge_tf \ + _lt_tf _le_tf _unord_tf _si_to_tf _tf_to_si _negate_tf _make_tf \ + _tf_to_df _tf_to_sf _thenan_tf _tf_to_usi _usi_to_tf # These might cause a divide overflow trap and so are compiled with # unwinder info. LIB2_DIVMOD_FUNCS = _divdi3 _moddi3 _udivdi3 _umoddi3 _udiv_w_sdiv _udivmoddi4 +# The only suffixes we want for implicit rules are .c and .o, so clear +# the list and add them. This speeds up GNU Make, and allows -r to work. +# For i18n support, we also need .gmo, .po, .pox. +# This must come before the language makefile fragments to allow them to +# add suffixes and rules of their own. +.SUFFIXES: +.SUFFIXES: .c .o .po .pox .gmo + # # Language makefile fragments. @@ -813,11 +854,6 @@ LIB2_DIVMOD_FUNCS = _divdi3 _moddi3 _udivdi3 _umoddi3 _udiv_w_sdiv _udivmoddi4 # End of language makefile fragments. # -# The only suffixes we want for implicit rules are .c and .o, so clear -# the list and add them. This speeds up GNU Make, and allows -r to work. -# For i18n support, we also need .gmo, .po, .pox. -.SUFFIXES: -.SUFFIXES: .c .o .po .pox .gmo Makefile: $(srcdir)/Makefile.in config.status $(srcdir)/version.c \ $(xmake_file) $(tmake_file) $(LANG_MAKEFILES) @@ -833,22 +869,26 @@ tconfig.h: cs-tconfig.h ; @true tm_p.h: cs-tm_p.h ; @true cs-config.h: Makefile - HEADERS="$(host_xm_file)" DEFINES="$(host_xm_defines)" \ + TM_DEFINES="$(tm_defines)" \ + HEADERS="$(host_xm_file)" XM_DEFINES="$(host_xm_defines)" \ TARGET_CPU_DEFAULT="$(target_cpu_default)" \ $(SHELL) $(srcdir)/mkconfig.sh config.h cs-hconfig.h: Makefile - HEADERS="$(build_xm_file)" DEFINES="$(build_xm_defines)" \ + TM_DEFINES="$(tm_defines)" \ + HEADERS="$(build_xm_file)" XM_DEFINES="$(build_xm_defines)" \ TARGET_CPU_DEFAULT="$(target_cpu_default)" \ $(SHELL) $(srcdir)/mkconfig.sh hconfig.h cs-tconfig.h: Makefile - HEADERS="$(xm_file)" DEFINES="$(xm_defines)" \ + TM_DEFINES="$(tm_defines)" \ + HEADERS="$(xm_file)" XM_DEFINES="$(xm_defines)" \ TARGET_CPU_DEFAULT="" \ $(SHELL) $(srcdir)/mkconfig.sh tconfig.h cs-tm_p.h: Makefile - HEADERS="$(tm_p_file)" DEFINES="" TARGET_CPU_DEFAULT="" \ + TM_DEFINES="" \ + HEADERS="$(tm_p_file)" XM_DEFINES="" TARGET_CPU_DEFAULT="" \ $(SHELL) $(srcdir)/mkconfig.sh tm_p.h # Don't automatically run autoconf, since configure.in might be accidentally @@ -865,6 +905,9 @@ gccbug: $(srcdir)/gccbug.in mklibgcc: $(srcdir)/mklibgcc.in CONFIG_FILES=mklibgcc CONFIG_HEADERS= ./config.status +mkheaders: $(srcdir)/mkheaders.in + CONFIG_FILES=mkheaders CONFIG_HEADERS= ./config.status + # cstamp-h.in controls rebuilding of config.in. # It is named cstamp-h.in and not stamp-h.in so the mostlyclean rule doesn't # delete it. A stamp file is needed as autoheader won't update the file if @@ -899,8 +942,6 @@ config.status: $(srcdir)/configure $(srcdir)/config.gcc version.c all.internal: start.encap rest.encap doc # This is what to compile if making a cross-compiler. -# Note that we can compile enquire using the cross-compiler just built, -# although we can't run it on this machine. all.cross: native gcc-cross cpp$(exeext) specs \ $(LIBGCC) $(EXTRA_PARTS) lang.all.cross doc # This is what must be made before installing GCC and converting libraries. @@ -914,7 +955,7 @@ native: config.status auto-host.h intl.all build-@POSUB@ $(LANGUAGES) \ $(EXTRA_PASSES) $(EXTRA_PROGRAMS) $(USE_COLLECT2) # Define the names for selecting languages in LANGUAGES. -C c: cc1$(exeext) tradcpp0$(exeext) +C c: cc1$(exeext) PROTO: proto # Tell GNU make these are phony targets. @@ -979,7 +1020,7 @@ xlimits.h: glimits.h limitx.h limity.h LIB2ADD = $(LIB2FUNCS_EXTRA) LIB2ADD_ST = $(LIB2FUNCS_STATIC_EXTRA) -libgcc.mk: config.status Makefile mklibgcc $(LIB2ADD) $(LIB2ADD_ST) xgcc$(exeext) +libgcc.mk: config.status Makefile mklibgcc $(LIB2ADD) $(LIB2ADD_ST) xgcc$(exeext) specs objext='$(objext)' \ LIB1ASMFUNCS='$(LIB1ASMFUNCS)' \ LIB2FUNCS_1='$(LIB2FUNCS_1)' \ @@ -994,6 +1035,8 @@ libgcc.mk: config.status Makefile mklibgcc $(LIB2ADD) $(LIB2ADD_ST) xgcc$(exeext LIB2_DIVMOD_FUNCS='$(LIB2_DIVMOD_FUNCS)' \ DPBIT='$(DPBIT)' \ DPBIT_FUNCS='$(DPBIT_FUNCS)' \ + TPBIT='$(TPBIT)' \ + TPBIT_FUNCS='$(TPBIT_FUNCS)' \ MULTILIBS=`$(GCC_FOR_TARGET) --print-multi-lib` \ EXTRA_MULTILIB_PARTS='$(EXTRA_MULTILIB_PARTS)' \ SHLIB_LINK='$(SHLIB_LINK)' \ @@ -1013,12 +1056,13 @@ libgcc.mk: config.status Makefile mklibgcc $(LIB2ADD) $(LIB2ADD_ST) xgcc$(exeext LIBGCC_DEPS = $(GCC_PASSES) $(LANGUAGES) stmp-int-hdrs $(STMP_FIXPROTO) \ libgcc.mk $(srcdir)/libgcc2.c $(TCONFIG_H) \ $(MACHMODE_H) longlong.h gbl-ctors.h config.status stmp-int-hdrs \ - tsystem.h $(FPBIT) $(DPBIT) $(LIB2ADD) $(LIB2ADD_ST) $(LIB2ADDEH) \ - $(LIB2ADDEHDEP) $(EXTRA_PARTS) $(srcdir)/config/$(LIB1ASMSRC) + tsystem.h $(FPBIT) $(DPBIT) $(TPBIT) $(LIB2ADD) \ + $(LIB2ADD_ST) $(LIB2ADDEH) $(LIB2ADDEHDEP) $(EXTRA_PARTS) \ + $(srcdir)/config/$(LIB1ASMSRC) libgcc.a: $(LIBGCC_DEPS) $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \ - HOST_PREFIX="$(HOST_PREFIX)" HOST_PREFIX_1="$(HOST_PREFIX_1)" \ + BUILD_PREFIX="$(BUILD_PREFIX)" BUILD_PREFIX_1="$(BUILD_PREFIX_1)" \ AR_FOR_TARGET="$(AR_FOR_TARGET)" \ AR_CREATE_FOR_TARGET="$(AR_CREATE_FOR_TARGET)" \ AR_FLAGS_FOR_TARGET="$(AR_FLAGS_FOR_TARGET)" \ @@ -1060,7 +1104,7 @@ s-mlib: $(srcdir)/genmultilib Makefile # Build multiple copies of libgcc.a, one for each target switch. stmp-multilib: $(LIBGCC_DEPS) $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \ - HOST_PREFIX="$(HOST_PREFIX)" HOST_PREFIX_1="$(HOST_PREFIX_1)" \ + BUILD_PREFIX="$(BUILD_PREFIX)" BUILD_PREFIX_1="$(BUILD_PREFIX_1)" \ AR_FOR_TARGET="$(AR_FOR_TARGET)" \ AR_CREATE_FOR_TARGET="$(AR_CREATE_FOR_TARGET)" \ AR_FLAGS_FOR_TARGET="$(AR_FLAGS_FOR_TARGET)" \ @@ -1132,8 +1176,9 @@ s-crt0: $(CRT0_S) $(MCRT0_S) $(GCC_PASSES) $(CONFIG_H) c-errors.o: c-errors.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(C_TREE_H) flags.h \ diagnostic.h $(TM_P_H) -c-parse.o : $(srcdir)/c-parse.c $(CONFIG_H) $(TREE_H) c-lex.h $(GGC_H) intl.h \ - $(C_TREE_H) input.h flags.h $(SYSTEM_H) toplev.h output.h $(CPPLIB_H) +c-parse.o : $(srcdir)/c-parse.c $(CONFIG_H) $(TREE_H) $(GGC_H) intl.h \ + $(C_TREE_H) input.h flags.h $(SYSTEM_H) toplev.h output.h $(CPPLIB_H) \ + gt-c-parse.h $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ -c $(srcdir)/c-parse.c $(OUTPUT_OPTION) @@ -1155,32 +1200,34 @@ $(srcdir)/c-parse.y: c-parse.in $(SHELL) $(srcdir)/move-if-change tmp-c-parse.y $(srcdir)/c-parse.y c-decl.o : c-decl.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(RTL_H) $(C_TREE_H) \ - $(GGC_H) $(TARGET_H) c-lex.h flags.h function.h output.h $(EXPR_H) \ - debug.h toplev.h intl.h $(TM_P_H) tree-inline.h $(TIMEVAR_H) c-pragma.h + $(GGC_H) $(TARGET_H) flags.h function.h output.h $(EXPR_H) \ + debug.h toplev.h intl.h $(TM_P_H) tree-inline.h $(TIMEVAR_H) c-pragma.h \ + gt-c-decl.h libfuncs.h except.h c-typeck.o : c-typeck.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(C_TREE_H) \ $(TARGET_H) flags.h intl.h output.h $(EXPR_H) $(RTL_H) toplev.h $(TM_P_H) c-lang.o : c-lang.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(C_TREE_H) \ - langhooks.h langhooks-def.h -c-lex.o : c-lex.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(RTL_H) c-lex.h \ - debug.h $(C_TREE_H) \ + $(GGC_H) langhooks.h $(LANGHOOKS_DEF_H) c-common.h gtype-c.h +c-lex.o : c-lex.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(RTL_H) \ + debug.h $(C_TREE_H) c-common.h real.h \ c-pragma.h input.h intl.h flags.h toplev.h output.h \ mbchar.h $(CPPLIB_H) $(EXPR_H) $(TM_P_H) c-objc-common.o : c-objc-common.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) \ $(C_TREE_H) $(RTL_H) insn-config.h integrate.h $(EXPR_H) $(C_TREE_H) \ flags.h toplev.h tree-inline.h diagnostic.h integrate.h $(VARRAY_H) \ - $(GGC_H) + langhooks.h $(GGC_H) gt-c-objc-common.h $(TARGET_H) c-aux-info.o : c-aux-info.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(C_TREE_H) \ flags.h toplev.h -c-convert.o : c-convert.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) flags.h toplev.h +c-convert.o : c-convert.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) flags.h toplev.h \ + $(C_COMMON_H) c-pragma.o: c-pragma.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) function.h \ - c-pragma.h toplev.h output.h $(GGC_H) $(TM_P_H) $(C_COMMON_H) + c-pragma.h toplev.h output.h $(GGC_H) $(TM_P_H) $(C_COMMON_H) gt-c-pragma.h mbchar.o: mbchar.c $(CONFIG_H) $(SYSTEM_H) mbchar.h graph.o: graph.c $(CONFIG_H) $(SYSTEM_H) toplev.h flags.h output.h $(RTL_H) \ function.h hard-reg-set.h $(BASIC_BLOCK_H) graph.h sbitmap.o: sbitmap.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) flags.h hard-reg-set.h \ $(BASIC_BLOCK_H) -COLLECT2_OBJS = collect2.o tlink.o hash.o intl.o underscore.o version.o +COLLECT2_OBJS = collect2.o tlink.o intl.o version.o COLLECT2_LIBS = @COLLECT2_LIBS@ collect2$(exeext): $(COLLECT2_OBJS) $(LIBDEPS) # Don't try modifying collect2 (aka ld) in place--it might be linking this. @@ -1194,44 +1241,36 @@ collect2.o : collect2.c $(CONFIG_H) $(SYSTEM_H) gstab.h intl.h \ -DTARGET_MACHINE=\"$(target_alias)\" \ -c $(srcdir)/collect2.c $(OUTPUT_OPTION) -tlink.o: tlink.c $(DEMANGLE_H) hash.h $(CONFIG_H) $(SYSTEM_H) collect2.h intl.h -hash.o: hash.c hash.h $(SYSTEM_H) toplev.h $(GCONFIG_H) - $(CC) -c $(ALL_CFLAGS) -DGENERATOR_FILE $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION) - -underscore.c: s-under ; @true - -s-under: $(GCC_PASSES) - echo "int xxy_us_dummy;" >tmp-dum.c - $(GCC_FOR_TARGET) -S tmp-dum.c - echo '/*WARNING: This file is automatically generated!*/' >tmp-under.c - if grep _xxy_us_dummy tmp-dum.s > /dev/null ; then \ - echo "int prepends_underscore = 1;" >>tmp-under.c; \ - else \ - echo "int prepends_underscore = 0;" >>tmp-under.c; \ - fi - $(SHELL) $(srcdir)/move-if-change tmp-under.c underscore.c - -rm -f tmp-dum.c tmp-dum.s - $(STAMP) s-under +tlink.o: tlink.c $(DEMANGLE_H) $(HASHTAB_H) $(CONFIG_H) $(SYSTEM_H) \ + $(OBSTACK_H) collect2.h intl.h # A file used by all variants of C. c-common.o : c-common.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(OBSTACK_H) \ $(C_COMMON_H) flags.h toplev.h output.h c-pragma.h $(RTL_H) $(GGC_H) \ $(EXPR_H) $(TM_P_H) builtin-types.def builtin-attrs.def $(TARGET_H) \ - diagnostic.h tree-inline.h $(LANGHOOKS_DEF_H) + diagnostic.h except.h gt-c-common.h real.h langhooks.h c-tree.h +c-pretty-print.o : c-pretty-print.c c-pretty-print.h pretty-print.h \ + $(C_COMMON_H) $(CONFIG_H) $(SYSTEM_H) real.h + +c-opts.o : c-opts.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(C_COMMON_H) \ + c-pragma.h flags.h toplev.h langhooks.h tree-inline.h diagnostic.h \ + intl.h # A file used by all variants of C and some other languages. -attribs.o : attribs.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(OBSTACK_H) flags.h \ +attribs.o : attribs.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) flags.h \ toplev.h output.h c-pragma.h $(RTL_H) $(GGC_H) $(EXPR_H) $(TM_P_H) \ - builtin-types.def $(TARGET_H) + builtin-types.def $(TARGET_H) langhooks.h -c-format.o : c-format.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) \ +c-format.o : c-format.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) langhooks.h \ $(C_COMMON_H) flags.h toplev.h intl.h diagnostic.h c-semantics.o : c-semantics.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(C_TREE_H) \ - c-lex.h flags.h toplev.h output.h c-pragma.h $(RTL_H) $(GGC_H) \ - $(EXPR_H) + flags.h toplev.h output.h c-pragma.h $(RTL_H) $(GGC_H) \ + $(EXPR_H) $(PREDICT_H) + +c-dump.o : c-dump.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(C_TREE_H) tree-dump.h # Language-independent files. @@ -1242,6 +1281,7 @@ DRIVER_DEFINES = \ -DDEFAULT_TARGET_MACHINE=\"$(target_alias)\" \ -DSTANDARD_BINDIR_PREFIX=\"$(bindir)/\" \ -DTOOLDIR_BASE_PREFIX=\"$(unlibsubdir)/../\" \ + $(VALGRIND_DRIVER_DEFINES) \ `test "X$${SHLIB_LINK}" = "X" || test "@enable_shared@" != "yes" || echo "-DENABLE_SHARED_LIBGCC"` \ `test "X$${SHLIB_MULTILIB}" = "X" || echo "-DNO_SHARED_LIBGCC_MULTILIB"` @@ -1264,7 +1304,7 @@ cppspec.o: cppspec.c $(CONFIG_H) $(SYSTEM_H) $(GCC_H) tree-check.h: s-check ; @true s-check : gencheck$(build_exeext) $(srcdir)/move-if-change - ./gencheck$(build_exeext) > tmp-check.h + $(RUN_GEN) ./gencheck$(build_exeext) > tmp-check.h $(SHELL) $(srcdir)/move-if-change tmp-check.h tree-check.h $(STAMP) s-check @@ -1305,17 +1345,23 @@ dumpvers: dumpvers.c version.o: version.c version.h +gtype-desc.o: gtype-desc.c $(CONFIG_H) $(SYSTEM_H) varray.h $(HASHTAB_H) \ + $(TREE_H) $(RTL_H) function.h insn-config.h $(EXPR_H) $(OPTABS_H) \ + libfuncs.h debug.h $(GGC_H) bitmap.h $(BASIC_BLOCK_H) hard-reg-set.h \ + ssa.h cselib.h insn-addr.h + ggc-common.o: ggc-common.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) \ - flags.h $(GGC_H) varray.h hash.h $(HASHTAB_H) $(TM_P_H) + flags.h $(GGC_H) varray.h $(HASHTAB_H) $(TM_P_H) langhooks.h \ + $(PARAMS_H) ggc-simple.o: ggc-simple.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h \ - $(GGC_H) varray.h $(TIMEVAR_H) $(TM_P_H) + $(GGC_H) varray.h $(TIMEVAR_H) $(TM_P_H) $(PARAMS_H) ggc-page.o: ggc-page.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h \ - toplev.h $(GGC_H) varray.h $(TIMEVAR_H) $(TM_P_H) + toplev.h $(GGC_H) $(TIMEVAR_H) $(TM_P_H) stringpool.o: stringpool.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(OBSTACK_H) \ - flags.h toplev.h + flags.h toplev.h $(GGC_H) hashtable.o: hashtable.c hashtable.h $(CONFIG_H) $(SYSTEM_H) $(OBSTACK_H) @@ -1329,13 +1375,15 @@ prefix.o: prefix.c $(CONFIG_H) $(SYSTEM_H) Makefile prefix.h -DPREFIX=\"$(prefix)\" \ -c $(srcdir)/prefix.c $(OUTPUT_OPTION) -convert.o: convert.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) flags.h convert.h toplev.h +convert.o: convert.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) flags.h convert.h \ + toplev.h langhooks.h langhooks.o : langhooks.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) toplev.h \ tree-inline.h $(RTL_H) insn-config.h integrate.h langhooks.h \ $(LANGHOOKS_DEF_H) flags.h tree.o : tree.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) flags.h function.h toplev.h \ - $(GGC_H) $(HASHTAB_H) $(TARGET_H) output.h $(TM_P_H) langhooks.h + $(GGC_H) $(HASHTAB_H) $(TARGET_H) output.h $(TM_P_H) langhooks.h \ + real.h gt-tree.h tree-dump.o: tree-dump.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(C_TREE_H) \ flags.h langhooks.h toplev.h output.h c-pragma.h $(RTL_H) $(GGC_H) \ $(EXPR_H) $(SPLAY_TREE_H) tree-dump.h @@ -1344,21 +1392,22 @@ tree-inline.o : tree-inline.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(RTL_H) \ $(VARRAY_H) $(HASHTAB_H) $(SPLAY_TREE_H) toplev.h langhooks.h \ $(C_COMMON_H) tree-inline.h print-tree.o : print-tree.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(GGC_H) \ - langhooks.h + langhooks.h real.h stor-layout.o : stor-layout.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) flags.h \ - function.h $(EXPR_H) $(RTL_H) toplev.h $(GGC_H) $(TM_P_H) $(TARGET_H) -fold-const.o : fold-const.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) flags.h \ - toplev.h $(HASHTAB_H) $(EXPR_H) $(RTL_H) $(GGC_H) $(TM_P_H) + function.h $(EXPR_H) $(RTL_H) toplev.h $(GGC_H) $(TM_P_H) $(TARGET_H) \ + langhooks.h +fold-const.o : fold-const.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) flags.h real.h \ + toplev.h $(HASHTAB_H) $(EXPR_H) $(RTL_H) $(GGC_H) $(TM_P_H) langhooks.h diagnostic.o : diagnostic.c diagnostic.h real.h diagnostic.def \ $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(TM_P_H) flags.h $(GGC_H) \ - input.h toplev.h intl.h + input.h toplev.h intl.h langhooks.h $(LANGHOOKS_DEF_H) toplev.o : toplev.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(RTL_H) function.h \ flags.h xcoffout.h input.h $(INSN_ATTR_H) output.h diagnostic.h \ debug.h insn-config.h intl.h $(RECOG_H) Makefile toplev.h \ dwarf2out.h sdbout.h dbxout.h $(EXPR_H) hard-reg-set.h $(BASIC_BLOCK_H) \ graph.h $(LOOP_H) except.h $(REGS_H) $(TIMEVAR_H) $(lang_options_files) \ - ssa.h $(PARAMS_H) $(TM_P_H) reload.h dwarf2asm.h $(TARGET_H) halfpic.h \ - langhooks.h insn-flags.h options.h + ssa.h $(PARAMS_H) $(TM_P_H) reload.h dwarf2asm.h $(TARGET_H) \ + langhooks.h insn-flags.h options.h cfglayout.h real.h $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ -DTARGET_NAME=\"$(target_alias)\" \ -c $(srcdir)/toplev.c $(OUTPUT_OPTION) @@ -1370,69 +1419,73 @@ rtl-error.o: rtl-error.c system.h $(RTL_H) $(INSN_ATTR_H) insn-config.h \ rtl.o : rtl.c $(GCONFIG_H) $(SYSTEM_H) $(RTL_H) real.h $(GGC_H) errors.h $(CC) -c $(ALL_CFLAGS) -DGENERATOR_FILE $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION) -print-rtl.o : print-rtl.c $(GCONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) \ - hard-reg-set.h $(BASIC_BLOCK_H) - $(CC) -c $(ALL_CFLAGS) -DGENERATOR_FILE $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION) +print-rtl.o : print-rtl.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) \ + hard-reg-set.h $(BASIC_BLOCK_H) real.h +rtlanal.o : rtlanal.c $(CONFIG_H) $(SYSTEM_H) toplev.h $(RTL_H) \ + hard-reg-set.h $(TM_P_H) insn-config.h $(RECOG_H) real.h flags.h -rtlanal.o : rtlanal.c $(CONFIG_H) $(SYSTEM_H) toplev.h $(RTL_H) hard-reg-set.h $(TM_P_H) errors.o : errors.c $(GCONFIG_H) $(SYSTEM_H) errors.h $(CC) -c $(ALL_CFLAGS) -DGENERATOR_FILE $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION) varasm.o : varasm.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(RTL_H) flags.h \ - function.h $(EXPR_H) hard-reg-set.h $(REGS_H) $(OBSTACK_H) \ + function.h $(EXPR_H) hard-reg-set.h $(REGS_H) \ output.h c-pragma.h toplev.h xcoffout.h debug.h $(GGC_H) $(TM_P_H) \ - $(HASHTAB_H) $(TARGET_H) langhooks.h + $(HASHTAB_H) $(TARGET_H) langhooks.h gt-varasm.h real.h function.o : function.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h \ function.h $(EXPR_H) libfuncs.h $(REGS_H) hard-reg-set.h \ - insn-config.h $(RECOG_H) output.h toplev.h except.h hash.h $(GGC_H) \ - $(TM_P_H) langhooks.h + insn-config.h $(RECOG_H) output.h toplev.h except.h $(HASHTAB_H) $(GGC_H) \ + $(TM_P_H) langhooks.h gt-function.h stmt.o : stmt.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h function.h \ insn-config.h hard-reg-set.h $(EXPR_H) libfuncs.h except.h \ - $(LOOP_H) $(RECOG_H) toplev.h output.h varray.h $(GGC_H) $(TM_P_H) + $(LOOP_H) $(RECOG_H) toplev.h output.h varray.h $(GGC_H) $(TM_P_H) \ + langhooks.h $(PREDICT_H) gt-stmt.h except.o : except.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h \ - except.h function.h $(EXPR_H) libfuncs.h integrate.h \ + except.h function.h $(EXPR_H) libfuncs.h integrate.h langhooks.h \ insn-config.h hard-reg-set.h $(BASIC_BLOCK_H) output.h \ - dwarf2asm.h dwarf2out.h toplev.h $(HASHTAB_H) intl.h $(GGC_H) + dwarf2asm.h dwarf2out.h toplev.h $(HASHTAB_H) intl.h $(GGC_H) \ + gt-except.h expr.o : expr.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h function.h \ $(REGS_H) $(EXPR_H) $(OPTABS_H) libfuncs.h insn-attr.h insn-config.h \ $(RECOG_H) output.h typeclass.h hard-reg-set.h toplev.h hard-reg-set.h \ - except.h reload.h $(GGC_H) langhooks.h intl.h $(TM_P_H) + except.h reload.h $(GGC_H) langhooks.h intl.h $(TM_P_H) real.h builtins.o : builtins.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h \ $(TARGET_H) function.h $(REGS_H) $(EXPR_H) $(OPTABS_H) insn-config.h \ $(RECOG_H) output.h typeclass.h hard-reg-set.h toplev.h hard-reg-set.h \ - except.h $(TM_P_H) $(PREDICT_H) libfuncs.h -calls.o : calls.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h $(EXPR_H) \ - libfuncs.h $(REGS_H) toplev.h output.h function.h $(TIMEVAR_H) $(TM_P_H) + except.h $(TM_P_H) $(PREDICT_H) libfuncs.h real.h langhooks.h +calls.o : calls.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h \ + $(EXPR_H) langhooks.h $(TARGET_H) \ + libfuncs.h $(REGS_H) toplev.h output.h function.h $(TIMEVAR_H) $(TM_P_H) \ + except.h expmed.o : expmed.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h \ insn-config.h $(EXPR_H) $(OPTABS_H) $(RECOG_H) real.h \ - toplev.h $(TM_P_H) + toplev.h $(TM_P_H) langhooks.h explow.o : explow.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h \ hard-reg-set.h insn-config.h $(EXPR_H) $(OPTABS_H) $(RECOG_H) \ - toplev.h function.h ggc.h $(TM_P_H) + toplev.h function.h ggc.h $(TM_P_H) gt-explow.h optabs.o : optabs.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h \ insn-config.h $(EXPR_H) $(OPTABS_H) libfuncs.h $(RECOG_H) reload.h \ - toplev.h $(GGC_H) real.h $(TM_P_H) except.h hard-reg-set.h $(BASIC_BLOCK_H) + toplev.h $(GGC_H) real.h $(TM_P_H) except.h gt-optabs.h $(BASIC_BLOCK_H) dbxout.o : dbxout.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(RTL_H) flags.h \ $(REGS_H) debug.h $(TM_P_H) $(TARGET_H) function.h langhooks.h \ insn-config.h reload.h gstab.h xcoffout.h output.h dbxout.h toplev.h -debug.o : debug.c $(CONFIG_H) $(SYSTEM_H) +debug.o : debug.c debug.h $(CONFIG_H) $(SYSTEM_H) sdbout.o : sdbout.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(RTL_H) flags.h \ function.h $(EXPR_H) output.h hard-reg-set.h $(REGS_H) real.h \ - insn-config.h $(OBSTACK_H) xcoffout.h c-pragma.h ggc.h \ - sdbout.h toplev.h $(TM_P_H) except.h debug.h + insn-config.h xcoffout.h c-pragma.h ggc.h \ + sdbout.h toplev.h $(TM_P_H) except.h debug.h langhooks.h gt-sdbout.h dwarfout.o : dwarfout.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(RTL_H) dwarf.h \ flags.h insn-config.h reload.h output.h toplev.h $(TM_P_H) \ debug.h langhooks.h dwarf2out.o : dwarf2out.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(RTL_H) dwarf2.h \ - debug.h flags.h insn-config.h reload.h output.h diagnostic.h \ + debug.h flags.h insn-config.h reload.h output.h diagnostic.h real.h \ hard-reg-set.h $(REGS_H) $(EXPR_H) libfuncs.h toplev.h dwarf2out.h varray.h \ - $(GGC_H) except.h dwarf2asm.h $(TM_P_H) langhooks.h + $(GGC_H) except.h dwarf2asm.h $(TM_P_H) langhooks.h $(HASHTAB_H) gt-dwarf2out.h dwarf2asm.o : dwarf2asm.c $(CONFIG_H) $(SYSTEM_H) flags.h $(RTL_H) $(TREE_H) \ - output.h dwarf2asm.h $(TM_P_H) + output.h dwarf2asm.h $(TM_P_H) $(GGC_H) vmsdbgout.o : vmsdbgout.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(RTL_H) flags.h \ - output.h vmsdbg.h debug.h langhooks.h + output.h vmsdbg.h debug.h langhooks.h function.h xcoffout.o : xcoffout.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(RTL_H) xcoffout.h \ - flags.h toplev.h output.h dbxout.h $(GGC_H) + flags.h toplev.h output.h dbxout.h $(GGC_H) $(TARGET_H) emit-rtl.o : emit-rtl.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h \ function.h $(REGS_H) insn-config.h $(RECOG_H) real.h $(GGC_H) \ $(EXPR_H) $(srcdir)/../include/obstack.h hard-reg-set.h bitmap.h toplev.h \ @@ -1441,23 +1494,23 @@ real.o : real.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) toplev.h $(TM_P_H) integrate.o : integrate.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h \ debug.h $(INTEGRATE_H) insn-config.h $(EXPR_H) real.h $(REGS_H) \ intl.h function.h output.h $(RECOG_H) except.h toplev.h $(LOOP_H) \ - $(PARAMS_H) $(TM_P_H) $(TARGET_H) + $(PARAMS_H) $(TM_P_H) $(TARGET_H) langhooks.h gt-integrate.h jump.o : jump.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) flags.h hard-reg-set.h $(REGS_H) \ insn-config.h $(RECOG_H) $(EXPR_H) real.h except.h function.h \ toplev.h $(INSN_ATTR_H) $(TM_P_H) reload.h $(PREDICT_H) simplify-rtx.o : simplify-rtx.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(REGS_H) \ hard-reg-set.h flags.h real.h insn-config.h $(RECOG_H) $(EXPR_H) toplev.h \ - output.h function.h $(GGC_H) $(OBSTACK_H) $(TM_P_H) + output.h function.h $(GGC_H) $(OBSTACK_H) $(TM_P_H) $(TREE_H) cselib.o : cselib.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(REGS_H) \ hard-reg-set.h flags.h real.h insn-config.h $(RECOG_H) $(EXPR_H) toplev.h \ - output.h function.h cselib.h $(GGC_H) $(OBSTACK_H) $(TM_P_H) + output.h function.h cselib.h $(GGC_H) $(TM_P_H) gt-cselib.h cse.o : cse.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(REGS_H) hard-reg-set.h flags.h \ real.h insn-config.h $(RECOG_H) $(EXPR_H) toplev.h output.h function.h \ - $(BASIC_BLOCK_H) $(GGC_H) $(TM_P_H) + $(BASIC_BLOCK_H) $(GGC_H) $(TM_P_H) $(TIMEVAR_H) gcse.o : gcse.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(REGS_H) hard-reg-set.h \ flags.h real.h insn-config.h ggc.h $(RECOG_H) $(EXPR_H) $(BASIC_BLOCK_H) \ - function.h output.h toplev.h $(TM_P_H) $(PARAMS_H) except.h + function.h output.h toplev.h $(TM_P_H) $(PARAMS_H) except.h gt-gcse.h sibcall.o : sibcall.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(REGS_H) function.h \ hard-reg-set.h flags.h insn-config.h $(RECOG_H) $(BASIC_BLOCK_H) resource.o : resource.c $(CONFIG_H) $(RTL_H) hard-reg-set.h $(SYSTEM_H) \ @@ -1466,7 +1519,7 @@ resource.o : resource.c $(CONFIG_H) $(RTL_H) hard-reg-set.h $(SYSTEM_H) \ lcm.o : lcm.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(REGS_H) hard-reg-set.h flags.h \ real.h insn-config.h $(INSN_ATTR_H) $(RECOG_H) $(EXPR_H) $(BASIC_BLOCK_H) \ $(TM_P_H) df.h -ssa.o : ssa.c $(CONFIG_H) $(SYSTEM_H) $(REGS_H) varray.h $(EXPR_H) \ +ssa.o : ssa.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(REGS_H) varray.h $(EXPR_H) \ hard-reg-set.h flags.h function.h real.h insn-config.h $(RECOG_H) \ $(BASIC_BLOCK_H) output.h ssa.h ssa-dce.o : ssa-dce.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) hard-reg-set.h \ @@ -1481,7 +1534,8 @@ conflict.o : conflict.c $(CONFIG_H) $(SYSTEM_H) $(OBSTACK_H) $(HASHTAB_H) \ $(RTL_H) hard-reg-set.h $(BASIC_BLOCK_H) profile.o : profile.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h \ insn-config.h output.h $(REGS_H) $(EXPR_H) function.h \ - gcov-io.h toplev.h $(GGC_H) hard-reg-set.h $(BASIC_BLOCK_H) $(TARGET_H) + gcov-io.h toplev.h $(GGC_H) hard-reg-set.h $(BASIC_BLOCK_H) $(TARGET_H) \ + langhooks.h profile.h libfuncs.h gt-profile.h loop.o : loop.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) flags.h $(LOOP_H) \ insn-config.h $(REGS_H) hard-reg-set.h $(RECOG_H) $(EXPR_H) \ real.h $(PREDICT_H) $(BASIC_BLOCK_H) function.h \ @@ -1490,7 +1544,7 @@ doloop.o : doloop.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) flags.h $(LOOP_H) \ $(EXPR_H) hard-reg-set.h $(BASIC_BLOCK_H) $(TM_P_H) toplev.h unroll.o : unroll.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) insn-config.h function.h \ $(INTEGRATE_H) $(REGS_H) $(RECOG_H) flags.h $(EXPR_H) $(LOOP_H) toplev.h \ - hard-reg-set.h varray.h $(BASIC_BLOCK_H) $(TM_P_H) $(PREDICT_H) + hard-reg-set.h varray.h $(BASIC_BLOCK_H) $(TM_P_H) $(PREDICT_H) $(PARAMS_H) flow.o : flow.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h insn-config.h \ $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h output.h toplev.h $(RECOG_H) \ function.h except.h $(EXPR_H) ssa.h $(GGC_H) $(TM_P_H) @@ -1499,19 +1553,20 @@ cfg.o : cfg.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) flags.h insn-config.h \ function.h except.h $(GGC_H) $(TM_P_H) cfgrtl.o : cfgrtl.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) flags.h insn-config.h \ $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h output.h toplev.h $(RECOG_H) \ - function.h except.h $(GGC_H) $(TM_P_H) + function.h except.h $(GGC_H) $(TM_P_H) insn-config.h cfganal.o : cfganal.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(BASIC_BLOCK_H) \ hard-reg-set.h insn-config.h $(RECOG_H) $(GGC_H) $(TM_P_H) cfgbuild.o : cfgbuild.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) flags.h insn-config.h \ $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h output.h toplev.h $(RECOG_H) \ - function.h except.h $(GGC_H) + function.h except.h $(GGC_H) cfgcleanup.o : cfgcleanup.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TIMEVAR_H)\ $(BASIC_BLOCK_H) hard-reg-set.h output.h flags.h $(RECOG_H) toplev.h \ - $(GGC_H) insn-config.h cselib.h $(TARGET_H) $(TM_P_H) + $(GGC_H) insn-config.h cselib.h $(TARGET_H) $(TM_P_H) $(PARAMS_H) cfgloop.o : cfgloop.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) \ $(BASIC_BLOCK_H) hard-reg-set.h dominance.o : dominance.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) hard-reg-set.h \ - $(BASIC_BLOCK_H) + $(BASIC_BLOCK_H) et-forest.h +et-forest.o : et-forest.c $(CONFIG_H) $(SYSTEM_H) et-forest.h combine.o : combine.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) flags.h function.h \ insn-config.h $(INSN_ATTR_H) $(REGS_H) $(EXPR_H) \ $(BASIC_BLOCK_H) $(RECOG_H) real.h hard-reg-set.h toplev.h $(TM_P_H) @@ -1521,14 +1576,27 @@ regclass.o : regclass.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) hard-reg-set.h flags.h local-alloc.o : local-alloc.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) flags.h \ $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h insn-config.h $(RECOG_H) \ output.h function.h $(INSN_ATTR_H) toplev.h except.h $(TM_P_H) -bitmap.o : bitmap.c $(GCONFIG_H) $(SYSTEM_H) $(RTL_H) flags.h $(BASIC_BLOCK_H) \ - $(REGS_H) +bitmap.o : bitmap.c $(GCONFIG_H) $(SYSTEM_H) $(RTL_H) flags.h \ + $(BASIC_BLOCK_H) $(REGS_H) $(GGC_H) $(CC) -c $(ALL_CFLAGS) -DGENERATOR_FILE $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION) global.o : global.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) flags.h reload.h function.h \ $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h insn-config.h output.h toplev.h \ $(TM_P_H) -varray.o : varray.c $(CONFIG_H) $(SYSTEM_H) varray.h $(RTL_H) $(TREE_H) bitmap.h \ - errors.h +varray.o : varray.c $(CONFIG_H) $(SYSTEM_H) varray.h $(GGC_H) errors.h +ra.o : ra.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TM_P_H) insn-config.h \ + $(RECOG_H) integrate.h function.h $(REGS_H) $(OBSTACK_H) hard-reg-set.h \ + $(BASIC_BLOCK_H) df.h expr.h output.h toplev.h flags.h reload.h ra.h +ra-build.o : ra-build.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TM_P_H) \ + insn-config.h $(RECOG_H) function.h $(REGS_H) hard-reg-set.h \ + $(BASIC_BLOCK_H) df.h output.h ggc.h ra.h gt-ra-build.h reload.h +ra-colorize.o : ra-colorize.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TM_P_H) \ + function.h $(REGS_H) hard-reg-set.h $(BASIC_BLOCK_H) df.h output.h ra.h +ra-debug.o : ra-debug.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) insn-config.h \ + $(RECOG_H) function.h hard-reg-set.h $(BASIC_BLOCK_H) df.h output.h ra.h \ + $(TM_P_H) +ra-rewrite.o : ra-rewrite.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TM_P_H) \ + function.h $(REGS_H) hard-reg-set.h $(BASIC_BLOCK_H) df.h expr.h \ + output.h except.h ra.h reload.h insn-config.h reload.o : reload.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) flags.h output.h \ $(EXPR_H) $(OPTABS_H) reload.h $(RECOG_H) hard-reg-set.h insn-config.h \ $(REGS_H) function.h real.h toplev.h $(TM_P_H) @@ -1544,7 +1612,8 @@ reorg.o : reorg.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) conditions.h hard-reg-set.h \ $(RECOG_H) function.h flags.h output.h $(EXPR_H) toplev.h $(PARAMS_H) $(TM_P_H) alias.o : alias.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) flags.h hard-reg-set.h \ $(BASIC_BLOCK_H) $(REGS_H) toplev.h output.h $(EXPR_H) \ - $(GGC_H) function.h cselib.h $(TREE_H) $(TM_P_H) langhooks.h + $(GGC_H) function.h cselib.h $(TREE_H) $(TM_P_H) langhooks.h $(TARGET_H) \ + gt-alias.h regmove.o : regmove.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) insn-config.h \ $(RECOG_H) output.h $(REGS_H) hard-reg-set.h flags.h function.h \ $(EXPR_H) $(BASIC_BLOCK_H) toplev.h $(TM_P_H) except.h reload.h @@ -1556,28 +1625,33 @@ sched-deps.o : sched-deps.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) sched-int.h \ $(INSN_ATTR_H) toplev.h $(RECOG_H) except.h cselib.h $(PARAMS_H) $(TM_P_H) sched-rgn.o : sched-rgn.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) sched-int.h \ $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h flags.h insn-config.h function.h \ - $(INSN_ATTR_H) toplev.h $(RECOG_H) except.h $(TM_P_H) + $(INSN_ATTR_H) toplev.h $(RECOG_H) except.h $(TM_P_H) $(TARGET_H) sched-ebb.o : sched-ebb.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) sched-int.h \ $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h flags.h insn-config.h function.h \ $(INSN_ATTR_H) toplev.h $(RECOG_H) except.h $(TM_P_H) sched-vis.o : sched-vis.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) sched-int.h \ - hard-reg-set.h $(BASIC_BLOCK_H) $(INSN_ATTR_H) $(REGS_H) $(TM_P_H) + hard-reg-set.h $(BASIC_BLOCK_H) $(INSN_ATTR_H) $(REGS_H) $(TM_P_H) \ + $(TARGET_H) real.h final.o : final.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h intl.h \ $(REGS_H) $(RECOG_H) conditions.h insn-config.h $(INSN_ATTR_H) function.h \ - real.h output.h hard-reg-set.h except.h debug.h xcoffout.h \ + real.h output.h hard-reg-set.h except.h debug.h xcoffout.h profile.h \ toplev.h reload.h dwarf2out.h $(BASIC_BLOCK_H) $(TM_P_H) $(TARGET_H) $(EXPR_H) recog.o : recog.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) function.h $(BASIC_BLOCK_H) \ $(REGS_H) $(RECOG_H) $(EXPR_H) hard-reg-set.h flags.h insn-config.h \ $(INSN_ATTR_H) real.h toplev.h output.h reload.h $(TM_P_H) reg-stack.o : reg-stack.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) $(RECOG_H) \ $(REGS_H) hard-reg-set.h flags.h insn-config.h toplev.h reload.h \ - varray.h function.h $(TM_P_H) + varray.h function.h $(TM_P_H) $(GGC_H) gt-reg-stack.h predict.o: predict.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h \ insn-config.h $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h output.h toplev.h \ - $(RECOG_H) function.h except.h $(EXPR_H) $(TM_P_H) $(PREDICT_H) + $(RECOG_H) function.h except.h $(EXPR_H) $(TM_P_H) $(PREDICT_H) real.h \ + $(PARAMS_H) $(TARGET_H) lists.o: lists.c $(CONFIG_H) $(SYSTEM_H) toplev.h $(RTL_H) $(GGC_H) bb-reorder.o : bb-reorder.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) \ flags.h $(BASIC_BLOCK_H) hard-reg-set.h output.h cfglayout.h $(TARGET_H) +tracer.o : tracer.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) \ + $(BASIC_BLOCK_H) hard-reg-set.h output.h cfglayout.h flags.h \ + $(PARAMS_H) profile.h cfglayout.o : cfglayout.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) \ insn-config.h $(BASIC_BLOCK_H) hard-reg-set.h output.h function.h \ cfglayout.h @@ -1587,9 +1661,7 @@ regrename.o : regrename.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) insn-config.h \ resource.h $(OBSTACK_H) flags.h $(TM_P_H) ifcvt.o : ifcvt.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(REGS_H) toplev.h \ flags.h insn-config.h function.h $(RECOG_H) $(BASIC_BLOCK_H) $(EXPR_H) \ - output.h except.h $(TM_P_H) -dependence.o : dependence.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) \ - $(C_COMMON_H) flags.h varray.h $(EXPR_H) + output.h except.h $(TM_P_H) real.h params.o : params.c $(CONFIG_H) $(SYSTEM_H) $(PARAMS_H) toplev.h hooks.o: hooks.c $(CONFIG_H) $(SYSTEM_H) $(HOOKS_H) @@ -1612,9 +1684,6 @@ mips-tdump: mips-tdump.o version.o $(LIBDEPS) mips-tdump.o : mips-tdump.c $(CONFIG_H) $(RTL_H) $(SYSTEM_H) -# Build file to support OSF/rose half-pic format. -halfpic.o: halfpic.c $(CONFIG_H) $(RTL_H) $(TREE_H) $(SYSTEM_H) halfpic.h - # # Generate header and source files from the machine description, # and compile them. @@ -1644,25 +1713,40 @@ halfpic.o: halfpic.c $(CONFIG_H) $(RTL_H) $(TREE_H) $(SYSTEM_H) halfpic.h insn-config.h: s-config ; @true s-config : $(md_file) genconfig$(build_exeext) $(srcdir)/move-if-change - ./genconfig$(build_exeext) $(md_file) > tmp-config.h + $(RUN_GEN) ./genconfig$(build_exeext) $(md_file) > tmp-config.h $(SHELL) $(srcdir)/move-if-change tmp-config.h insn-config.h $(STAMP) s-config +insn-conditions.c: s-conditions ; @true +s-conditions : $(md_file) genconditions$(build_exeext) $(srcdir)/move-if-change + $(RUN_GEN) ./genconditions$(build_exeext) $(md_file) > tmp-conditions.c + $(SHELL) $(srcdir)/move-if-change tmp-conditions.c insn-conditions.c + $(STAMP) s-conditions + +insn-conditions.o : insn-conditions.c $(GCONFIG_H) $(SYSTEM_H) $(RTL_H) \ + $(TM_P_H) $(REGS_H) function.h $(RECOG_H) real.h output.h flags.h \ + hard-reg-set.h resource.h toplev.h reload.h gensupport.h insn-constants.h + $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) insn-conditions.c + +dummy-conditions.o : dummy-conditions.c $(HCONFIG_H) $(SYSTEM_H) gensupport.h + $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \ + $(srcdir)/dummy-conditions.c $(OUTPUT_OPTION) + insn-flags.h: s-flags ; @true s-flags : $(md_file) genflags$(build_exeext) $(srcdir)/move-if-change - ./genflags$(build_exeext) $(md_file) > tmp-flags.h + $(RUN_GEN) ./genflags$(build_exeext) $(md_file) > tmp-flags.h $(SHELL) $(srcdir)/move-if-change tmp-flags.h insn-flags.h $(STAMP) s-flags insn-codes.h: s-codes ; @true s-codes : $(md_file) gencodes$(build_exeext) $(srcdir)/move-if-change - ./gencodes$(build_exeext) $(md_file) > tmp-codes.h + $(RUN_GEN) ./gencodes$(build_exeext) $(md_file) > tmp-codes.h $(SHELL) $(srcdir)/move-if-change tmp-codes.h insn-codes.h $(STAMP) s-codes insn-constants.h: s-constants ; @true s-constants : $(md_file) genconstants$(build_exeext) $(srcdir)/move-if-change - ./genconstants$(build_exeext) $(md_file) > tmp-constants.h + $(RUN_GEN) ./genconstants$(build_exeext) $(md_file) > tmp-constants.h $(SHELL) $(srcdir)/move-if-change tmp-constants.h insn-constants.h $(STAMP) s-constants @@ -1674,7 +1758,7 @@ insn-emit.o : insn-emit.c $(CONFIG_H) $(RTL_H) $(EXPR_H) real.h output.h \ insn-emit.c: s-emit ; @true s-emit : $(md_file) genemit$(build_exeext) $(srcdir)/move-if-change - ./genemit$(build_exeext) $(md_file) > tmp-emit.c + $(RUN_GEN) ./genemit$(build_exeext) $(md_file) > tmp-emit.c $(SHELL) $(srcdir)/move-if-change tmp-emit.c insn-emit.c $(STAMP) s-emit @@ -1686,7 +1770,7 @@ insn-recog.o : insn-recog.c $(CONFIG_H) $(RTL_H) insn-config.h $(RECOG_H) \ insn-recog.c: s-recog ; @true s-recog : $(md_file) genrecog$(build_exeext) $(srcdir)/move-if-change - ./genrecog$(build_exeext) $(md_file) > tmp-recog.c + $(RUN_GEN) ./genrecog$(build_exeext) $(md_file) > tmp-recog.c $(SHELL) $(srcdir)/move-if-change tmp-recog.c insn-recog.c $(STAMP) s-recog @@ -1697,7 +1781,7 @@ insn-opinit.o : insn-opinit.c $(CONFIG_H) $(RTL_H) \ insn-opinit.c: s-opinit ; @true s-opinit : $(md_file) genopinit$(build_exeext) $(srcdir)/move-if-change - ./genopinit$(build_exeext) $(md_file) > tmp-opinit.c + $(RUN_GEN) ./genopinit$(build_exeext) $(md_file) > tmp-opinit.c $(SHELL) $(srcdir)/move-if-change tmp-opinit.c insn-opinit.c $(STAMP) s-opinit @@ -1708,7 +1792,7 @@ insn-extract.o : insn-extract.c $(CONFIG_H) $(RTL_H) $(SYSTEM_H) toplev.h \ insn-extract.c: s-extract ; @true s-extract : $(md_file) genextract$(build_exeext) $(srcdir)/move-if-change - ./genextract$(build_exeext) $(md_file) > tmp-extract.c + $(RUN_GEN) ./genextract$(build_exeext) $(md_file) > tmp-extract.c $(SHELL) $(srcdir)/move-if-change tmp-extract.c insn-extract.c $(STAMP) s-extract @@ -1719,7 +1803,7 @@ insn-peep.o : insn-peep.c $(CONFIG_H) $(RTL_H) $(REGS_H) output.h real.h \ insn-peep.c: s-peep ; @true s-peep : $(md_file) genpeep$(build_exeext) $(srcdir)/move-if-change - ./genpeep$(build_exeext) $(md_file) > tmp-peep.c + $(RUN_GEN) ./genpeep$(build_exeext) $(md_file) > tmp-peep.c $(SHELL) $(srcdir)/move-if-change tmp-peep.c insn-peep.c $(STAMP) s-peep @@ -1731,13 +1815,13 @@ insn-attrtab.o : insn-attrtab.c $(CONFIG_H) $(RTL_H) $(REGS_H) real.h \ insn-attr.h: s-attr ; @true s-attr : $(md_file) genattr$(build_exeext) $(srcdir)/move-if-change - ./genattr$(build_exeext) $(md_file) > tmp-attr.h + $(RUN_GEN) ./genattr$(build_exeext) $(md_file) > tmp-attr.h $(SHELL) $(srcdir)/move-if-change tmp-attr.h insn-attr.h $(STAMP) s-attr insn-attrtab.c: s-attrtab ; @true s-attrtab : $(md_file) genattrtab$(build_exeext) $(srcdir)/move-if-change - ./genattrtab$(build_exeext) $(md_file) > tmp-attrtab.c + $(RUN_GEN) ./genattrtab$(build_exeext) $(md_file) > tmp-attrtab.c $(SHELL) $(srcdir)/move-if-change tmp-attrtab.c insn-attrtab.c $(STAMP) s-attrtab @@ -1750,7 +1834,7 @@ insn-output.o : insn-output.c $(CONFIG_H) $(RTL_H) $(GGC_H) $(REGS_H) real.h \ insn-output.c: s-output ; @true s-output : $(md_file) genoutput$(build_exeext) $(srcdir)/move-if-change - ./genoutput$(build_exeext) $(md_file) > tmp-output.c + $(RUN_GEN) ./genoutput$(build_exeext) $(md_file) > tmp-output.c $(SHELL) $(srcdir)/move-if-change tmp-output.c insn-output.c $(STAMP) s-output @@ -1759,19 +1843,83 @@ genrtl.c genrtl.h : s-genrtl @true # force gnu make to recheck modification times. s-genrtl: gengenrtl$(build_exeext) $(srcdir)/move-if-change $(RTL_BASE_H) - ./gengenrtl$(build_exeext) -h > tmp-genrtl.h + $(RUN_GEN) ./gengenrtl$(build_exeext) -h > tmp-genrtl.h $(SHELL) $(srcdir)/move-if-change tmp-genrtl.h genrtl.h - ./gengenrtl$(build_exeext) > tmp-genrtl.c + $(RUN_GEN) ./gengenrtl$(build_exeext) > tmp-genrtl.c $(SHELL) $(srcdir)/move-if-change tmp-genrtl.c genrtl.c $(STAMP) s-genrtl tm-preds.h: s-preds; @true s-preds: genpreds$(build_exeext) $(srcdir)/move-if-change - ./genpreds$(build_exeext) > tmp-preds.h + $(RUN_GEN) ./genpreds$(build_exeext) > tmp-preds.h $(SHELL) $(srcdir)/move-if-change tmp-preds.h tm-preds.h $(STAMP) s-preds +GTFILES = $(GCONFIG_H) $(srcdir)/location.h \ + $(HASHTAB_H) \ + $(srcdir)/bitmap.h $(srcdir)/function.h $(srcdir)/rtl.h $(srcdir)/optabs.h \ + $(srcdir)/tree.h $(srcdir)/libfuncs.h $(srcdir)/hashtable.h $(srcdir)/real.h \ + $(srcdir)/varray.h $(srcdir)/ssa.h $(srcdir)/insn-addr.h $(srcdir)/cselib.h \ + $(srcdir)/c-common.h $(srcdir)/c-tree.h \ + $(srcdir)/basic-block.h \ + $(srcdir)/alias.c $(srcdir)/bitmap.c $(srcdir)/cselib.c \ + $(srcdir)/dwarf2out.c $(srcdir)/emit-rtl.c \ + $(srcdir)/except.c $(srcdir)/explow.c $(srcdir)/expr.c \ + $(srcdir)/fold-const.c $(srcdir)/function.c \ + $(srcdir)/gcse.c $(srcdir)/integrate.c $(srcdir)/lists.c $(srcdir)/optabs.c \ + $(srcdir)/profile.c $(srcdir)/ra-build.c $(srcdir)/regclass.c \ + $(srcdir)/reg-stack.c \ + $(srcdir)/sdbout.c $(srcdir)/stmt.c $(srcdir)/stor-layout.c \ + $(srcdir)/tree.c $(srcdir)/varasm.c \ + $(out_file) \ + @all_gtfiles@ + +GTFILES_FILES_LANGS = @all_gtfiles_files_langs@ +GTFILES_FILES_FILES = @all_gtfiles_files_files@ +GTFILES_LANG_DIR_NAMES = @subdirs@ +GTFILES_SRCDIR = @srcdir@ + +gtype-desc.h gtype-desc.c gt-except.h gt-function.h : s-gtype; @true +gt-integrate.h gt-stmt.h gt-tree.h gt-varasm.h gt-emit-rtl.h : s-gtype; @true +gt-explow.h gt-stor-layout.h gt-regclass.h gt-lists.h : s-gtype; @true +gt-alias.h gt-cselib.h gt-fold-const.h gt-gcse.h gt-profile.h : s-gtype; @true +gt-expr.h gt-sdbout.h gt-optabs.h gt-bitmap.h gt-dwarf2out.h : s-gtype ; @true +gt-ra-build.h gt-reg-stack.h : s-gtype ; @true +gt-c-common.h gt-c-decl.h gt-c-parse.h gt-c-pragma.h : s-gtype; @true +gt-c-objc-common.h gtype-c.h gt-location.h : s-gtype ; @true + +gtyp-gen.h: Makefile + echo "/* This file is machine generated. Do not edit. */" > tmp-gtyp.h + echo "static const char *srcdir = " >> tmp-gtyp.h + echo "\"$(GTFILES_SRCDIR)\"" >> tmp-gtyp.h + echo ";" >> tmp-gtyp.h + echo "static const char *lang_files[] = {" >> tmp-gtyp.h + ll="$(GTFILES_FILES_FILES)"; \ + for f in $$ll; do \ + echo "\"$$f\", "; done >> tmp-gtyp.h + echo "NULL};" >> tmp-gtyp.h + echo "static const char *langs_for_lang_files[] = {" >> tmp-gtyp.h + ff="$(GTFILES_FILES_LANGS)"; \ + for f in $$ff; do \ + echo "\"$$f\", " ; done >> tmp-gtyp.h + echo "NULL};" >> tmp-gtyp.h + echo "static const char *all_files[] = {" >> tmp-gtyp.h + gf="$(GTFILES)"; \ + for f in $$gf; do \ + echo "\"$$f\", "; done >> tmp-gtyp.h + echo " NULL};" >> tmp-gtyp.h + echo "static const char *lang_dir_names[] = { \"c\", " >> tmp-gtyp.h + gf="$(GTFILES_LANG_DIR_NAMES)"; \ + for l in $$gf; do \ + echo "\"$$l\", "; done >> tmp-gtyp.h + echo "NULL};" >> tmp-gtyp.h + $(SHELL) $(srcdir)/move-if-change tmp-gtyp.h gtyp-gen.h + +s-gtype: gengtype$(build_exeext) $(GTFILES) + $(RUN_GEN) ./gengtype + $(STAMP) s-gtype + # # Compile the programs that generate insn-* from the machine description. # They are compiled with $(HOST_CC), and associated libraries, @@ -1790,93 +1938,123 @@ read-rtl.o: read-rtl.c $(HCONFIG_H) $(SYSTEM_H) $(RTL_H) \ gensupport.o: gensupport.c $(RTL_H) $(OBSTACK_H) $(SYSTEM_H) errors.h gensupport.h $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/gensupport.c $(OUTPUT_OPTION) -genconfig$(build_exeext) : genconfig.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBDEPS) +genconfig$(build_exeext) : genconfig.o $(HOST_RTL) $(HOST_SUPPORT) \ + $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBDEPS) $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \ - genconfig.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBS) + genconfig.o $(HOST_RTL) $(HOST_SUPPORT) $(HOST_PRINT) \ + $(HOST_ERRORS) $(HOST_LIBS) genconfig.o : genconfig.c $(RTL_H) $(HCONFIG_H) \ $(SYSTEM_H) errors.h gensupport.h $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genconfig.c $(OUTPUT_OPTION) -genflags$(build_exeext) : genflags.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBDEPS) +genflags$(build_exeext) : genflags.o $(HOST_RTL) $(HOST_SUPPORT) \ + $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBDEPS) $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \ - genflags.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBS) + genflags.o $(HOST_RTL) $(HOST_SUPPORT) $(HOST_PRINT) \ + $(HOST_ERRORS) $(HOST_LIBS) genflags.o : genflags.c $(RTL_H) $(OBSTACK_H) $(HCONFIG_H) \ $(SYSTEM_H) errors.h gensupport.h $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genflags.c $(OUTPUT_OPTION) -gencodes$(build_exeext) : gencodes.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBDEPS) +gencodes$(build_exeext) : gencodes.o $(HOST_RTL) $(HOST_SUPPORT) \ + $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBDEPS) $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \ - gencodes.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBS) + gencodes.o $(HOST_RTL) $(HOST_SUPPORT) $(HOST_PRINT) \ + $(HOST_ERRORS) $(HOST_LIBS) gencodes.o : gencodes.c $(RTL_H) $(HCONFIG_H) \ $(SYSTEM_H) errors.h gensupport.h $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/gencodes.c $(OUTPUT_OPTION) -genconstants$(build_exeext) : genconstants.o $(HOST_RTL) $(HOST_ERRORS) $(HOST_LIBDEPS) +genconstants$(build_exeext) : genconstants.o $(HOST_RTL) $(HOST_EARLY_SUPPORT) \ + $(HOST_ERRORS) $(HOST_LIBDEPS) $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \ - genconstants.o $(HOST_RTL) $(HOST_ERRORS) $(HOST_LIBS) + genconstants.o $(HOST_EARLY_SUPPORT) $(HOST_RTL) \ + $(HOST_ERRORS) $(HOST_LIBS) genconstants.o : genconstants.c $(RTL_H) $(HCONFIG_H) $(SYSTEM_H) errors.h $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genconstants.c $(OUTPUT_OPTION) -genemit$(build_exeext) : genemit.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBDEPS) +genemit$(build_exeext) : genemit.o $(HOST_RTL) $(HOST_SUPPORT) \ + $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBDEPS) $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \ - genemit.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBS) + genemit.o $(HOST_RTL) $(HOST_SUPPORT) $(HOST_PRINT) \ + $(HOST_ERRORS) $(HOST_LIBS) genemit.o : genemit.c $(RTL_H) $(HCONFIG_H) $(SYSTEM_H) errors.h gensupport.h $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genemit.c $(OUTPUT_OPTION) -genopinit$(build_exeext) : genopinit.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBDEPS) +genopinit$(build_exeext) : genopinit.o $(HOST_RTL) $(HOST_SUPPORT) \ + $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBDEPS) $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \ - genopinit.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBS) + genopinit.o $(HOST_RTL) $(HOST_SUPPORT) $(HOST_PRINT) \ + $(HOST_ERRORS) $(HOST_LIBS) genopinit.o : genopinit.c $(RTL_H) $(HCONFIG_H) \ $(SYSTEM_H) errors.h gensupport.h $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genopinit.c $(OUTPUT_OPTION) -genrecog$(build_exeext) : genrecog.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBDEPS) +genrecog$(build_exeext) : genrecog.o $(HOST_RTL) $(HOST_SUPPORT) \ + $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBDEPS) $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \ - genrecog.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBS) + genrecog.o $(HOST_RTL) $(HOST_SUPPORT) $(HOST_PRINT) \ + $(HOST_ERRORS) $(HOST_LIBS) genrecog.o : genrecog.c $(RTL_H) $(HCONFIG_H) \ $(SYSTEM_H) errors.h gensupport.h $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genrecog.c $(OUTPUT_OPTION) -genextract$(build_exeext) : genextract.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBDEPS) +genextract$(build_exeext) : genextract.o $(HOST_RTL) $(HOST_SUPPORT) \ + $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBDEPS) $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \ - genextract.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBS) + genextract.o $(HOST_RTL) $(HOST_SUPPORT) $(HOST_PRINT) \ + $(HOST_ERRORS) $(HOST_LIBS) genextract.o : genextract.c $(RTL_H) $(HCONFIG_H) \ $(SYSTEM_H) insn-config.h errors.h gensupport.h $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genextract.c $(OUTPUT_OPTION) -genpeep$(build_exeext) : genpeep.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBDEPS) +genpeep$(build_exeext) : genpeep.o $(HOST_RTL) $(HOST_SUPPORT) \ + $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBDEPS) $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \ - genpeep.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBS) + genpeep.o $(HOST_RTL) $(HOST_SUPPORT) $(HOST_PRINT) \ + $(HOST_ERRORS) $(HOST_LIBS) genpeep.o : genpeep.c $(RTL_H) $(HCONFIG_H) $(SYSTEM_H) errors.h gensupport.h $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genpeep.c $(OUTPUT_OPTION) -genattr$(build_exeext) : genattr.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBDEPS) +genattr$(build_exeext) : genattr.o $(HOST_RTL) $(HOST_SUPPORT) \ + $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBDEPS) $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \ - genattr.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBS) + genattr.o $(HOST_RTL) $(HOST_SUPPORT) $(HOST_PRINT) \ + $(HOST_ERRORS) $(HOST_LIBS) genattr.o : genattr.c $(RTL_H) $(HCONFIG_H) $(SYSTEM_H) errors.h gensupport.h $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genattr.c $(OUTPUT_OPTION) -genattrtab$(build_exeext) : genattrtab.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBDEPS) +genattrtab$(build_exeext) : genattrtab.o genautomata.o \ + $(HOST_RTL) $(HOST_SUPPORT) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_VARRAY) \ + $(HOST_LIBDEPS) $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \ - genattrtab.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBS) + genattrtab.o genautomata.o \ + $(HOST_RTL) $(HOST_SUPPORT) $(HOST_PRINT) $(HOST_ERRORS) \ + $(HOST_VARRAY) $(HOST_LIBS) -lm genattrtab.o : genattrtab.c $(RTL_H) $(OBSTACK_H) $(HCONFIG_H) \ - $(SYSTEM_H) errors.h $(GGC_H) gensupport.h + $(SYSTEM_H) errors.h $(GGC_H) gensupport.h genattrtab.h $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genattrtab.c $(OUTPUT_OPTION) -genoutput$(build_exeext) : genoutput.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBDEPS) +genautomata.o : genautomata.c $(RTL_H) $(OBSTACK_H) $(HCONFIG_H) \ + $(SYSTEM_H) errors.h varray.h genattrtab.h $(HASHTAB_H) + $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genautomata.c $(OUTPUT_OPTION) + +genoutput$(build_exeext) : genoutput.o $(HOST_RTL) $(HOST_SUPPORT) \ + $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBDEPS) $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \ - genoutput.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBS) + genoutput.o $(HOST_RTL) $(HOST_SUPPORT) $(HOST_PRINT) \ + $(HOST_ERRORS) $(HOST_LIBS) genoutput.o : genoutput.c $(RTL_H) $(HCONFIG_H) \ $(SYSTEM_H) errors.h gensupport.h @@ -1896,38 +2074,92 @@ genpreds$(build_exeext) : genpreds.o $(HOST_LIBDEPS) genpreds.o : genpreds.c $(RTL_BASE_H) $(HCONFIG_H) $(SYSTEM_H) $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genpreds.c $(OUTPUT_OPTION) +gengtype$(build_exeext) : gengtype.o gengtype-lex.o gengtype-yacc.o \ + $(HOST_LIBDEPS) + $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \ + gengtype.o gengtype-lex.o gengtype-yacc.o $(HOST_LIBS) + +gengtype.o : gengtype.c gengtype.h $(HCONFIG_H) $(SYSTEM_H) real.h rtl.def \ + gtyp-gen.h + $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \ + $(srcdir)/gengtype.c $(OUTPUT_OPTION) + +gengtype-lex.o : $(srcdir)/gengtype-lex.c gengtype.h $(srcdir)/gengtype-yacc.c \ + $(HCONFIG_H) $(SYSTEM_H) + $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \ + $(srcdir)/gengtype-lex.c $(OUTPUT_OPTION) + +gengtype-yacc.o : $(srcdir)/gengtype-yacc.c gengtype.h $(HCONFIG_H) $(SYSTEM_H) + $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \ + $(srcdir)/gengtype-yacc.c $(OUTPUT_OPTION) + +# The sed command works around a bug in flex-2.5.4. +$(srcdir)/gengtype-lex.c : $(srcdir)/gengtype-lex.l + cd $(srcdir) && \ + $(FLEX) $(FLEXFLAGS) -t -o$@ gengtype-lex.l | \ + sed 's/^\(char msg\[\];\)/yyconst \1/' > g-$$$$ ; \ + if test $$? -eq 0 ; then \ + mv -f g-$$$$ gengtype-lex.c ; \ + else \ + rm -f g-$$$$.* ; \ + false ; \ + fi + +$(srcdir)/gengtype-yacc.c: $(srcdir)/gengtype-yacc.y + (cd $(srcdir) && \ + $(BISON) $(BISONFLAGS) -d -o gengtype-yacc.c gengtype-yacc.y || \ + ( rm -f $@ && false ) ) + +genconditions$(build_exeext) : genconditions.o $(HOST_EARLY_SUPPORT) \ + $(HOST_RTL) $(HOST_ERRORS) $(HOST_LIBDEPS) + $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \ + genconditions.o $(HOST_EARLY_SUPPORT) $(HOST_RTL) \ + $(HOST_ERRORS) $(HOST_LIBS) + +genconditions.o : genconditions.c $(RTL_H) $(HCONFIG_H) $(SYSTEM_H) errors.h + $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \ + $(srcdir)/genconditions.c $(OUTPUT_OPTION) + # # Compile the libraries to be used by gen*. # If we are not cross-building, gen* use the same .o's that cc1 will use, -# and HOST_PREFIX_1 is `loser-', just to ensure these rules don't conflict +# and BUILD_PREFIX_1 is `loser-', just to ensure these rules don't conflict # with the rules for rtl.o, etc. -$(HOST_PREFIX_1)rtl.o: $(srcdir)/rtl.c $(HCONFIG_H) $(SYSTEM_H) $(RTL_H) \ +$(BUILD_PREFIX_1)rtl.o: $(srcdir)/rtl.c $(HCONFIG_H) $(SYSTEM_H) $(RTL_H) \ real.h $(GGC_H) errors.h - rm -f $(HOST_PREFIX)rtl.c - sed -e 's/config[.]h/hconfig.h/' $(srcdir)/rtl.c > $(HOST_PREFIX)rtl.c - $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)rtl.c $(OUTPUT_OPTION) + rm -f $(BUILD_PREFIX)rtl.c + sed -e 's/config[.]h/hconfig.h/' $(srcdir)/rtl.c > $(BUILD_PREFIX)rtl.c + $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(BUILD_PREFIX)rtl.c $(OUTPUT_OPTION) -$(HOST_PREFIX_1)print-rtl.o: $(srcdir)/print-rtl.c $(HCONFIG_H) \ +print-rtl1.o: $(srcdir)/print-rtl.c $(HCONFIG_H) \ $(RTL_H) $(TREE_H) hard-reg-set.h $(BASIC_BLOCK_H) - rm -f $(HOST_PREFIX)print-rtl.c - sed -e 's/config[.]h/hconfig.h/' $(srcdir)/print-rtl.c > $(HOST_PREFIX)print-rtl.c - $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)print-rtl.c $(OUTPUT_OPTION) - -$(HOST_PREFIX_1)bitmap.o: $(srcdir)/bitmap.c $(HCONFIG_H) $(SYSTEM_H) $(RTL_H) \ - flags.h $(BASIC_BLOCK_H) $(REGS_H) - rm -f $(HOST_PREFIX)bitmap.c - sed -e 's/config[.]h/hconfig.h/' $(srcdir)/bitmap.c > $(HOST_PREFIX)bitmap.c - $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)bitmap.c $(OUTPUT_OPTION) - -$(HOST_PREFIX_1)errors.o: errors.c $(HCONFIG_H) $(SYSTEM_H) errors.h - rm -f $(HOST_PREFIX)errors.c - sed -e 's/config[.]h/hconfig.h/' $(srcdir)/errors.c > $(HOST_PREFIX)errors.c - $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)errors.c $(OUTPUT_OPTION) - -$(HOST_PREFIX_1)ggc-none.o: ggc-none.c $(HCONFIG_H) $(SYSTEM_H) $(GCC_H) - rm -f $(HOST_PREFIX)ggc-none.c - sed -e 's/config[.]h/hconfig.h/' $(srcdir)/ggc-none.c > $(HOST_PREFIX)ggc-none.c - $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)ggc-none.c $(OUTPUT_OPTION) + rm -f print-rtl1.c + sed -e 's/config[.]h/hconfig.h/' $(srcdir)/print-rtl.c > print-rtl1.c + $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) print-rtl1.c $(OUTPUT_OPTION) + +$(BUILD_PREFIX_1)bitmap.o: $(srcdir)/bitmap.c $(HCONFIG_H) $(SYSTEM_H) \ + $(RTL_H) flags.h $(BASIC_BLOCK_H) $(REGS_H) $(GGC_H) + rm -f $(BUILD_PREFIX)bitmap.c + sed -e 's/config[.]h/hconfig.h/' $(srcdir)/bitmap.c > $(BUILD_PREFIX)bitmap.c + $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(BUILD_PREFIX)bitmap.c $(OUTPUT_OPTION) + +$(BUILD_PREFIX_1)errors.o: errors.c $(HCONFIG_H) $(SYSTEM_H) errors.h + rm -f $(BUILD_PREFIX)errors.c + sed -e 's/config[.]h/hconfig.h/' $(srcdir)/errors.c > $(BUILD_PREFIX)errors.c + $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(BUILD_PREFIX)errors.c $(OUTPUT_OPTION) + +$(BUILD_PREFIX_1)varray.o: varray.c $(HCONFIG_H) $(SYSTEM_H) varray.h \ + $(RTL_H) $(GGC_H) $(TREE_H) bitmap.h errors.h + rm -f $(BUILD_PREFIX)varray.c + sed -e 's/config[.]h/hconfig.h/' $(srcdir)/varray.c > \ + $(BUILD_PREFIX)varray.c + $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \ + $(BUILD_PREFIX)varray.c $(OUTPUT_OPTION) + +$(BUILD_PREFIX_1)ggc-none.o: ggc-none.c $(HCONFIG_H) $(SYSTEM_H) $(GGC_H) + rm -f $(BUILD_PREFIX)ggc-none.c + sed -e 's/config[.]h/hconfig.h/' $(srcdir)/ggc-none.c > $(BUILD_PREFIX)ggc-none.c + $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(BUILD_PREFIX)ggc-none.c $(OUTPUT_OPTION) # # Remake internationalization support. @@ -1953,7 +2185,7 @@ intl.all intl.install: config.h insn-flags.h insn-constants.h # Make-lang.in should add dependencies of po-generated on any generated # files which need to be scanned by gettext (usually Yacc-generated parsers). -po-generated: c-parse.c tradcif.c +po-generated: c-parse.c # # Remake cpp and protoize. @@ -1967,9 +2199,9 @@ PREPROCESSOR_DEFINES = \ -DCROSS_INCLUDE_DIR=\"$(gcc_tooldir)/sys-include\" \ -DTOOL_INCLUDE_DIR=\"$(gcc_tooldir)/include\" -LIBCPP_OBJS = cpplib.o cpplex.o cppmacro.o cppexp.o cppfiles.o \ - cpphash.o cpperror.o cppinit.o cppdefault.o \ - hashtable.o line-map.o mkdeps.o prefix.o version.o mbchar.o +LIBCPP_OBJS = cpplib.o cpplex.o cppmacro.o cppexp.o cppfiles.o cpptrad.o \ + cpphash.o cpperror.o cppinit.o cppdefault.o cppmain.o \ + hashtable.o line-map.o mkdeps.o prefix.o mbchar.o LIBCPP_DEPS = $(CPPLIB_H) cpphash.h line-map.h hashtable.h intl.h \ $(OBSTACK_H) $(SYSTEM_H) @@ -1981,11 +2213,7 @@ libcpp.a: $(LIBCPP_OBJS) $(AR) $(AR_FLAGS) libcpp.a $(LIBCPP_OBJS) -$(RANLIB) libcpp.a -cpp0$(exeext): cppmain.o intl.o libcpp.a $(LIBDEPS) - $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o cpp0$(exeext) cppmain.o \ - intl.o libcpp.a $(LIBS) - -cppmain.o: cppmain.c $(CONFIG_H) $(CPPLIB_H) intl.h $(SYSTEM_H) +cppmain.o: cppmain.c $(CONFIG_H) $(LIBCPP_DEPS) cpperror.o: cpperror.c $(CONFIG_H) $(LIBCPP_DEPS) cppexp.o: cppexp.c $(CONFIG_H) $(LIBCPP_DEPS) @@ -1993,9 +2221,10 @@ cpplex.o: cpplex.c $(CONFIG_H) $(LIBCPP_DEPS) mbchar.h cppmacro.o: cppmacro.c $(CONFIG_H) $(LIBCPP_DEPS) cpplib.o: cpplib.c $(CONFIG_H) $(LIBCPP_DEPS) cpphash.o: cpphash.c $(CONFIG_H) $(LIBCPP_DEPS) +cpptrad.o: cpptrad.c $(CONFIG_H) $(LIBCPP_DEPS) cppfiles.o: cppfiles.c $(CONFIG_H) $(LIBCPP_DEPS) $(SPLAY_TREE_H) mkdeps.h cppinit.o: cppinit.c $(CONFIG_H) $(LIBCPP_DEPS) cppdefault.h \ - mkdeps.h prefix.h version.h except.h + mkdeps.h prefix.h cppdefault.o: cppdefault.c $(CONFIG_H) $(SYSTEM_H) cppdefault.h Makefile $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ @@ -2004,20 +2233,6 @@ cppdefault.o: cppdefault.c $(CONFIG_H) $(SYSTEM_H) cppdefault.h Makefile mkdeps.o: mkdeps.c $(CONFIG_H) $(SYSTEM_H) mkdeps.h -# The traditional mode preprocessor, a separate program for ease of -# maintenance. Some code is shared with the ISO-C cpp. -tradcpp0$(exeext): tradcpp.o tradcif.o cppdefault.o version.o intl.o \ - mkdeps.o $(LIBDEPS) - $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o tradcpp0$(exeext) \ - tradcpp.o tradcif.o mkdeps.o cppdefault.o version.o intl.o $(LIBS) - -tradcpp.o: tradcpp.c $(CONFIG_H) $(SYSTEM_H) version.h cppdefault.h tradcpp.h -tradcif.o: $(srcdir)/tradcif.c $(CONFIG_H) $(SYSTEM_H) tradcpp.h - -$(srcdir)/tradcif.c: $(srcdir)/tradcif.y - (cd $(srcdir) && $(BISON) $(BISONFLAGS) -o tr$$$$.c tradcif.y && \ - mv -f tr$$$$.c tradcif.c) - # Note for the stamp targets, we run the program `true' instead of # having an empty command (nothing following the semicolon). @@ -2099,8 +2314,7 @@ gcov$(exeext): $(GCOV_OBJS) $(LIBDEPS) # s-* so that mostlyclean does not force the include directory to # be rebuilt. -# Build the include directory including float.h (which no longer depends upon -# enquire). +# Build the include directory stmp-int-hdrs: $(STMP_FIXINC) $(USER_H) xlimits.h # Copy in the headers provided with gcc. # The sed command gets just the last file name component; @@ -2120,11 +2334,6 @@ stmp-int-hdrs: $(STMP_FIXINC) $(USER_H) xlimits.h rm -f include/limits.h cp xlimits.h include/limits.h chmod a+r include/limits.h - rm -f include/float.h - if [ x$(FLOAT_H) != xMakefile.in ]; then \ - cp $(srcdir)/config/$(FLOAT_H) include/float.h && \ - chmod a+r include/float.h; \ - else :; fi # Install the README rm -f include/README cp $(srcdir)/README-fixinc include/README @@ -2146,7 +2355,7 @@ fixinc.sh: $(FIXINCSRCDIR)/mkfixinc.sh $(FIXINCSRCDIR)/fixincl.c \ $(FIXINCSRCDIR)/procopen.c $(FIXINCSRCDIR)/gnu-regex.c \ $(FIXINCSRCDIR)/server.c $(FIXINCSRCDIR)/gnu-regex.h \ $(FIXINCSRCDIR)/server.h $(FIXINCSRCDIR)/inclhack.def specs.ready - (MAKE="$(MAKE)"; srcdir=`cd $(srcdir)/fixinc && pwd` ; \ + (MAKE="$(MAKE)"; srcdir=`cd $(srcdir)/fixinc && ${PWD_COMMAND}` ; \ CC="$(HOST_CC)"; CFLAGS="$(HOST_CFLAGS)"; LDFLAGS="$(HOST_LDFLAGS)"; \ WARN_CFLAGS="$(WARN_CFLAGS)"; \ export MAKE srcdir CC CFLAGS LDFLAGS WARN_CFLAGS; cd ./fixinc && \ @@ -2156,10 +2365,10 @@ fixinc.sh: $(FIXINCSRCDIR)/mkfixinc.sh $(FIXINCSRCDIR)/fixincl.c \ stmp-fixinc: fixinc.sh gsyslimits.h rm -rf include; mkdir include -chmod a+rx include - (TARGET_MACHINE='$(target)'; srcdir=`cd $(srcdir); pwd`; \ + (TARGET_MACHINE='$(target)'; srcdir=`cd $(srcdir); ${PWD_COMMAND}`; \ SHELL='$(SHELL)' ;\ export TARGET_MACHINE srcdir SHELL ; \ - $(SHELL) ./fixinc.sh `pwd`/include $(SYSTEM_HEADER_DIR) $(OTHER_FIXINCLUDES_DIRS); \ + $(SHELL) ./fixinc.sh `${PWD_COMMAND}`/include $(SYSTEM_HEADER_DIR) $(OTHER_FIXINCLUDES_DIRS); \ rm -f include/syslimits.h; \ if [ -f include/limits.h ]; then \ mv include/limits.h include/syslimits.h; \ @@ -2216,7 +2425,7 @@ xsys-protos.h: $(GCC_PASSES) $(srcdir)/sys-protos.h deduced.h gen-protos$(build_ mv tmp-fixtmp.c fixtmp.c $(GCC_FOR_TARGET) fixtmp.c -w -U__SIZE_TYPE__ -U__PTRDIFF_TYPE__ -U__WCHAR_TYPE__ -E \ | sed -e 's/ / /g' -e 's/ *(/ (/g' -e 's/ [ ]*/ /g' -e 's/( )/()/' \ - | ./gen-protos >xsys-protos.hT + | $(RUN_GEN) ./gen-protos >xsys-protos.hT mv xsys-protos.hT xsys-protos.h rm -rf fixtmp.c @@ -2268,24 +2477,22 @@ stmp-fixproto: fixhdr.ready fixproto stmp-int-hdrs docdir = $(srcdir)/doc doc: $(BUILD_INFO) $(GENERATED_MANPAGES) gccbug -info: $(docdir)/cpp.info $(docdir)/gcc.info $(docdir)/gccint.info lang.info $(docdir)/cppinternals.info +info: $(docdir)/cpp.info $(docdir)/gcc.info $(docdir)/gccint.info $(docdir)/gccinstall.info lang.info $(docdir)/cppinternals.info -$(docdir)/cpp.info: $(docdir)/cpp.texi $(docdir)/include/fdl.texi \ +TEXI_CPP_FILES = $(docdir)/cpp.texi $(docdir)/include/fdl.texi \ $(docdir)/cppenv.texi $(docdir)/cppopts.texi - cd $(srcdir) && $(MAKEINFO) $(MAKEINFOFLAGS) -I doc -I doc/include -o doc/cpp.info doc/cpp.texi -$(docdir)/gcc.info: $(docdir)/gcc.texi $(docdir)/include/gcc-common.texi \ +TEXI_GCC_FILES = $(docdir)/gcc.texi $(docdir)/include/gcc-common.texi \ $(docdir)/frontends.texi $(docdir)/standards.texi \ $(docdir)/invoke.texi $(docdir)/extend.texi $(docdir)/md.texi \ $(docdir)/objc.texi $(docdir)/gcov.texi $(docdir)/trouble.texi \ $(docdir)/bugreport.texi $(docdir)/service.texi \ - $(docdir)/contribute.texi $(docdir)/vms.texi $(docdir)/compat.texi \ + $(docdir)/contribute.texi $(docdir)/compat.texi \ $(docdir)/include/funding.texi $(docdir)/gnu.texi \ $(docdir)/include/gpl.texi $(docdir)/include/fdl.texi \ $(docdir)/contrib.texi $(docdir)/cppenv.texi $(docdir)/cppopts.texi - cd $(srcdir) && $(MAKEINFO) $(MAKEINFOFLAGS) -I doc -I doc/include -o doc/gcc.info doc/gcc.texi -$(docdir)/gccint.info: $(docdir)/gccint.texi \ +TEXI_GCCINT_FILES = $(docdir)/gccint.texi \ $(docdir)/include/gcc-common.texi $(docdir)/contribute.texi \ $(docdir)/makefile.texi $(docdir)/configterms.texi \ $(docdir)/portability.texi $(docdir)/interface.texi \ @@ -2296,46 +2503,47 @@ $(docdir)/gccint.info: $(docdir)/gccint.texi \ $(docdir)/headerdirs.texi $(docdir)/include/funding.texi \ $(docdir)/gnu.texi $(docdir)/include/gpl.texi \ $(docdir)/include/fdl.texi $(docdir)/contrib.texi \ - $(docdir)/languages.texi $(docdir)/sourcebuild.texi + $(docdir)/languages.texi $(docdir)/sourcebuild.texi \ + $(docdir)/gty.texi + +TEXI_GCCINSTALL_FILES = $(docdir)/install.texi $(docdir)/install-old.texi \ + $(docdir)/include/fdl.texi + +TEXI_CPPINT_FILES = $(docdir)/cppinternals.texi + +$(docdir)/cpp.info: $(TEXI_CPP_FILES) + cd $(srcdir) && $(MAKEINFO) $(MAKEINFOFLAGS) -I doc -I doc/include -o doc/cpp.info doc/cpp.texi + +$(docdir)/gcc.info: $(TEXI_GCC_FILES) + cd $(srcdir) && $(MAKEINFO) $(MAKEINFOFLAGS) -I doc -I doc/include -o doc/gcc.info doc/gcc.texi + +$(docdir)/gccint.info: $(TEXI_GCCINT_FILES) cd $(srcdir) && $(MAKEINFO) $(MAKEINFOFLAGS) -I doc -I doc/include -o doc/gccint.info doc/gccint.texi -$(docdir)/cppinternals.info: $(docdir)/cppinternals.texi +$(docdir)/gccinstall.info: $(TEXI_GCCINSTALL_FILES) + cd $(srcdir) && $(MAKEINFO) $(MAKEINFOFLAGS) -I doc -I doc/include -o doc/gccinstall.info doc/install.texi + +$(docdir)/cppinternals.info: $(TEXI_CPPINT_FILES) cd $(srcdir) && $(MAKEINFO) $(MAKEINFOFLAGS) -I doc -I doc/include -o doc/cppinternals.info \ doc/cppinternals.texi -dvi: gcc.dvi gccint.dvi cpp.dvi lang.dvi cppinternals.dvi +dvi: gcc.dvi gccint.dvi gccinstall.dvi cpp.dvi lang.dvi cppinternals.dvi # This works with GNU Make's default rule. -cpp.dvi: $(docdir)/cpp.texi $(docdir)/include/fdl.texi \ - $(docdir)/cppenv.texi $(docdir)/cppopts.texi +cpp.dvi: $(TEXI_CPP_FILES) $(TEXI2DVI) -I $(docdir) -I $(docdir)/include $(docdir)/cpp.texi -gcc.dvi: $(docdir)/gcc.texi $(docdir)/include/gcc-common.texi \ - $(docdir)/frontends.texi $(docdir)/standards.texi \ - $(docdir)/invoke.texi $(docdir)/extend.texi $(docdir)/md.texi \ - $(docdir)/objc.texi $(docdir)/gcov.texi $(docdir)/trouble.texi \ - $(docdir)/bugreport.texi $(docdir)/service.texi \ - $(docdir)/contribute.texi $(docdir)/vms.texi \ - $(docdir)/include/funding.texi $(docdir)/gnu.texi \ - $(docdir)/include/gpl.texi $(docdir)/include/fdl.texi \ - $(docdir)/contrib.texi $(docdir)/cppenv.texi $(docdir)/cppopts.texi +gcc.dvi: $(TEXI_GCC_FILES) $(TEXI2DVI) -I $(docdir) -I $(docdir)/include $(docdir)/gcc.texi -gccint.dvi: $(docdir)/gccint.texi \ - $(docdir)/include/gcc-common.texi $(docdir)/contribute.texi \ - $(docdir)/makefile.texi $(docdir)/configterms.texi \ - $(docdir)/portability.texi $(docdir)/interface.texi \ - $(docdir)/passes.texi $(docdir)/c-tree.texi \ - $(docdir)/rtl.texi $(docdir)/md.texi $(docdir)/tm.texi \ - $(docdir)/hostconfig.texi $(docdir)/fragments.texi \ - $(docdir)/configfiles.texi $(docdir)/collect2.texi \ - $(docdir)/headerdirs.texi $(docdir)/include/funding.texi \ - $(docdir)/gnu.texi $(docdir)/include/gpl.texi \ - $(docdir)/include/fdl.texi $(docdir)/contrib.texi \ - $(docdir)/languages.texi $(docdir)/sourcebuild.texi +gccint.dvi: $(TEXI_GCCINT_FILES) $(TEXI2DVI) -I $(docdir) -I $(docdir)/include $(docdir)/gccint.texi -cppinternals.dvi: $(docdir)/cppinternals.texi +gccinstall.dvi: $(TEXI_GCCINSTALL_FILES) + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(TEXI2DVI) -I $$s/doc -I $$s/doc/include -o $@ $$s/doc/install.texi + +cppinternals.dvi: $(TEXI_CPPINT_FILES) $(TEXI2DVI) -I $(docdir) -I $(docdir)/include $(docdir)/cppinternals.texi generated-manpages: $(docdir)/gcov.1 $(docdir)/cpp.1 $(docdir)/gcc.1 \ @@ -2410,22 +2618,24 @@ $(docdir)/fsf-funding.7: $(docdir)/include/funding.texi INTL_MOSTLYCLEAN = intl.mostlyclean mostlyclean: $(INTL_MOSTLYCLEAN) lang.mostlyclean -rm -f $(STAGESTUFF) + -rm -f *$(coverageexts) -rm -rf libgcc # Delete the temporary source copies for cross compilation. - -rm -f $(HOST_PREFIX_1)rtl.c $(HOST_PREFIX_1)print-rtl.c - -rm -f $(HOST_PREFIX_1)bitmap.c $(HOST_PREFIX_1)errors.c - -rm -f $(HOST_PREFIX_1)ggc-none.c + -rm -f $(BUILD_PREFIX_1)rtl.c $(BUILD_PREFIX_1)print-rtl.c + -rm -f $(BUILD_PREFIX_1)bitmap.c $(BUILD_PREFIX_1)errors.c + -rm -f $(BUILD_PREFIX_1)ggc-none.c # Delete the temp files made in the course of building libgcc.a. -rm -f xlimits.h # Delete other built files. - -rm -f t-float.h-cross xsys-protos.hT + -rm -f xsys-protos.hT + -rm -f specs.h options.h gencheck.h # Delete the stamp and temporary files. -rm -f s-* tmp-* stamp-* stmp-* -rm -f */stamp-* */tmp-* # Delete debugging dump files. -rm -f *.[0-9][0-9].* */*.[0-9][0-9].* # Delete some files made during installation. - -rm -f specs float.h-* enquire SYSCALLS.c.X SYSCALLS.c + -rm -f specs SYSCALLS.c.X SYSCALLS.c -rm -f collect collect2 mips-tfile mips-tdump # Delete files generated for fixproto -rm -rf fix-header$(build_exeext) xsys-protos.h deduced.h tmp-deduced.h \ @@ -2440,6 +2650,11 @@ mostlyclean: $(INTL_MOSTLYCLEAN) lang.mostlyclean -rm -f gcc.vrs gcc.kys gcc.tps gcc.pgs gcc.fns # Delete core dumps. -rm -f core */core +# Delete file generated for gengtype.c + -rm -f gtyp-gen.h +# Delete files generated by gengtype.c + -rm -f gtype-* + -rm -f gt-* # Delete all files made by compilation # that don't exist in the distribution. @@ -2474,20 +2689,24 @@ distclean: clean $(INTL_DISTCLEAN) lang.distclean -rm -f cstamp-h -rm -f config.status config.run config.cache config.bak -rm -f Make-lang Make-hooks Make-host Make-target - -rm -f Makefile specs.h options.h gencheck.h *.oaux + -rm -f Makefile *.oaux -rm -f gthr-default.h -rm -f */stage1 */stage2 */stage3 */stage4 */include -rm -f c-parse.output -rm -f *.asm - -rm -f float.h -rm -f site.exp site.bak testsuite/site.exp testsuite/site.bak - -rm -f testsuite/{gcc,g++}.{log,sum} + -rm -f testsuite/*.log testsuite/*.sum + -cd testsuite && rm -f x *.x *.x? *.exe *.rpo *.o *.s *.S *.c + -cd testsuite && rm -f *.out *.gcov *.bb *.bbg + -rm -rf ${QMTEST_DIR} stamp-qmtest -rm -f intl/libintl.h libintl.h -rm -f cxxmain.c - -rm -f mklibgcc gccbug .gdbinit configargs.h + -rm -f mklibgcc mkheaders gccbug .gdbinit configargs.h -rm -f gcov.pod -rm -f fixinc/Makefile - -rmdir ada cp f java objc fixinc intl po 2>/dev/null +# Delete po/*.gmo only if we are not building in the source directory. + -if [ ! -f po/exgettext ]; then rm -f po/*.gmo; fi + -rmdir ada cp f java objc fixinc intl po testsuite 2>/dev/null # Delete anything likely to be found in the source directory # that shouldn't be in the distribution. @@ -2532,7 +2751,7 @@ maintainer-clean: # Install the driver last so that the window when things are # broken is small. install: install-common $(INSTALL_HEADERS) $(INSTALL_LIBGCC) \ - $(INSTALL_CPP) install-man install-info intl.install install-@POSUB@ \ + install-cpp install-man install-info intl.install install-@POSUB@ \ lang.install-normal install-driver # Handle cpp installation. @@ -2553,14 +2772,6 @@ install-cpp: cpp$(exeext) else true; fi; \ fi -uninstall-cpp: - -rm -f $(DESTDIR)$(bindir)/$(CPP_INSTALL_NAME)$(exeext) - -rm -f $(DESTDIR)$(bindir)/$(CPP_CROSS_NAME)$(exeext) - -if [ x$(cpp_install_dir) != x ]; then \ - rm -f $(DESTDIR)$(prefix)/$(cpp_install_dir)/$(CPP_INSTALL_NAME)$(exeext); \ - rm -f $(DESTDIR)$(prefix)/$(cpp_install_dir)/$(CPP_CROSS_NAME)$(exeext); \ - else true; fi - # Create the installation directories. # $(libdir)/gcc-lib/include isn't currently searched by cpp. installdirs: @@ -2618,10 +2829,6 @@ install-common: native $(EXTRA_PARTS) lang.install-common $(INSTALL_DATA) SYSCALLS.c.X $(DESTDIR)$(libsubdir)/SYSCALLS.c.X; \ chmod a-x $(DESTDIR)$(libsubdir)/SYSCALLS.c.X; \ fi - -rm -f $(DESTDIR)$(libsubdir)/cpp0$(exeext) - $(INSTALL_PROGRAM) cpp0$(exeext) $(DESTDIR)$(libsubdir)/cpp0$(exeext) - -rm -f $(DESTDIR)$(libsubdir)/tradcpp0$(exeext) - $(INSTALL_PROGRAM) tradcpp0$(exeext) $(DESTDIR)$(libsubdir)/tradcpp0$(exeext) # Install gcov if it was compiled. -if [ -f gcov$(exeext) ]; \ then \ @@ -2630,12 +2837,16 @@ install-common: native $(EXTRA_PARTS) lang.install-common fi $(INSTALL_SCRIPT) gccbug $(DESTDIR)$(bindir)/$(GCCBUG_INSTALL_NAME) -# Install the driver program as $(target_alias)-gcc +# Install the driver program as $(target_alias)-gcc, +# $(target-alias)-gcc-$(version) # and also as either gcc (if native) or $(gcc_tooldir)/bin/gcc. install-driver: installdirs xgcc$(exeext) -if [ -f gcc-cross$(exeext) ] ; then \ rm -f $(DESTDIR)$(bindir)/$(GCC_CROSS_NAME)$(exeext); \ $(INSTALL_PROGRAM) gcc-cross$(exeext) $(DESTDIR)$(bindir)/$(GCC_CROSS_NAME)$(exeext); \ + rm -f $(DESTDIR)$(bindir)/$(target_alias)-gcc-$(version); \ + ( cd $(DESTDIR)$(bindir) && \ + $(LN) $(GCC_CROSS_NAME)$(exeext) $(target_alias)-gcc-$(version) ); \ if [ -d $(DESTDIR)$(gcc_tooldir)/bin/. ] ; then \ rm -f $(DESTDIR)$(gcc_tooldir)/bin/gcc$(exeext); \ $(INSTALL_PROGRAM) gcc-cross$(exeext) $(DESTDIR)$(gcc_tooldir)/bin/gcc$(exeext); \ @@ -2643,10 +2854,13 @@ install-driver: installdirs xgcc$(exeext) else \ rm -f $(DESTDIR)$(bindir)/$(GCC_INSTALL_NAME)$(exeext); \ $(INSTALL_PROGRAM) xgcc$(exeext) $(DESTDIR)$(bindir)/$(GCC_INSTALL_NAME)$(exeext); \ - rm -f $(DESTDIR)$(bindir)/$(target_alias)-gcc-1$(exeext); \ + rm -f $(DESTDIR)$(bindir)/$(target_alias)-gcc-$(version); \ ( cd $(DESTDIR)$(bindir) && \ - $(LN) $(GCC_INSTALL_NAME)$(exeext) $(target_alias)-gcc-1$(exeext) && \ - mv -f $(target_alias)-gcc-1$(exeext) $(GCC_TARGET_INSTALL_NAME)$(exeext) ); \ + $(LN) $(GCC_INSTALL_NAME)$(exeext) $(target_alias)-gcc-$(version) ); \ + rm -f $(DESTDIR)$(bindir)/$(target_alias)-gcc-tmp$(exeext); \ + ( cd $(DESTDIR)$(bindir) && \ + $(LN) $(GCC_INSTALL_NAME)$(exeext) $(target_alias)-gcc-tmp$(exeext) && \ + mv -f $(target_alias)-gcc-tmp$(exeext) $(GCC_TARGET_INSTALL_NAME)$(exeext) ); \ fi # Install the info files. @@ -2709,7 +2923,7 @@ install-libgcc: libgcc.mk libgcc.a installdirs r_f_t=: ; \ fi; \ $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \ - HOST_PREFIX="$(HOST_PREFIX)" HOST_PREFIX_1="$(HOST_PREFIX_1)" \ + BUILD_PREFIX="$(BUILD_PREFIX)" BUILD_PREFIX_1="$(BUILD_PREFIX_1)" \ AR_FOR_TARGET="$(AR_FOR_TARGET)" \ AR_CREATE_FOR_TARGET="$(AR_CREATE_FOR_TARGET)" \ AR_FLAGS_FOR_TARGET="$(AR_FLAGS_FOR_TARGET)" \ @@ -2736,7 +2950,7 @@ install-multilib: stmp-multilib installdirs r_f_t=: ; \ fi; \ $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \ - HOST_PREFIX="$(HOST_PREFIX)" HOST_PREFIX_1="$(HOST_PREFIX_1)" \ + BUILD_PREFIX="$(BUILD_PREFIX)" BUILD_PREFIX_1="$(BUILD_PREFIX_1)" \ AR_FOR_TARGET="$(AR_FOR_TARGET)" \ AR_CREATE_FOR_TARGET="$(AR_CREATE_FOR_TARGET)" \ AR_FLAGS_FOR_TARGET="$(AR_FLAGS_FOR_TARGET)" \ @@ -2762,7 +2976,7 @@ install-headers: $(INSTALL_HEADERS_DIR) # Don't need to use LN_S here since we really do need ln -s and no substitutes. -files=`cd $(DESTDIR)$(libsubdir)/include; find . -type l -print 2>/dev/null`; \ if [ $$? -eq 0 ]; then \ - dir=`cd include; pwd`; \ + dir=`cd include; ${PWD_COMMAND}`; \ for i in $$files; do \ dest=`ls -ld $(DESTDIR)$(libsubdir)/include/$$i | sed -n 's/.*-> //p'`; \ if expr "$$dest" : "$$dir.*" > /dev/null; then \ @@ -2784,7 +2998,7 @@ install-headers-tar: stmp-int-hdrs $(STMP_FIXPROTO) install-include-dir # Unless a full pathname is provided, some shells would print the new CWD, # found in CDPATH, corrupting the output. We could just redirect the # output of `cd', but some shells lose on redirection within `()'s - (cd `pwd`/include ; \ + (cd `${PWD_COMMAND}`/include ; \ tar -cf - .; exit 0) | (cd $(DESTDIR)$(libsubdir)/include; tar xpf - ) # /bin/sh on some systems returns the status of the first tar, # and that can lose with GNU tar which always writes a full block. @@ -2793,13 +3007,50 @@ install-headers-tar: stmp-int-hdrs $(STMP_FIXPROTO) install-include-dir # Install the include directory using cpio. install-headers-cpio: stmp-int-hdrs $(STMP_FIXPROTO) install-include-dir # See discussion about the use of `pwd` above - cd `pwd`/include ; \ + cd `${PWD_COMMAND}`/include ; \ find . -print | cpio -pdum $(DESTDIR)$(libsubdir)/include # Install the include directory using cp. install-headers-cp: stmp-int-hdrs $(STMP_FIXPROTO) install-include-dir cp -p -r include $(DESTDIR)$(libsubdir) +itoolsdir = $(libsubdir)/install-tools +# Don't install the headers. Instead, install appropriate scripts +# and supporting files for fixincludes to be run later. +install-mkheaders: stmp-int-hdrs $(STMP_FIXPROTO) install-include-dir \ + mkheaders xlimits.h + -rm -rf $(DESTDIR)$(itoolsdir) + $(SHELL) $(srcdir)/mkinstalldirs $(DESTDIR)$(itoolsdir)/include + for file in $(USER_H); do \ + realfile=`echo $$file | sed -e 's|.*/\([^/]*\)$$|\1|'`; \ + $(INSTALL_DATA) $$file \ + $(DESTDIR)$(itoolsdir)/include/$$realfile ; \ + done + $(INSTALL_DATA) xlimits.h $(DESTDIR)$(itoolsdir)/include/limits.h + if [ x$(STMP_FIXINC) != x ] ; then \ + $(INSTALL_DATA) $(srcdir)/README-fixinc \ + $(DESTDIR)$(itoolsdir)/include/README ; \ + $(INSTALL_PROGRAM) fixinc.sh $(DESTDIR)$(itoolsdir)/fixinc.sh ; \ + $(INSTALL_PROGRAM) fixinc/fixincl $(DESTDIR)$(itoolsdir)/fixincl ; \ + $(INSTALL_DATA) $(srcdir)/gsyslimits.h $(DESTDIR)$(itoolsdir)/gsyslimits.h ; \ + else :; fi + if [ x$(STMP_FIXPROTO) != x ] ; then \ + $(INSTALL_PROGRAM) $(srcdir)/mkinstalldirs \ + $(DESTDIR)$(itoolsdir)/mkinstalldirs ; \ + $(INSTALL_PROGRAM) $(srcdir)/fixproto $(DESTDIR)$(itoolsdir)/fixproto ; \ + $(INSTALL_PROGRAM) fix-header$(build_exeext) \ + $(DESTDIR)$(itoolsdir)/fix-header$(build_exeext) ; \ + else :; fi + $(INSTALL_PROGRAM) mkheaders $(DESTDIR)$(itoolsdir)/mkheaders + echo 'SYSTEM_HEADER_DIR="$(SYSTEM_HEADER_DIR)"' \ + > $(DESTDIR)$(itoolsdir)/mkheaders.conf + echo 'OTHER_FIXINCLUDES_DIRS="$(OTHER_FIXINCLUDES_DIRS)"' \ + >> $(DESTDIR)$(itoolsdir)/mkheaders.conf + echo 'FIXPROTO_DEFINES="$(FIXPROTO_DEFINES)"' \ + >> $(DESTDIR)$(itoolsdir)/mkheaders.conf + echo 'STMP_FIXPROTO="$(STMP_FIXPROTO)"' >> $(DESTDIR)$(itoolsdir)/mkheaders.conf + echo 'STMP_FIXINC="$(STMP_FIXINC)"' >> $(DESTDIR)$(itoolsdir)/mkheaders.conf + # Use this target to install the program `collect2' under the name `collect2'. install-collect2: collect2 installdirs $(INSTALL_PROGRAM) collect2$(exeext) $(DESTDIR)$(libsubdir)/collect2$(exeext) @@ -2807,10 +3058,16 @@ install-collect2: collect2 installdirs $(INSTALL_PROGRAM) xgcc$(exeext) $(DESTDIR)$(libsubdir)/gcc$(exeext) # Cancel installation by deleting the installed files. -uninstall: intl.uninstall lang.uninstall $(UNINSTALL_CPP) +uninstall: intl.uninstall lang.uninstall -rm -rf $(DESTDIR)$(libsubdir) -rm -rf $(DESTDIR)$(bindir)/$(GCC_INSTALL_NAME)$(exeext) -rm -rf $(DESTDIR)$(bindir)/$(GCC_CROSS_NAME)$(exeext) + -rm -f $(DESTDIR)$(bindir)/$(CPP_INSTALL_NAME)$(exeext) + -rm -f $(DESTDIR)$(bindir)/$(CPP_CROSS_NAME)$(exeext) + -if [ x$(cpp_install_dir) != x ]; then \ + rm -f $(DESTDIR)$(prefix)/$(cpp_install_dir)/$(CPP_INSTALL_NAME)$(exeext); \ + rm -f $(DESTDIR)$(prefix)/$(cpp_install_dir)/$(CPP_CROSS_NAME)$(exeext); \ + else true; fi -rm -rf $(DESTDIR)$(bindir)/$(PROTOIZE_INSTALL_NAME)$(exeext) -rm -rf $(DESTDIR)$(bindir)/$(PROTOIZE_CROSS_NAME)$(exeext) -rm -rf $(DESTDIR)$(bindir)/$(UNPROTOIZE_INSTALL_NAME)$(exeext) @@ -2838,8 +3095,8 @@ site.exp: ./config.status Makefile @echo "## these variables are automatically generated by make ##" > ./tmp0 @echo "# Do not edit here. If you wish to override these values" >> ./tmp0 @echo "# add them to the last section" >> ./tmp0 - @echo "set rootme \"`pwd`\"" >> ./tmp0 - @echo "set srcdir \"`cd ${srcdir}; pwd`\"" >> ./tmp0 + @echo "set rootme \"`${PWD_COMMAND}`\"" >> ./tmp0 + @echo "set srcdir \"`cd ${srcdir}; ${PWD_COMMAND}`\"" >> ./tmp0 @echo "set host_triplet $(host_canonical)" >> ./tmp0 @echo "set build_triplet $(build_canonical)" >> ./tmp0 @echo "set target_triplet $(target)" >> ./tmp0 @@ -2872,23 +3129,26 @@ site.exp: ./config.status Makefile fi echo "set tmpdir $(objdir)/testsuite" >> ./tmp0 @echo "set srcdir \"\$${srcdir}/testsuite\"" >> ./tmp0 + @if [ "X$(ALT_CXX_UNDER_TEST)" != "X" ] ; then \ + echo "set ALT_CXX_UNDER_TEST $(ALT_CXX_UNDER_TEST)" >> ./tmp0; \ + else true; \ + fi + @if [ "X$(COMPAT_OPTIONS)" != "X" ] ; then \ + echo "set COMPAT_OPTIONS $(COMPAT_OPTIONS)" >> ./tmp0; \ + else true; \ + fi @echo "## All variables above are generated by configure. Do Not Edit ##" >> ./tmp0 @cat ./tmp0 > site.exp @cat site.bak | sed \ -e '1,/^## All variables above are.*##/ d' >> site.exp -@rm -f ./tmp? -CHECK_TARGETS = check-gcc check-fixinc @check_languages@ +CHECK_TARGETS = check-gcc @check_languages@ check-c++ : check-g++ check-f77 : check-g77 check-java : -check-fixinc : - if (autogen --ver=v) > /dev/null 2>&1 ; \ - then cd fixinc && $(MAKE) check ; \ - else true ; fi - check: $(CHECK_TARGETS) # The idea is to parallelize testing of multilibs, for example: @@ -2912,55 +3172,132 @@ $(TESTSUITEDIR)/site.exp: site.exp sed '/set tmpdir/ s|testsuite|$(TESTSUITEDIR)|' < site.exp > $@ check-g++: $(TESTSUITEDIR)/site.exp - -(rootme=`pwd`; export rootme; \ - srcdir=`cd ${srcdir}; pwd` ; export srcdir ; \ + -(rootme=`${PWD_COMMAND}`; export rootme; \ + srcdir=`cd ${srcdir}; ${PWD_COMMAND}` ; export srcdir ; \ cd $(TESTSUITEDIR); \ EXPECT=${EXPECT} ; export EXPECT ; \ if [ -f $${rootme}/../expect/expect ] ; then \ - TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; pwd` ; \ + TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; ${PWD_COMMAND}` ; \ export TCL_LIBRARY ; fi ; \ $(RUNTEST) --tool g++ $(RUNTESTFLAGS)) check-gcc: $(TESTSUITEDIR)/site.exp - -(rootme=`pwd`; export rootme; \ - srcdir=`cd ${srcdir}; pwd` ; export srcdir ; \ + -(rootme=`${PWD_COMMAND}`; export rootme; \ + srcdir=`cd ${srcdir}; ${PWD_COMMAND}` ; export srcdir ; \ cd $(TESTSUITEDIR); \ EXPECT=${EXPECT} ; export EXPECT ; \ if [ -f $${rootme}/../expect/expect ] ; then \ - TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; pwd` ; \ + TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; ${PWD_COMMAND}` ; \ export TCL_LIBRARY ; fi ; \ $(RUNTEST) --tool gcc $(RUNTESTFLAGS)) check-g77: $(TESTSUITEDIR)/site.exp - -(rootme=`pwd`; export rootme; \ - srcdir=`cd ${srcdir}; pwd` ; export srcdir ; \ + -(rootme=`${PWD_COMMAND}`; export rootme; \ + srcdir=`cd ${srcdir}; ${PWD_COMMAND}` ; export srcdir ; \ cd $(TESTSUITEDIR); \ EXPECT=${EXPECT} ; export EXPECT ; \ if [ -f $${rootme}/../expect/expect ] ; then \ - TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; pwd` ; \ + TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; ${PWD_COMMAND}` ; \ export TCL_LIBRARY ; fi ; \ $(RUNTEST) --tool g77 $(RUNTESTFLAGS)) check-objc: $(TESTSUITEDIR)/site.exp - -(rootme=`pwd`; export rootme; \ - srcdir=`cd ${srcdir}; pwd` ; export srcdir ; \ + -(rootme=`${PWD_COMMAND}`; export rootme; \ + srcdir=`cd ${srcdir}; ${PWD_COMMAND}` ; export srcdir ; \ cd $(TESTSUITEDIR); \ EXPECT=${EXPECT} ; export EXPECT ; \ if [ -f $${rootme}/../expect/expect ] ; then \ - TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; pwd` ; \ + TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; ${PWD_COMMAND}` ; \ export TCL_LIBRARY ; fi ; \ $(RUNTEST) --tool objc $(RUNTESTFLAGS)) check-consistency: testsuite/site.exp - -rootme=`pwd`; export rootme; \ - srcdir=`cd ${srcdir}; pwd` ; export srcdir ; \ + -rootme=`${PWD_COMMAND}`; export rootme; \ + srcdir=`cd ${srcdir}; ${PWD_COMMAND}` ; export srcdir ; \ cd testsuite; \ EXPECT=${EXPECT} ; export EXPECT ; \ if [ -f $${rootme}/../expect/expect ] ; then \ - TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; pwd` ; \ + TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; ${PWD_COMMAND}` ; \ export TCL_LIBRARY ; fi ; \ $(RUNTEST) --tool consistency $(RUNTESTFLAGS) +# QMTest targets + +# The path to qmtest. +QMTEST_PATH=qmtest + +# The flags to pass to qmtest. +QMTESTFLAGS= + +# The flags to pass to "qmtest run". +QMTESTRUNFLAGS= + +# The command to use to invoke qmtest. +QMTEST=${QMTEST_PATH} ${QMTESTFLAGS} + +# The tests (or suites) to run. +QMTEST_GPP_TESTS=gpp + +# The subdirectory of the OBJDIR that will be used to store the QMTest +# test database configuration and that will be used for temporary +# scratch space during QMTest's execution. +QMTEST_DIR=qmtestsuite + +# Create the QMTest database configuration. +${QMTEST_DIR} stamp-qmtest: + debug_options=""; \ + ${STAMP} empty.C; \ + for option in \ + -gdwarf-2 -gstabs -gstabs+ -gxcoff -gxcoff+ -gcoff; do \ + (./cc1plus -q $${option} empty.C 2>&1 | \ + grep "unknown or unsupported -g option" > /dev/null) || \ + debug_options="$${debug_options}$${option} "; done; \ + ${QMTEST} -D ${QMTEST_DIR} create-tdb \ + -c gcc_database.GCCDatabase \ + -a GCCDatabase.testsuite_root=`cd ${srcdir}/testsuite && pwd` \ + -a GCCDatabase.debug_options="$${debug_options}" + rm -f empty.C empty.s + $(STAMP) stamp-qmtest + +# Create the QMTest context file. +${QMTEST_DIR}/context: stamp-qmtest + echo "GCCTest.flags=-B${objdir}" >> $@ + echo "GCCTest.objdir=${objdir}/.." >> $@ + echo "GCCTest.host=${host_canonical}" >> $@ + echo "GCCTest.target=${target}" >> $@ + echo "GCCTest.gcov=${objdir}/gcov" >> $@ + echo "GPPTest.gpp=${objdir}/g++" >> $@ + echo "DGTest.demangler=${objdir}/c++filt" >> $@ + +# Run the G++ testsuite using QMTest. +qmtest-g++: ${QMTEST_DIR}/context ${QMTEST_DIR}/gpp-expected.qmr + cd ${QMTEST_DIR} && ${QMTEST} run ${QMTESTRUNFLAGS} -C context \ + -o gpp.qmr -O gpp-expected.qmr \ + ${QMTEST_GPP_TESTS} + +# Use the QMTest GUI. +qmtest-gui: ${QMTEST_DIR}/context + cd ${QMTEST_DIR} && ${QMTEST} gui -C context + +# Build the set of expected G++ failures. +${QMTEST_DIR}/gpp-expected.qmr: ${QMTEST_DIR}/context + echo "Determining expected results..." + cd ${QMTEST_DIR} && ${QMTEST} run ${QMTESTRUNFLAGS} -C context \ + -c "GCCTest.generate_xfails=1" -o gpp-expected.qmr \ + ${QMTEST_GPP_TESTS} \ + > /dev/null + +.PHONY: qmtest-g++ + +# Run Paranoia on real.c. + +paranoia.o: $(srcdir)/../contrib/paranoia.cc $(CONFIG_H) $(SYSTEM_H) \ + real.h $(TREE_H) + g++ -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION) + +paranoia: paranoia.o real.o $(LIBIBERTY) + g++ -o $@ paranoia.o real.o $(LIBIBERTY) + # These exist for maintenance purposes. # Update the tags table. @@ -2979,6 +3316,7 @@ VOL_FILES=`echo $(BACKEND) $(OBJS) $(C_OBJS) $(LIBCPP_OBJS) *.c *.h gen*` # WARN_CFLAGS setting can't be to the expansion of GCC_WARN_CFLAGS in # the context of the stage_x rule. STAGE2_FLAGS_TO_PASS = \ + ADAC="\$$(CC)" \ CFLAGS="$(BOOT_CFLAGS)" \ LDFLAGS="$(BOOT_LDFLAGS)" \ WARN_CFLAGS="\$$(GCC_WARN_CFLAGS)" \ @@ -2996,7 +3334,7 @@ STAGE2_FLAGS_TO_PASS = \ stage1_build: $(MAKE) CC="$(CC)" libdir=$(libdir) LANGUAGES="$(BOOT_LANGUAGES)" \ CFLAGS="$(STAGE1_CFLAGS)" MAKEINFO="$(MAKEINFO)" \ - MAKEINFOFLAGS="$(MAKEINFOFLAGS)" + MAKEINFOFLAGS="$(MAKEINFOFLAGS)" COVERAGE_FLAGS= $(STAMP) stage1_build echo stage1_build > stage_last @@ -3006,7 +3344,7 @@ stage1_copy: stage1_build echo stage2_build > stage_last stage2_build: stage1_copy - $(MAKE) CC="stage1/xgcc$(exeext) -Bstage1/ -B$(build_tooldir)/bin/" \ + $(MAKE) CC="$(STAGE_CC_WRAPPER) stage1/xgcc$(exeext) -Bstage1/ -B$(build_tooldir)/bin/" \ STAGE_PREFIX=stage1/ \ $(STAGE2_FLAGS_TO_PASS) $(STAMP) stage2_build @@ -3018,7 +3356,7 @@ stage2_copy: stage2_build echo stage3_build > stage_last stage3_build: stage2_copy - $(MAKE) CC="stage2/xgcc$(exeext) -Bstage2/ -B$(build_tooldir)/bin/" \ + $(MAKE) CC="$(STAGE_CC_WRAPPER) stage2/xgcc$(exeext) -Bstage2/ -B$(build_tooldir)/bin/" \ STAGE_PREFIX=stage2/ \ $(STAGE2_FLAGS_TO_PASS) $(STAMP) stage3_build @@ -3031,7 +3369,7 @@ stage3_copy: stage3_build echo stage4_build > stage_last stage4_build: stage3_copy - $(MAKE) CC="stage3/xgcc$(exeext) -Bstage3/ -B$(build_tooldir)/bin/" \ + $(MAKE) CC="$(STAGE_CC_WRAPPER) stage3/xgcc$(exeext) -Bstage3/ -B$(build_tooldir)/bin/" \ STAGE_PREFIX=stage3/ \ $(STAGE2_FLAGS_TO_PASS) $(STAMP) stage4_build @@ -3052,7 +3390,8 @@ bootstrap: stage3_build @echo @echo Bootstrap complete - make \"quickstrap\" to redo last build, @echo \"restage1\" through \"restage3\" to rebuild specific stages, - @echo or \"cleanstrap\" to redo the bootstrap from scratch. + @echo \"restrap\" to redo the bootstrap from stage1, or + @echo \"cleanstrap\" to redo the bootstrap from scratch. bootstrap-lean : clean_s1 clean_s2 stage3_build @echo @@ -3121,6 +3460,16 @@ cleanstrap: -$(MAKE) clean $(MAKE) LANGUAGES="$(LANGUAGES)" bootstrap +unstrap: + -rm -rf stage[234]* + $(MAKE) unstage1 + +# Differs from cleanstrap in that it starts from the earlier stage1 build, +# not from scratch. +restrap: + $(MAKE) unstrap + $(MAKE) LANGUAGES="$(LANGUAGES)" bootstrap + # Compare the object files in the current directory with those in the # stage2 directory. @@ -3159,18 +3508,21 @@ compare compare3 compare4 compare-lean compare3-lean compare4-lean: force # Compare the object files in the current directory with those in the # stage2 directory. Use gnu cmp (diffutils v2.4 or later) to avoid # running tail and the overhead of twice copying each object file. - +# An exit status of 1 is precisely the result we're looking for (other +# values mean other problems). gnucompare gnucompare3 gnucompare4 gnucompare-lean gnucompare3-lean gnucompare4-lean: force -rm -f .bad_compare case "$@" in gnucompare | gnucompare-lean ) stage=2 ;; * ) stage=`echo $@ | sed -e 's,^gnucompare\([0-9][0-9]*\).*,\1,'` ;; esac; \ for file in *$(objext); do \ - (cmp --ignore-initial=16 $$file stage$$stage/$$file > /dev/null 2>&1 || echo $$file differs >> .bad_compare) || true; \ + cmp --ignore-initial=16 $$file stage$$stage/$$file > /dev/null 2>&1; \ + test $$? -eq 1 && echo $$file differs >> .bad_compare || true; \ done case "$@" in gnucompare | gnucompare-lean ) stage=2 ;; * ) stage=`echo $@ | sed -e 's,^gnucompare\([0-9][0-9]*\).*,\1,'` ;; esac; \ for dir in tmp-foo intl $(SUBDIRS); do \ if [ "`echo $$dir/*$(objext)`" != "$$dir/*$(objext)" ] ; then \ for file in $$dir/*$(objext); do \ - (cmp --ignore-initial=16 $$file stage$$stage/$$file > /dev/null 2>&1 || echo $$file differs >> .bad_compare) || true; \ + cmp --ignore-initial=16 $$file stage$$stage/$$file > /dev/null 2>&1; \ + test $$? -eq 1 && echo $$file differs >> .bad_compare || true; \ done; \ else true; fi; \ done @@ -3323,59 +3675,6 @@ risky-stage4: stage4 force: -# --- -# The enquire rules are still useful for building new float-anything.h. -# Special flags for compiling enquire. -# We disable optimization to make floating point more reliable. -ENQUIRE_CFLAGS = -DNO_MEM -DNO_LONG_DOUBLE_IO -O0 -ENQUIRE_LDFLAGS = $(LDFLAGS) - -# Enquire target (This is a variable so that a target can choose not to -# build it.) -ENQUIRE = enquire - -# Test to see whether exists in the system header files, -# and is not derived from GCC. -FLOAT_H_TEST = \ - [ -f $(SYSTEM_HEADER_DIR)/float.h ] && \ - if grep 'ifndef _FLOAT_H___' $(SYSTEM_HEADER_DIR)/float.h >/dev/null; \ - then false; \ - else :; fi -# We pretend to not having a usable , hence disable the FLOAT_H_TEST -# to ensure, we're emitting a full blown ourselves. -FLOAT_H_TEST = false - -# Used to compile enquire with standard cc, but have forgotten why. -# Let's try with GCC. -enquire: enquire.o $(GCC_PARTS) - $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ENQUIRE_LDFLAGS) enquire.o -o $@ -enquire.o: $(srcdir)/enquire.c $(GCC_PASSES) stmp-int-hdrs - if $(FLOAT_H_TEST); then \ - rm -f include/float.h; \ - SYS_FLOAT_H_WRAP=1; \ - else :; \ - SYS_FLOAT_H_WRAP=0; \ - fi; \ - $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) $(ENQUIRE_CFLAGS) \ - -DSYS_FLOAT_H_WRAP=$$SYS_FLOAT_H_WRAP \ - -I. -c $(srcdir)/enquire.c $(OUTPUT_OPTION) - -# Create float.h source for the native machine. -# Make it empty if we can use the system float.h without changes. -float.h-nat: enquire - -./enquire -f > tmp-float.h - grep '#define [^_]' tmp-float.h >/dev/null || true > tmp-float.h - mv tmp-float.h float.h-nat - -# Create a dummy float.h source for a cross-compiler. -# ??? This isn't used anymore. Should we create config/float-unkn.h -# and make that the default float_format in configure? -float.h-cross: - echo "#ifndef __GCC_FLOAT_NOT_NEEDED" > t-float.h-cross - echo "#error float.h values not known for cross-compiler" >> t-float.h-cross - echo "#endif" >> t-float.h-cross - mv t-float.h-cross float.h-cross - # Rules for generating translated message descriptions. # Disabled by autoconf if the tools are not available. @@ -3386,7 +3685,7 @@ MSGMERGE = msgmerge PACKAGE = @PACKAGE@ CATALOGS = @CATALOGS@ -.PHONY: build- install- build-po install-po update-po +.PHONY: build- install- build-po install-po update-po # Dummy rules to deal with dependencies produced by use of # "build-@POSUB@" and "install-@POSUB@" above, when NLS is disabled. diff --git a/contrib/gcc/ONEWS b/contrib/gcc/ONEWS index 4d4b54b..f4b3581 100644 --- a/contrib/gcc/ONEWS +++ b/contrib/gcc/ONEWS @@ -1,112 +1,28 @@ This file contains information about GCC releases up to GCC 2.8.1, and -some information about EGCS releases. For more details of changes in -EGCS releases, and details of changes in GCC 2.95 and more recent -releases, see the release notes on the GCC web site and the file NEWS -which contains the most relevant parts of those release notes in text -form. +a tiny bit of information on EGCS. -Noteworthy changes in GCC for EGCS 1.1. ---------------------------------------- - -The compiler now implements global common subexpression elimination (gcse) as -well as global constant/copy propagation. (link to gcse page). - -More major improvements have been made to the alias analysis code. A new -option to allow front-ends to provide alias information to the optimizers -has also been added (-fstrict-aliasing). -fstrict-aliasing is off by default -now, but will be enabled by default in the future. (link to alias page) - -Major changes continue in the exception handling support. This release -includes some changes to reduce static overhead for exception handling. It -also includes some major changes to the setjmp/longjmp based EH mechanism to -make it less pessimistic. And finally, major infrastructure improvements -to the dwarf2 EH mechanism have been made to make our EH support extensible. - -We have fixed the infamous security problems with temporary files. - -The "regmove" optimization pass has been nearly completely rewritten. It now -uses much more information about the target to determine profitability of -transformations. +For details of changes in EGCS releases and GCC 2.95 and later releases, +see the release notes on the GCC web site or the file NEWS which contains +the most relevant parts of those release notes in text form. -The compiler now recomputes register usage information immediately before -register allocation. Previously such information was only not kept up to -date after instruction combination which led to poor register allocation -choices by our priority based register allocator. - -The register reloading phase of the compiler has been improved to better -optimize spill code. This primarily helps targets which generate lots of -spills (like the x86 ports and many register poor embedded ports). - -A few changes in the heuristics used by the register allocator and scheduler -have been made which can significantly improve performance for certain -applications. - -The compiler's branch shortening algorithms have been significantly improved -to work better on targets which align jump targets. +Changes in GCC for EGCS (that are not listed in the web release notes) +--------------------------------------------------------------------- The compiler now supports the "ADDRESSOF" optimization which can significantly reduce the overhead for certain inline calls (and inline calls in general). -The compiler now supports a code size optimization switch (-Os). When enabled -the compiler will prefer optimizations which improve code size over those -which improve code speed. - -The compiler has been improved to completely eliminate library calls which -compute constant values. This is particularly useful on machines which -do not have integer mul/div or floating point support on-chip. - -GCC now supports a "--help" option to print detailed help information. - -cpplib has been greatly improved. It is probably usable for some sites now -(major missing feature is trigraphs). - -Memory footprint for the compiler has been significantly reduced for certain -pathalogical cases. - -Build time improvements for targets which support lots of sched parameters -(alpha and mips primarily). - Compile time for certain programs using large constant initializers has been improved (affects glibc significantly). -Plus an incredible number of infrastructure changes, warning fixes, bugfixes -and local optimizations. - Various improvements have been made to better support cross compilations. They are still not easy, but they are improving. -Target specific NEWS - - Sparc: Now includes V8 plus and V9 support, lots of tuning for Ultrasparcs - and uses the Haifa scheduler by default. - - Alpha: EV6 tuned, optimized expansion of memcpy/bzero. - - x86: Data in the static store is aligned per Intel recommendations. Jump - targets are aligned per Intel recommendations. Improved epilogue - sequences for Pentium chips. Backend improvements which should help - register allocation on all x86 variants. Support for PPro conditional - move instructions has been fixed and enabled. Random changes - throughout the port to make generated code more Pentium friendly. - Improved support for 64bit integer operations. - Unixware 7, a System V Release 5 target is now supported. - SCO OpenServer targets can support GAS. See gcc/INSTALL for details. - - RS6000/PowerPC: Includes AIX4.3 support as well as PowerPC64 support. - Haifa instruction scheduling is enabled by default now. - - MIPS: Multiply/Multiply-Add support has been largely rewritten to generate - more efficient code. Includes mips16 support. - - M68K: Various micro-optimizations and Coldfire fixes. +Target-specific changes: M32r: Major improvements to this port. Arm: Includes Thumb and super interworking support. -EGCS includes all gcc2 changes up to and including the June 9, 1998 snapshot. - - Noteworthy changes in GCC version 2.8.1 --------------------------------------- diff --git a/contrib/gcc/README.Portability b/contrib/gcc/README.Portability index d69c386..04638b2 100644 --- a/contrib/gcc/README.Portability +++ b/contrib/gcc/README.Portability @@ -123,8 +123,19 @@ int myfunc PARAMS ((double, int *)); int myfunc (var1, var2) - double var1; - int *var2; + double var1; + int *var2; +{ + ... +} + +This implies that if the function takes no arguments, it should be +declared and defined as follows: + +int myfunc PARAMS ((void)); + +int +myfunc () { ... } @@ -139,32 +150,16 @@ void cpp_ice PARAMS ((cpp_reader *, const char *msgid, ...)); void cpp_ice VPARAMS ((cpp_reader *pfile, const char *msgid, ...)) -{ -#ifndef ANSI_PROTOTYPES - cpp_reader *pfile; - const char *msgid; -#endif - va_list ap; - - VA_START (ap, msgid); - -#ifndef ANSI_PROTOTYPES - pfile = va_arg (ap, cpp_reader *); - msgid = va_arg (ap, const char *); -#endif +{ + VA_OPEN (ap, msgid); + VA_FIXEDARG (ap, cpp_reader *, pfile); + VA_FIXEDARG (ap, const char *, msgid); ... - va_end (ap); + VA_CLOSE (ap); } -For the curious, here are the definitions of the above macros. See -ansidecl.h for the definitions of the above macros and more. - -#define PARAMS(paramlist) paramlist /* ISO C. */ -#define VPARAMS(args) args - -#define PARAMS(paramlist) () /* K+R C. */ -#define VPARAMS(args) (va_alist) va_dcl +See ansidecl.h for the definitions of the above macros and more. One aspect of using K+R style function declarations, is you cannot have arguments whose types are char, short, or float, since without @@ -305,8 +300,8 @@ long and int are not the same size. Second, if you write a function definition with no return type at all: - operate(a, b) - int a, b; + operate (a, b) + int a, b; { ... } @@ -319,8 +314,8 @@ Implicit function declarations always have return type int. So if you correct the above definition to void - operate(a, b) - int a, b; + operate (a, b) + int a, b; ... but operate() is called above its definition, you will get an error diff --git a/contrib/gcc/aclocal.m4 b/contrib/gcc/aclocal.m4 index 0c4b5c6..b634e06 100644 --- a/contrib/gcc/aclocal.m4 +++ b/contrib/gcc/aclocal.m4 @@ -306,10 +306,7 @@ procedure conftest is begin null; end conftest; 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 \ +for cand in ${ADAC+"$ADAC"} ${CC+"$CC"} \ ${ac_tool_prefix}gcc gcc \ ${ac_tool_prefix}cc cc \ ${ac_tool_prefix}gnatgcc gnatgcc \ @@ -399,352 +396,93 @@ fi AC_SUBST($1)dnl ]) -# Check whether mmap can map an arbitrary page from /dev/zero or with -# MAP_ANONYMOUS, without MAP_FIXED. -AC_DEFUN([AC_FUNC_MMAP_ANYWHERE], -[AC_CHECK_FUNCS(getpagesize) -# The test program for the next two tests is the same except for one -# set of ifdefs. -changequote({{{,}}})dnl -{{{cat >ct-mmap.inc <<'EOF' -#include +# mmap(2) blacklisting. Some platforms provide the mmap library routine +# but don't support all of the features we need from it. +AC_DEFUN([gcc_AC_FUNC_MMAP_BLACKLIST], +[if test $ac_cv_header_sys_mman_h != yes \ + || test $ac_cv_func_mmap != yes; then + gcc_cv_func_mmap_file=no + gcc_cv_func_mmap_dev_zero=no + gcc_cv_func_mmap_anon=no +else + AC_CACHE_CHECK([whether read-only mmap of a plain file works], + gcc_cv_func_mmap_file, + [# Add a system to this blacklist if + # mmap(0, stat_size, PROT_READ, MAP_PRIVATE, fd, 0) doesn't return a + # memory area containing the same data that you'd get if you applied + # read() to the same fd. The only system known to have a problem here + # is VMS, where text files have record structure. + case "$host_os" in + vms*) + gcc_cv_func_mmap_file=no ;; + *) + gcc_cv_func_mmap_file=yes;; + esac]) + AC_CACHE_CHECK([whether mmap from /dev/zero works], + gcc_cv_func_mmap_dev_zero, + [# Add a system to this blacklist if it has mmap() but /dev/zero + # does not exist, or if mmapping /dev/zero does not give anonymous + # zeroed pages with both the following properties: + # 1. If you map N consecutive pages in with one call, and then + # unmap any subset of those pages, the pages that were not + # explicitly unmapped remain accessible. + # 2. If you map two adjacent blocks of memory and then unmap them + # both at once, they must both go away. + # Systems known to be in this category are Windows (all variants), + # VMS, and Darwin. + case "$host_os" in + vms* | cygwin* | pe | mingw* | darwin*) + gcc_cv_func_mmap_dev_zero=no ;; + *) + gcc_cv_func_mmap_dev_zero=yes;; + esac]) + + # Unlike /dev/zero, the MAP_ANON(YMOUS) defines can be probed for. + AC_CACHE_CHECK([for MAP_ANON(YMOUS)], gcc_cv_decl_map_anon, + [AC_TRY_COMPILE( +[#include #include -#include -#include -#include -#include - -#if !defined (MAP_ANONYMOUS) && defined (MAP_ANON) -# define MAP_ANONYMOUS MAP_ANON -#endif - -/* This mess was copied from the GNU getpagesize.h. */ -#ifndef HAVE_GETPAGESIZE -# ifdef HAVE_UNISTD_H -# include -# endif - -/* Assume that all systems that can run configure have sys/param.h. */ -# ifndef HAVE_SYS_PARAM_H -# define HAVE_SYS_PARAM_H 1 -# endif - -# ifdef _SC_PAGESIZE -# define getpagesize() sysconf(_SC_PAGESIZE) -# else /* no _SC_PAGESIZE */ -# ifdef HAVE_SYS_PARAM_H -# include -# ifdef EXEC_PAGESIZE -# define getpagesize() EXEC_PAGESIZE -# else /* no EXEC_PAGESIZE */ -# ifdef NBPG -# define getpagesize() NBPG * CLSIZE -# ifndef CLSIZE -# define CLSIZE 1 -# endif /* no CLSIZE */ -# else /* no NBPG */ -# ifdef NBPC -# define getpagesize() NBPC -# else /* no NBPC */ -# ifdef PAGESIZE -# define getpagesize() PAGESIZE -# endif /* PAGESIZE */ -# endif /* no NBPC */ -# endif /* no NBPG */ -# endif /* no EXEC_PAGESIZE */ -# else /* no HAVE_SYS_PARAM_H */ -# define getpagesize() 8192 /* punt totally */ -# endif /* no HAVE_SYS_PARAM_H */ -# endif /* no _SC_PAGESIZE */ - -#endif /* no HAVE_GETPAGESIZE */ - -#ifndef MAP_FAILED -# define MAP_FAILED -1 -#endif - -#undef perror_exit -#define perror_exit(str, val) \ - do { perror(str); exit(val); } while (0) - -/* Some versions of cygwin mmap require that munmap is called with the - same parameters as mmap. GCC expects that this is not the case. - Test for various forms of this problem. Warning - icky signal games. */ - -static sigset_t unblock_sigsegv; -static jmp_buf r; -static size_t pg; -static int devzero; +#include -static char * -anonmap (size) - size_t size; -{ -#ifdef USE_MAP_ANON - return (char *) mmap (0, size, PROT_READ|PROT_WRITE, - MAP_PRIVATE|MAP_ANONYMOUS, -1, 0); -#else - return (char *) mmap (0, size, PROT_READ|PROT_WRITE, - MAP_PRIVATE, devzero, 0); +#ifndef MAP_ANONYMOUS +#define MAP_ANONYMOUS MAP_ANON #endif -} - -static void -sigsegv (unused) - int unused; -{ - sigprocmask (SIG_UNBLOCK, &unblock_sigsegv, 0); - longjmp (r, 1); -} - -/* Basic functionality test. */ -void -test_0 () -{ - char *x = anonmap (pg); - if (x == (char *) MAP_FAILED) - perror_exit("test 0 mmap", 2); - - *(int *)x += 1; - - if (munmap(x, pg) < 0) - perror_exit("test 0 munmap", 3); -} - -/* 1. If we map a 2-page region and unmap its second page, the first page - must remain. */ -static void -test_1 () -{ - char *x = anonmap (pg * 2); - if (x == (char *)MAP_FAILED) - perror_exit ("test 1 mmap", 4); - - signal (SIGSEGV, sigsegv); - if (setjmp (r)) - perror_exit ("test 1 fault", 5); - - x[0] = 1; - x[pg] = 1; - - if (munmap (x + pg, pg) < 0) - perror_exit ("test 1 munmap 1", 6); - x[0] = 2; - - if (setjmp (r) == 0) - { - x[pg] = 1; - perror_exit ("test 1 no fault", 7); - } - if (munmap (x, pg) < 0) - perror_exit ("test 1 munmap 2", 8); -} - -/* 2. If we map a 2-page region and unmap its first page, the second - page must remain. */ -static void -test_2 () -{ - char *x = anonmap (pg * 2); - if (x == (char *)MAP_FAILED) - perror_exit ("test 2 mmap", 9); - - signal (SIGSEGV, sigsegv); - if (setjmp (r)) - perror_exit ("test 2 fault", 10); - - x[0] = 1; - x[pg] = 1; - - if (munmap (x, pg) < 0) - perror_exit ("test 2 munmap 1", 11); - - x[pg] = 2; - - if (setjmp (r) == 0) - { - x[0] = 1; - perror_exit ("test 2 no fault", 12); - } - - if (munmap (x+pg, pg) < 0) - perror_exit ("test 2 munmap 2", 13); -} - -/* 3. If we map two adjacent 1-page regions and unmap them both with - one munmap, both must go away. - - Getting two adjacent 1-page regions with two mmap calls is slightly - tricky. All OS's tested skip over already-allocated blocks; therefore - we have been careful to unmap all allocated regions in previous tests. - HP/UX allocates pages backward in memory. No OS has yet been observed - to be so perverse as to leave unmapped space between consecutive calls - to mmap. */ - -static void -test_3 () -{ - char *x, *y, *z; - - x = anonmap (pg); - if (x == (char *)MAP_FAILED) - perror_exit ("test 3 mmap 1", 14); - y = anonmap (pg); - if (y == (char *)MAP_FAILED) - perror_exit ("test 3 mmap 2", 15); - - if (y != x + pg) - { - if (y == x - pg) - z = y, y = x, x = z; - else - { - fprintf (stderr, "test 3 nonconsecutive pages - %lx, %lx\n", - (unsigned long)x, (unsigned long)y); - exit (16); - } - } - - signal (SIGSEGV, sigsegv); - if (setjmp (r)) - perror_exit ("test 3 fault", 17); - - x[0] = 1; - y[0] = 1; - - if (munmap (x, pg*2) < 0) - perror_exit ("test 3 munmap", 18); - - if (setjmp (r) == 0) - { - x[0] = 1; - perror_exit ("test 3 no fault 1", 19); - } - - signal (SIGSEGV, sigsegv); - if (setjmp (r) == 0) - { - y[0] = 1; - perror_exit ("test 3 no fault 2", 20); - } -} - -int -main () -{ - sigemptyset (&unblock_sigsegv); - sigaddset (&unblock_sigsegv, SIGSEGV); - pg = getpagesize (); -#ifndef USE_MAP_ANON - devzero = open ("/dev/zero", O_RDWR); - if (devzero < 0) - perror_exit ("open /dev/zero", 1); -#endif - - test_0(); - test_1(); - test_2(); - test_3(); - - exit(0); -} -EOF}}} -changequote([,])dnl - -AC_CACHE_CHECK(for working mmap from /dev/zero, - ac_cv_func_mmap_dev_zero, -[AC_TRY_RUN( - [#include "ct-mmap.inc"], - ac_cv_func_mmap_dev_zero=yes, - [if test $? -lt 4 - 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 - AC_DEFINE(HAVE_MMAP_DEV_ZERO, 1, - [Define if mmap can get us zeroed pages from /dev/zero.]) -fi - -AC_CACHE_CHECK([for working mmap with MAP_ANON(YMOUS)], - ac_cv_func_mmap_anon, -[AC_TRY_RUN( - [#define USE_MAP_ANON -#include "ct-mmap.inc"], - ac_cv_func_mmap_anon=yes, - [if test $? -lt 4 - then ac_cv_func_mmap_anon=no - else ac_cv_func_mmap_anon=buggy - 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, - [Define if mmap can get us zeroed pages using MAP_ANON(YMOUS).]) +], +[int n = MAP_ANONYMOUS;], + gcc_cv_decl_map_anon=yes, + gcc_cv_decl_map_anon=no)]) + + if test $gcc_cv_decl_map_anon = no; then + gcc_cv_func_mmap_anon=no + else + AC_CACHE_CHECK([whether mmap with MAP_ANON(YMOUS) works], + gcc_cv_func_mmap_anon, + [# Add a system to this blacklist if it has mmap() and MAP_ANON or + # MAP_ANONYMOUS, but using mmap(..., MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) + # doesn't give anonymous zeroed pages with the same properties listed + # above for use of /dev/zero. + # Systems known to be in this category are Windows, VMS, and SCO Unix. + case "$host_os" in + vms* | cygwin* | pe | mingw* | sco* | udk* ) + gcc_cv_func_mmap_anon=no ;; + *) + gcc_cv_func_mmap_anon=yes;; + esac]) + fi fi -rm -f ct-mmap.inc -]) - -# Check whether mmap can map a plain file, without MAP_FIXED. -AC_DEFUN([AC_FUNC_MMAP_FILE], -[AC_CACHE_CHECK(for working mmap of a file, ac_cv_func_mmap_file, -[# Create a file one thousand bytes long. -for i in 1 2 3 4 5 6 7 8 9 0 -do for j in 1 2 3 4 5 6 7 8 9 0 -do echo $i $j xxxxx -done -done > conftestdata$$ - -AC_TRY_RUN([ -/* Test by Zack Weinberg. Modified from MMAP_ANYWHERE test by - Richard Henderson and Alexandre Oliva. - Check whether read-only mmap of a plain file works. */ -#include -#include -#include -#include - -int main() -{ - char *x; - int fd; - struct stat st; - fd = open("conftestdata$$", O_RDONLY); - if (fd < 0) - exit(1); - - if (fstat (fd, &st)) - exit(2); - - x = (char*)mmap(0, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0); - if (x == (char *) -1) - exit(3); - - if (x[0] != '1' || x[1] != ' ' || x[2] != '1' || x[3] != ' ') - exit(4); - - if (munmap(x, st.st_size) < 0) - exit(5); - - 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 +if test $gcc_cv_func_mmap_file = yes; then AC_DEFINE(HAVE_MMAP_FILE, 1, [Define if read-only mmap of a plain file works.]) fi +if test $gcc_cv_func_mmap_dev_zero = yes; then + AC_DEFINE(HAVE_MMAP_DEV_ZERO, 1, + [Define if mmap of /dev/zero works.]) +fi +if test $gcc_cv_func_mmap_anon = yes; then + AC_DEFINE(HAVE_MMAP_ANON, 1, + [Define if mmap with MAP_ANON(YMOUS) works.]) +fi ]) dnl Locate a program and check that its version is acceptable. @@ -1690,3 +1428,29 @@ strdup strtoul tsearch __argz_count __argz_stringify __argz_next]) 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 --git a/contrib/gcc/alias.c b/contrib/gcc/alias.c index db9dc07..4fa4f5c 100644 --- a/contrib/gcc/alias.c +++ b/contrib/gcc/alias.c @@ -1,5 +1,6 @@ /* Alias analysis for GNU C - Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. + 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. @@ -36,6 +37,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #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 @@ -75,7 +77,7 @@ typedef struct alias_set_entry /* 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; } + struct T { struct S s; float f; } continuing our example above, the children here will be all of `int', `double', `float', and `struct S'. */ @@ -108,7 +110,13 @@ static tree decl_for_component_ref PARAMS ((tree)); 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. */ @@ -125,7 +133,7 @@ static int nonlocal_mentioned_p PARAMS ((rtx)); /* 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 @@ -134,7 +142,7 @@ static int nonlocal_mentioned_p PARAMS ((rtx)); 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 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 @@ -145,10 +153,14 @@ static int nonlocal_mentioned_p PARAMS ((rtx)); current function performs nonlocal memory memory references for the purposes of marking the function as a constant function. */ -static rtx *reg_base_value; +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) @@ -188,7 +200,7 @@ char *reg_known_equiv_p; /* True when scanning insns from the start of the rtl to the NOTE_INSN_FUNCTION_BEG note. */ -static int copying_arguments; +static bool copying_arguments; /* The splay-tree used to store the various alias set entries. */ static splay_tree alias_sets; @@ -209,12 +221,12 @@ get_alias_set_entry (alias_set) /* Returns nonzero if the alias sets for MEM1 and MEM2 are such that the two MEMs cannot alias each other. */ -static int +static int mems_in_disjoint_alias_sets_p (mem1, mem2) rtx mem1; rtx mem2; { -#ifdef ENABLE_CHECKING +#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 @@ -311,6 +323,8 @@ int objects_must_conflict_p (t1, t2) tree t1, t2; { + HOST_WIDE_INT set1, set2; + /* If neither has a type specified, we don't know if they'll conflict because we may be using them to store objects of various types, for example the argument and local variables areas of inlined functions. */ @@ -331,15 +345,15 @@ objects_must_conflict_p (t1, t2) || (t1 != 0 && TYPE_VOLATILE (t1) && t2 != 0 && TYPE_VOLATILE (t2))) return 1; - /* If one is aggregate and the other is scalar then they may not - conflict. */ - if ((t1 != 0 && AGGREGATE_TYPE_P (t1)) - != (t2 != 0 && AGGREGATE_TYPE_P (t2))) - return 0; + set1 = t1 ? get_alias_set (t1) : 0; + set2 = t2 ? get_alias_set (t2) : 0; - /* Otherwise they conflict only if the alias sets conflict. */ - return alias_sets_conflict_p (t1 ? get_alias_set (t1) : 0, - t2 ? get_alias_set (t2) : 0); + /* Otherwise they conflict if they have no alias set or the same. We + can't simply use alias_sets_conflict_p here, because we must make + sure that every subtype of t1 will conflict with every subtype of + t2 for which a pair of subobjects of these respective subtypes + overlaps on the stack. */ + return set1 == 0 || set2 == 0 || set1 == set2; } /* T is an expression with pointer type. Find the DECL on which this @@ -508,8 +522,8 @@ get_alias_set (t) else { DECL_POINTER_ALIAS_SET (decl) = new_alias_set (); - record_alias_subset (pointed_to_alias_set, - DECL_POINTER_ALIAS_SET (decl)); + record_alias_subset (pointed_to_alias_set, + DECL_POINTER_ALIAS_SET (decl)); } } @@ -603,7 +617,7 @@ new_alias_set () 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. + 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. */ @@ -625,14 +639,14 @@ record_alias_subset (superset, subset) abort (); superset_entry = get_alias_set_entry (superset); - if (superset_entry == 0) + 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 + 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, @@ -646,7 +660,7 @@ record_alias_subset (superset, subset) 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) { if (subset_entry->has_zero_child) superset_entry->has_zero_child = 1; @@ -656,7 +670,7 @@ record_alias_subset (superset, subset) } /* Enter the SUBSET itself as a child of the SUPERSET. */ - splay_tree_insert (superset_entry->children, + splay_tree_insert (superset_entry->children, (splay_tree_key) subset, 0); } } @@ -687,6 +701,17 @@ record_component_aliases (type) 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))); @@ -759,9 +784,17 @@ find_base_value (src) 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]; + && 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; @@ -1111,7 +1144,7 @@ rtx_equal_for_memref_p (x, y) case LABEL_REF: return XEXP (x, 0) == XEXP (y, 0); - + case SYMBOL_REF: return XSTR (x, 0) == XSTR (y, 0); @@ -1248,7 +1281,7 @@ find_base_term (x) case TRUNCATE: if (GET_MODE_SIZE (GET_MODE (x)) < GET_MODE_SIZE (Pmode)) - return 0; + return 0; /* Fall through. */ case HIGH: case PRE_INC: @@ -1302,7 +1335,7 @@ find_base_term (x) 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); @@ -1400,7 +1433,7 @@ base_alias_check (x, y, x_mode, y_mode) if (rtx_equal_p (x_base, y_base)) return 1; - /* The base addresses of the read and write are different expressions. + /* 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, @@ -1475,7 +1508,7 @@ addr_side_effect_eval (addr, size, n_refs) int n_refs; { int offset = 0; - + switch (GET_CODE (addr)) { case PRE_INC: @@ -1494,7 +1527,7 @@ addr_side_effect_eval (addr, size, n_refs) default: return addr; } - + if (offset) addr = gen_rtx_PLUS (GET_MODE (addr), XEXP (addr, 0), GEN_INT (offset)); else @@ -1657,7 +1690,7 @@ memrefs_conflict_p (xsize, x, ysize, y, c) } /* Treat an access through an AND (e.g. a subword access on an Alpha) - as an access with indeterminate size. Assume that references + 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) @@ -1669,7 +1702,7 @@ memrefs_conflict_p (xsize, x, ysize, y, c) 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 + 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))) @@ -1731,7 +1764,7 @@ memrefs_conflict_p (xsize, x, ysize, y, c) 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. + 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 @@ -1758,23 +1791,23 @@ read_dependence (mem, x) 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) + 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) + 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. */ @@ -1794,7 +1827,7 @@ aliases_everything_p (mem) /* If the address is an AND, its very hard to know at what it is actually pointing. */ return 1; - + return 0; } @@ -1852,7 +1885,7 @@ nonoverlapping_component_refs_p (x, y) while (x && y && TREE_CODE (x) == COMPONENT_REF && TREE_CODE (y) == COMPONENT_REF); - + return false; } @@ -1885,7 +1918,7 @@ adjust_offset_for_component_ref (x, offset) return NULL_RTX; ioffset = INTVAL (offset); - do + do { tree field = TREE_OPERAND (x, 1); @@ -1986,15 +2019,15 @@ nonoverlapping_memrefs_p (x, y) 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 + 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)))); + 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)) @@ -2111,9 +2144,9 @@ true_dependence (mem, mem_mode, x, varies) } /* 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 + 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 @@ -2177,8 +2210,8 @@ canon_true_dependence (mem, mem_mode, mem_addr, x, varies) 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. */ +/* 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) @@ -2239,7 +2272,7 @@ write_dependence_p (mem, x, writep) SIZE_FOR_MODE (x), x_addr, 0)) return 0; - fixed_scalar + fixed_scalar = fixed_scalar_and_varying_struct_p (mem, x, mem_addr, x_addr, rtx_addr_varies_p); @@ -2266,36 +2299,23 @@ output_dependence (mem, x) { 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. */ + +/* 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 (x) - rtx x; +nonlocal_mentioned_p_1 (loc, data) + rtx *loc; + void *data ATTRIBUTE_UNUSED; { + rtx x = *loc; 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); - } + if (! x) + return 0; - switch (code) + switch (GET_CODE (x)) { case SUBREG: if (GET_CODE (SUBREG_REG (x)) == REG) @@ -2377,74 +2397,263 @@ nonlocal_mentioned_p (x) break; } - /* Recursively scan the operands of this expression. */ + return 0; +} - { - 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; - } - } - } +/* 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_mentioned; + int nonlocal_memory_referenced; - if (TREE_PUBLIC (current_function_decl) - || TREE_READONLY (current_function_decl) + 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) + || 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_mentioned = 0; + nonlocal_memory_referenced = 0; init_alias_analysis (); - /* Determine if this is a constant function. */ + /* Determine if this is a constant or pure function. */ for (insn = get_insns (); insn; insn = NEXT_INSN (insn)) - if (INSN_P (insn) && nonlocal_mentioned_p (insn)) - { - nonlocal_mentioned = 1; + { + 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 (! nonlocal_mentioned) + if (insn) + ; + else if (nonlocal_memory_referenced) + DECL_IS_PURE (current_function_decl) = 1; + else TREE_READONLY (current_function_decl) = 1; } - - -static HARD_REG_SET argument_registers; + void init_alias_once () @@ -2460,7 +2669,19 @@ init_alias_once () 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); + 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); } @@ -2479,10 +2700,10 @@ init_alias_analysis () reg_known_value_size = maxreg; - reg_known_value + reg_known_value = (rtx *) xcalloc ((maxreg - FIRST_PSEUDO_REGISTER), sizeof (rtx)) - FIRST_PSEUDO_REGISTER; - reg_known_equiv_p + reg_known_equiv_p = (char*) xcalloc ((maxreg - FIRST_PSEUDO_REGISTER), sizeof (char)) - FIRST_PSEUDO_REGISTER; @@ -2490,8 +2711,8 @@ init_alias_analysis () 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); + 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); @@ -2534,7 +2755,7 @@ init_alias_analysis () /* We're at the start of the function each iteration through the loop, so we're copying arguments. */ - copying_arguments = 1; + 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)); @@ -2550,21 +2771,8 @@ init_alias_analysis () 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 + 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)) @@ -2637,7 +2845,7 @@ init_alias_analysis () } else if (GET_CODE (insn) == NOTE && NOTE_LINE_NUMBER (insn) == NOTE_INSN_FUNCTION_BEG) - copying_arguments = 0; + copying_arguments = false; } /* Now propagate values from new_reg_base_value to reg_base_value. */ @@ -2705,12 +2913,7 @@ end_alias_analysis () 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 = 0; reg_base_value_size = 0; if (alias_invariant) { @@ -2718,3 +2921,5 @@ end_alias_analysis () alias_invariant = 0; } } + +#include "gt-alias.h" diff --git a/contrib/gcc/ansidecl.h b/contrib/gcc/ansidecl.h index 9a7c577..f8f2d73 100644 --- a/contrib/gcc/ansidecl.h +++ b/contrib/gcc/ansidecl.h @@ -136,10 +136,13 @@ So instead we use the macro below and test it against specific values. */ #define GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__) #endif /* GCC_VERSION */ -#if defined (__STDC__) || defined (_AIX) || (defined (__mips) && defined (_SYSTYPE_SVR4)) || defined(_WIN32) +#if defined (__STDC__) || defined (_AIX) || (defined (__mips) && defined (_SYSTYPE_SVR4)) || defined(_WIN32) || (defined(__alpha) && defined(__cplusplus)) /* All known AIX compilers implement these things (but don't always define __STDC__). The RISC/OS MIPS compiler defines these things in SVR4 mode, but does not define __STDC__. */ +/* eraxxon@alumni.rice.edu: The Compaq C++ compiler, unlike many other + C++ compilers, does not define __STDC__, though it acts as if this + was so. (Verified versions: 5.7, 6.2, 6.3, 6.5) */ #define ANSI_PROTOTYPES 1 #define PTR void * @@ -265,8 +268,21 @@ So instead we use the macro below and test it against specific values. */ #define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__)) #endif /* ATTRIBUTE_NORETURN */ +/* Attribute `nonnull' was valid as of gcc 3.3. */ +#ifndef ATTRIBUTE_NONNULL +# if (GCC_VERSION >= 3003) +# define ATTRIBUTE_NONNULL(m) __attribute__ ((__nonnull__ (m))) +# else +# define ATTRIBUTE_NONNULL(m) +# endif /* GNUC >= 3.3 */ +#endif /* ATTRIBUTE_NONNULL */ + +/* Use ATTRIBUTE_PRINTF when the format specifier must not be NULL. + This was the case for the `printf' format attribute by itself + before GCC 3.3, but as of 3.3 we need to add the `nonnull' + attribute to retain this behavior. */ #ifndef ATTRIBUTE_PRINTF -#define ATTRIBUTE_PRINTF(m, n) __attribute__ ((__format__ (__printf__, m, n))) +#define ATTRIBUTE_PRINTF(m, n) __attribute__ ((__format__ (__printf__, m, n))) ATTRIBUTE_NONNULL(m) #define ATTRIBUTE_PRINTF_1 ATTRIBUTE_PRINTF(1, 2) #define ATTRIBUTE_PRINTF_2 ATTRIBUTE_PRINTF(2, 3) #define ATTRIBUTE_PRINTF_3 ATTRIBUTE_PRINTF(3, 4) @@ -274,6 +290,21 @@ So instead we use the macro below and test it against specific values. */ #define ATTRIBUTE_PRINTF_5 ATTRIBUTE_PRINTF(5, 6) #endif /* ATTRIBUTE_PRINTF */ +/* Use ATTRIBUTE_NULL_PRINTF when the format specifier may be NULL. A + NULL format specifier was allowed as of gcc 3.3. */ +#ifndef ATTRIBUTE_NULL_PRINTF +# if (GCC_VERSION >= 3003) +# define ATTRIBUTE_NULL_PRINTF(m, n) __attribute__ ((__format__ (__printf__, m, n))) +# else +# define ATTRIBUTE_NULL_PRINTF(m, n) +# endif /* GNUC >= 3.3 */ +# define ATTRIBUTE_NULL_PRINTF_1 ATTRIBUTE_NULL_PRINTF(1, 2) +# define ATTRIBUTE_NULL_PRINTF_2 ATTRIBUTE_NULL_PRINTF(2, 3) +# define ATTRIBUTE_NULL_PRINTF_3 ATTRIBUTE_NULL_PRINTF(3, 4) +# define ATTRIBUTE_NULL_PRINTF_4 ATTRIBUTE_NULL_PRINTF(4, 5) +# define ATTRIBUTE_NULL_PRINTF_5 ATTRIBUTE_NULL_PRINTF(5, 6) +#endif /* ATTRIBUTE_NULL_PRINTF */ + /* We use __extension__ in some places to suppress -pedantic warnings about GCC extensions. This feature didn't work properly before gcc 2.8. */ diff --git a/contrib/gcc/attribs.c b/contrib/gcc/attribs.c index 47b7cf2..c5a8a73 100644 --- a/contrib/gcc/attribs.c +++ b/contrib/gcc/attribs.c @@ -29,164 +29,45 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include "ggc.h" #include "expr.h" #include "tm_p.h" -#include "obstack.h" #include "cpplib.h" #include "target.h" +#include "langhooks.h" static void init_attributes PARAMS ((void)); -/* Table of the tables of attributes (common, format, language, machine) +/* Table of the tables of attributes (common, language, format, 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 + size_t i; - 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[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 < (int) (sizeof (attribute_tables) / sizeof (attribute_tables[0])); - i++) + for (i = 0; i < ARRAY_SIZE (attribute_tables); i++) { int j; @@ -218,9 +99,7 @@ init_attributes () } /* Check that each name occurs just once in each table. */ - for (i = 0; - i < (int) (sizeof (attribute_tables) / sizeof (attribute_tables[0])); - i++) + for (i = 0; i < ARRAY_SIZE (attribute_tables); i++) { int j, k; for (j = 0; attribute_tables[i][j].name != NULL; j++) @@ -230,16 +109,11 @@ init_attributes () abort (); } /* Check that no name occurs in more than one table. */ - for (i = 0; - i < (int) (sizeof (attribute_tables) / sizeof (attribute_tables[0])); - i++) + for (i = 0; i < ARRAY_SIZE (attribute_tables); i++) { - int j, k, l; + size_t j, k, l; - for (j = i + 1; - j < ((int) (sizeof (attribute_tables) - / sizeof (attribute_tables[0]))); - j++) + 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, @@ -279,7 +153,7 @@ decl_attributes (node, attributes, flags) if (DECL_P (*node) && TREE_CODE (*node) == FUNCTION_DECL && !(flags & (int) ATTR_FLAG_BUILT_IN)) - insert_default_attributes (*node); + (*lang_hooks.insert_default_attributes) (*node); for (a = attributes; a; a = TREE_CHAIN (a)) { @@ -288,12 +162,9 @@ decl_attributes (node, attributes, flags) tree *anode = node; const struct attribute_spec *spec = NULL; bool no_add_attrs = 0; - int i; + size_t i; - for (i = 0; - i < ((int) (sizeof (attribute_tables) - / sizeof (attribute_tables[0]))); - i++) + for (i = 0; i < ARRAY_SIZE (attribute_tables); i++) { int j; @@ -433,930 +304,6 @@ decl_attributes (node, attributes, flags) 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). @@ -1375,7 +322,7 @@ split_specs_attrs (specs_attrs, declspecs, prefix_attributes) tree t, s, a, next, specs, attrs; /* This can happen after an __extension__ in pedantic mode. */ - if (specs_attrs != NULL_TREE + if (specs_attrs != NULL_TREE && TREE_CODE (specs_attrs) == INTEGER_CST) { *declspecs = NULL_TREE; diff --git a/contrib/gcc/basic-block.h b/contrib/gcc/basic-block.h index aa78b45..1829fde 100644 --- a/contrib/gcc/basic-block.h +++ b/contrib/gcc/basic-block.h @@ -26,6 +26,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #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; @@ -33,7 +34,7 @@ typedef bitmap_head regset_head; typedef bitmap regset; /* Initialize a new regset. */ -#define INIT_REG_SET(HEAD) bitmap_initialize (HEAD) +#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) @@ -99,7 +100,7 @@ do { \ #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) +#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) @@ -135,12 +136,16 @@ typedef struct edge_def { 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_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) @@ -205,9 +210,15 @@ typedef struct basic_block_def { /* 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; @@ -221,12 +232,19 @@ typedef struct basic_block_def { #define BB_FREQ_MAX 10000 /* Masks for basic_block.flags. */ -#define BB_REACHABLE 1 +#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; @@ -237,13 +255,30 @@ extern varray_type basic_block_info; #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 rtx label_value_list, tail_recursion_label_list; +extern GTY(()) rtx label_value_list; +extern GTY(()) rtx tail_recursion_label_list; extern struct obstack flow_obstack; @@ -279,27 +314,30 @@ extern struct basic_block_def entry_exit_blocks[2]; #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) +#define set_block_for_insn(INSN, BB) (BLOCK_FOR_INSN (INSN) = BB) -extern void compute_bb_for_insn PARAMS ((int)); +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 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 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, @@ -308,10 +346,11 @@ extern void remove_edge PARAMS ((edge)); 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 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)); @@ -324,6 +363,10 @@ extern void clear_edges PARAMS ((void)); 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 { @@ -379,6 +422,9 @@ struct loop /* 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; @@ -392,10 +438,7 @@ struct loop /* 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.). */ + /* Nonzero if the loop is invalid (e.g., contains setjmp.). */ int invalid; /* Auxiliary info specific to a pass. */ @@ -404,16 +447,13 @@ struct loop /* 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. */ + /* Nonzero if the loop has a NOTE_INSN_LOOP_VTOP. */ rtx vtop; - /* Non-zero if the loop has a NOTE_INSN_LOOP_CONT. + /* Nonzero 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; @@ -460,6 +500,11 @@ struct loops 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; @@ -467,7 +512,7 @@ struct loops struct cfg { /* The bitmap vector of dominators or NULL if not computed. */ - sbitmap *dom; + dominance_info dom; /* The ordering of the basic blocks in a depth first search. */ int *dfs_order; @@ -481,6 +526,33 @@ struct loops 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 *)); @@ -491,6 +563,8 @@ extern void flow_loop_dump PARAMS ((const struct loop *, FILE *, 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 @@ -562,7 +636,12 @@ enum update_life_extent 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 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 */ @@ -575,6 +654,8 @@ enum update_life_extent 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. */ @@ -582,12 +663,13 @@ enum update_life_extent #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 */ +#define LOOP_ALL 15 /* All of the above */ extern void life_analysis PARAMS ((rtx, FILE *, int)); -extern void update_life_info PARAMS ((sbitmap, enum update_life_extent, +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)); @@ -617,7 +699,12 @@ extern rtx emit_block_insn_before PARAMS ((rtx, rtx, basic_block)); /* 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)); @@ -630,10 +717,12 @@ extern void debug_regset PARAMS ((regset)); 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 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 void delete_noop_moves PARAMS ((rtx)); +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)); @@ -661,13 +750,32 @@ extern void free_aux_for_edges PARAMS ((void)); 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)); +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, non-zero to halt enumeration. */ + enumeration is to continue, nonzero to halt enumeration. */ typedef int (*conflict_graph_enum_fn) PARAMS ((int, int, void *)); @@ -690,8 +798,12 @@ extern conflict_graph conflict_graph_compute 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 */ @@ -702,7 +814,21 @@ enum cdi_direction CDI_POST_DOMINATORS }; -extern void calculate_dominance_info PARAMS ((int *, sbitmap *, - enum cdi_direction)); - +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 --git a/contrib/gcc/bb-reorder.c b/contrib/gcc/bb-reorder.c index b0cc462..857e0fb 100644 --- a/contrib/gcc/bb-reorder.c +++ b/contrib/gcc/bb-reorder.c @@ -89,11 +89,13 @@ #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. */ @@ -102,14 +104,11 @@ static void make_reorder_chain () { basic_block prev = NULL; - int nbb_m1 = n_basic_blocks - 1; - basic_block next; + basic_block next, bb; /* Loop until we've placed every block. */ do { - int i; - next = NULL; /* Find the next unplaced block. */ @@ -119,19 +118,59 @@ make_reorder_chain () 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) + FOR_EACH_BB (bb) + if (! RBI (bb)->visited) + { next = bb; - } + break; + } + if (next) - prev = make_reorder_chain_1 (next, prev); + 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. @@ -158,13 +197,13 @@ make_reorder_chain_1 (bb, prev) restart: RBI (prev)->next = bb; - if (rtl_dump_file && prev->index + 1 != bb->index) + 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->index != 0) + if (bb->prev_bb != ENTRY_BLOCK_PTR) abort (); } RBI (bb)->visited = 1; @@ -205,9 +244,13 @@ make_reorder_chain_1 (bb, prev) e_taken = e; } - next = (taken ? e_taken : e_fall)->dest; + 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. */ @@ -221,7 +264,7 @@ make_reorder_chain_1 (bb, prev) next = e->dest; break; } - else if (e->dest->index == bb->index + 1) + else if (e->dest == bb->next_bb) { if (! (e->flags & (EDGE_ABNORMAL_CALL | EDGE_EH))) next = e->dest; diff --git a/contrib/gcc/bitmap.c b/contrib/gcc/bitmap.c index 786689b..917e87b 100644 --- a/contrib/gcc/bitmap.c +++ b/contrib/gcc/bitmap.c @@ -1,5 +1,6 @@ /* Functions to support general ended bitmaps. - Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 1997, 1998, 1999, 2000, 2001, 2003 + Free Software Foundation, Inc. This file is part of GCC. @@ -23,6 +24,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include "rtl.h" #include "flags.h" #include "obstack.h" +#include "ggc.h" #include "bitmap.h" /* Obstack to allocate bitmap elements from. */ @@ -40,13 +42,33 @@ static int bitmap_obstack_init = FALSE; /* 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 ((void)); +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". */ @@ -75,56 +97,68 @@ bitmap_element_free (head, elt) if (head->current) head->indx = head->current->indx; } - - elt->next = bitmap_free; - bitmap_free = elt; + 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 () +bitmap_element_allocate (head) + bitmap head; { bitmap_element *element; - if (bitmap_free != 0) - { - element = bitmap_free; - bitmap_free = element->next; - } - else + if (head->using_obstack) { - /* 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) + if (bitmap_free != 0) { - bitmap_obstack_init = TRUE; - - /* Let particular systems override the size of a chunk. */ + 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. */ + /* 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); + + 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)); } - - 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)); @@ -232,11 +266,10 @@ bitmap_clear (head) for (element = head->first; element != 0; element = next) { next = element->next; - element->next = bitmap_free; - bitmap_free = element; + bitmap_elem_to_freelist (head, element); } - head->first = head->current = 0; + head->first = head->current = 0; } /* Copy a bitmap to another bitmap. */ @@ -256,7 +289,7 @@ bitmap_copy (to, from) /* 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 (); + bitmap_element *to_elt = bitmap_element_allocate (to); to_elt->indx = from_ptr->indx; @@ -298,7 +331,7 @@ bitmap_find_bit (head, bit) unsigned int bit; { bitmap_element *element; - unsigned HOST_WIDE_INT indx = bit / BITMAP_ELEMENT_ALL_BITS; + unsigned int indx = bit / BITMAP_ELEMENT_ALL_BITS; if (head->current == 0 || head->indx == indx) @@ -337,10 +370,9 @@ bitmap_clear_bit (head, bit) 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); + 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)) @@ -356,14 +388,13 @@ bitmap_set_bit (head, bit) 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; + 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 (); + ptr = bitmap_element_allocate (head); ptr->indx = bit / BITMAP_ELEMENT_ALL_BITS; ptr->bits[word_num] = bit_val; bitmap_element_link (head, ptr); @@ -387,9 +418,8 @@ bitmap_bit_p (head, bit) 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); + bit_num = bit % BITMAP_WORD_BITS; + word_num = bit / BITMAP_WORD_BITS % BITMAP_ELEMENT_WORDS; return (ptr->bits[word_num] >> bit_num) & 1; } @@ -397,12 +427,12 @@ bitmap_bit_p (head, bit) /* Return the bit number of the first set bit in the bitmap, or -1 if the bitmap is empty. */ -int +int bitmap_first_set_bit (a) bitmap a; { bitmap_element *ptr = a->first; - unsigned HOST_WIDE_INT word; + BITMAP_WORD word; unsigned word_num, bit_num; if (ptr == NULL) @@ -424,10 +454,10 @@ bitmap_first_set_bit (a) bit_num = 0; word = word & -word; -#if HOST_BITS_PER_WIDE_INT > 64 +#if nBITMAP_WORD_BITS > 64 #error "Fill out the table." #endif -#if HOST_BITS_PER_WIDE_INT > 32 +#if nBITMAP_WORD_BITS > 32 if ((word & 0xffffffff) == 0) word >>= 32, bit_num += 32; #endif @@ -443,19 +473,19 @@ bitmap_first_set_bit (a) bit_num += 1; return (ptr->indx * BITMAP_ELEMENT_ALL_BITS - + word_num * HOST_BITS_PER_WIDE_INT + + 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 +int bitmap_last_set_bit (a) bitmap a; { bitmap_element *ptr = a->first; - unsigned HOST_WIDE_INT word; + BITMAP_WORD word; unsigned word_num, bit_num; if (ptr == NULL) @@ -477,11 +507,11 @@ bitmap_last_set_bit (a) /* Binary search for the last set bit. */ bit_num = 0; -#if HOST_BITS_PER_WIDE_INT > 64 +#if nBITMAP_WORD_BITS > 64 #error "Fill out the table." #endif -#if HOST_BITS_PER_WIDE_INT > 32 - if (word & ~ (unsigned HOST_WIDE_INT) 0xffffffff) +#if nBITMAP_WORD_BITS > 32 + if (word & ~(BITMAP_WORD)0xffffffff) word >>= 32, bit_num += 32; #endif if (word & 0xffff0000) @@ -496,7 +526,7 @@ bitmap_last_set_bit (a) bit_num += 1; return (ptr->indx * BITMAP_ELEMENT_ALL_BITS - + word_num * HOST_BITS_PER_WIDE_INT + + word_num * BITMAP_WORD_BITS + bit_num); } @@ -526,7 +556,7 @@ bitmap_operation (to, from1, from2, operation) #if BITMAP_ELEMENT_WORDS == 2 #define DOIT(OP) \ do { \ - unsigned HOST_WIDE_INT t0, t1, f10, f11, f20, f21; \ + BITMAP_WORD t0, t1, f10, f11, f20, f21; \ f10 = from1_tmp->bits[0]; \ f20 = from2_tmp->bits[0]; \ t0 = f10 OP f20; \ @@ -541,7 +571,7 @@ bitmap_operation (to, from1, from2, operation) #else #define DOIT(OP) \ do { \ - unsigned HOST_WIDE_INT t, f1, f2; \ + BITMAP_WORD t, f1, f2; \ int i; \ for (i = 0; i < BITMAP_ELEMENT_WORDS; ++i) \ { \ @@ -594,8 +624,7 @@ bitmap_operation (to, from1, from2, operation) changed = 1; to_tmp = to_ptr; to_ptr = to_ptr->next; - to_tmp->next = bitmap_free; - bitmap_free = to_tmp; + bitmap_elem_to_freelist (to, to_tmp); } if (to_ptr && to_ptr->indx == indx) { @@ -603,7 +632,7 @@ bitmap_operation (to, from1, from2, operation) to_ptr = to_ptr->next; } else - to_tmp = bitmap_element_allocate (); + to_tmp = bitmap_element_allocate (to); /* Do the operation, and if any bits are set, link it into the linked list. */ @@ -638,8 +667,7 @@ bitmap_operation (to, from1, from2, operation) } else { - to_tmp->next = bitmap_free; - bitmap_free = to_tmp; + bitmap_elem_to_freelist (to, to_tmp); } } @@ -649,8 +677,16 @@ bitmap_operation (to, from1, from2, operation) 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; + 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 @@ -668,7 +704,7 @@ bitmap_equal_p (a, b) bitmap_head c; int ret; - c.first = c.current = 0; + memset (&c, 0, sizeof (c)); ret = ! bitmap_operation (&c, a, b, BITMAP_XOR); bitmap_clear (&c); @@ -687,6 +723,7 @@ bitmap_ior_and_compl (to, from1, from2) 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); @@ -704,6 +741,7 @@ bitmap_union_of_diff (dst, a, b, c) 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); @@ -715,10 +753,15 @@ bitmap_union_of_diff (dst, a, b, c) /* Initialize a bitmap header. */ bitmap -bitmap_initialize (head) +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; } @@ -740,7 +783,7 @@ debug_bitmap_file (file, head) for (ptr = head->first; ptr; ptr = ptr->next) { - int i, j, col = 26; + unsigned int i, j, col = 26; fprintf (file, "\t"); fprintf (file, HOST_PTR_PRINTF, (PTR) ptr); @@ -751,7 +794,7 @@ debug_bitmap_file (file, head) 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++) + for (j = 0; j < BITMAP_WORD_BITS; j++) if ((ptr->bits[i] >> j) & 1) { if (col > 70) @@ -761,7 +804,7 @@ debug_bitmap_file (file, head) } fprintf (file, " %u", (ptr->indx * BITMAP_ELEMENT_ALL_BITS - + i * HOST_BITS_PER_WIDE_INT + j)); + + i * BITMAP_WORD_BITS + j)); col += 4; } @@ -800,3 +843,5 @@ bitmap_print (file, head, prefix, suffix) }); fputs (suffix, file); } + +#include "gt-bitmap.h" diff --git a/contrib/gcc/bitmap.h b/contrib/gcc/bitmap.h index 8925d86..85f8239 100644 --- a/contrib/gcc/bitmap.h +++ b/contrib/gcc/bitmap.h @@ -1,5 +1,5 @@ /* Functions to support general ended bitmaps. - Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 + Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. This file is part of GCC. @@ -20,12 +20,20 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef GCC_BITMAP_H -#define 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 2 +#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 @@ -33,28 +41,30 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA bits is unsigned, assuming it is a power of 2. */ #define BITMAP_ELEMENT_ALL_BITS \ - ((unsigned) (BITMAP_ELEMENT_WORDS * HOST_BITS_PER_WIDE_INT)) + ((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 +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. */ - unsigned HOST_WIDE_INT bits[BITMAP_ELEMENT_WORDS]; /* Bits that are set. */ + BITMAP_WORD bits[BITMAP_ELEMENT_WORDS]; /* Bits that are set. */ } bitmap_element; /* Head of bitmap linked list. */ -typedef struct bitmap_head_def { +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. */ - -} bitmap_head, *bitmap; + 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 { @@ -100,10 +110,12 @@ extern void debug_bitmap_file PARAMS ((FILE *, bitmap)); /* Print a bitmap */ extern void bitmap_print PARAMS ((FILE *, bitmap, const char *, const char *)); -/* Initialize a bitmap header. */ -extern bitmap bitmap_initialize PARAMS ((bitmap)); +/* 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 held by bitmaps. */ +/* Release all memory used by the bitmap obstack. */ extern void bitmap_release_memory PARAMS ((void)); /* A few compatibility/functions macros for compatibility with sbitmaps */ @@ -117,22 +129,15 @@ extern int bitmap_last_set_bit PARAMS((bitmap)); /* 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) - + 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))) + 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) \ @@ -165,9 +170,8 @@ do { \ 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); \ + 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. */ \ @@ -184,20 +188,19 @@ do { \ { \ for (; word_num_ < BITMAP_ELEMENT_WORDS; word_num_++) \ { \ - unsigned HOST_WIDE_INT word_ = ptr_->bits[word_num_]; \ + BITMAP_WORD word_ = ptr_->bits[word_num_]; \ \ if (word_ != 0) \ { \ - for (; bit_num_ < HOST_BITS_PER_WIDE_INT; bit_num_++) \ + for (; bit_num_ < BITMAP_WORD_BITS; bit_num_++) \ { \ - unsigned HOST_WIDE_INT mask_ \ - = ((unsigned HOST_WIDE_INT) 1) << 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_ * HOST_BITS_PER_WIDE_INT \ + + word_num_ * BITMAP_WORD_BITS \ + bit_num_); \ CODE; \ \ @@ -223,9 +226,8 @@ do { \ 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); \ + 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_) \ @@ -251,20 +253,19 @@ do { \ \ for (; word_num_ < BITMAP_ELEMENT_WORDS; word_num_++) \ { \ - unsigned HOST_WIDE_INT word_ = (ptr1_->bits[word_num_] \ - & ~ tmp2_->bits[word_num_]); \ + BITMAP_WORD word_ = (ptr1_->bits[word_num_] \ + & ~ tmp2_->bits[word_num_]); \ if (word_ != 0) \ { \ - for (; bit_num_ < HOST_BITS_PER_WIDE_INT; bit_num_++) \ + for (; bit_num_ < BITMAP_WORD_BITS; bit_num_++) \ { \ - unsigned HOST_WIDE_INT mask_ \ - = ((unsigned HOST_WIDE_INT)1) << 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_ * HOST_BITS_PER_WIDE_INT \ + + word_num_ * BITMAP_WORD_BITS \ + bit_num_); \ \ CODE; \ @@ -290,9 +291,8 @@ do { \ 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); \ + 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_) \ @@ -324,20 +324,19 @@ do { \ \ for (; word_num_ < BITMAP_ELEMENT_WORDS; word_num_++) \ { \ - unsigned HOST_WIDE_INT word_ = (ptr1_->bits[word_num_] \ - & ptr2_->bits[word_num_]); \ + BITMAP_WORD word_ = (ptr1_->bits[word_num_] \ + & ptr2_->bits[word_num_]); \ if (word_ != 0) \ { \ - for (; bit_num_ < HOST_BITS_PER_WIDE_INT; bit_num_++) \ + for (; bit_num_ < BITMAP_WORD_BITS; bit_num_++) \ { \ - unsigned HOST_WIDE_INT mask_ \ - = ((unsigned HOST_WIDE_INT)1) << 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_ * HOST_BITS_PER_WIDE_INT \ + + word_num_ * BITMAP_WORD_BITS \ + bit_num_); \ \ CODE; \ diff --git a/contrib/gcc/builtin-attrs.def b/contrib/gcc/builtin-attrs.def index 10b3708..7bdbd62 100644 --- a/contrib/gcc/builtin-attrs.def +++ b/contrib/gcc/builtin-attrs.def @@ -1,4 +1,4 @@ -/* Copyright (C) 2001 Free Software Foundation, Inc. +/* Copyright (C) 2001, 2002 Free Software Foundation, Inc. Contributed by Joseph Myers . This file is part of GCC. @@ -77,36 +77,65 @@ DEF_LIST_INT_INT (3,0) 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_STRFTIME, "strftime") DEF_ATTR_IDENT (ATTR_STRFMON, "strfmon") +DEF_ATTR_IDENT (ATTR_STRFTIME, "strftime") -DEF_ATTR_IDENT (ATTR_FORMAT, "format") -DEF_ATTR_IDENT (ATTR_FORMAT_ARG, "format_arg") +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, VALUES) \ +#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), 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) + 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 -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) +/* 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) \ @@ -121,24 +150,10 @@ DEF_ATTR_TREE_LIST (ATTR_FORMAT_ARG_2, ATTR_FORMAT_ARG, ATTR_LIST_2, ATTR_NULL) -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 @@ -147,11 +162,7 @@ DEF_C89_ATTR (strftime, ATTR_FORMAT_STRFTIME_3_0) 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. */ @@ -164,8 +175,5 @@ DEF_EXT_ATTR (dgettext, ATTR_FORMAT_ARG_2) 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 diff --git a/contrib/gcc/builtin-types.def b/contrib/gcc/builtin-types.def index c594bd2..d5c39b4 100644 --- a/contrib/gcc/builtin-types.def +++ b/contrib/gcc/builtin-types.def @@ -40,6 +40,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA 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: @@ -73,13 +74,10 @@ DEF_PRIMITIVE_TYPE (BT_COMPLEX_LONG_DOUBLE, complex_long_double_type_node) 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_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_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) @@ -87,6 +85,9 @@ DEF_PRIMITIVE_TYPE (BT_VALIST_ARG, va_list_arg_type_node) 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) @@ -112,11 +113,15 @@ DEF_FUNCTION_TYPE_1 (BT_FN_PTR_SIZE, BT_PTR, BT_SIZE) 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_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, @@ -141,25 +146,32 @@ DEF_FUNCTION_TYPE_2 (BT_FN_LONG_LONG_LONG, 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_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_TRAD_PTR_PTR_CONST_PTR_SIZE, - BT_TRAD_PTR, BT_PTR, BT_CONST_PTR, 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_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_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) @@ -174,6 +186,13 @@ DEF_FUNCTION_TYPE_VAR_1 (BT_FN_INT_CONST_STRING_VAR, 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 --git a/contrib/gcc/builtins.c b/contrib/gcc/builtins.c index d8874d6..4c5650a 100644 --- a/contrib/gcc/builtins.c +++ b/contrib/gcc/builtins.c @@ -22,9 +22,9 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include "config.h" #include "system.h" #include "machmode.h" +#include "real.h" #include "rtl.h" #include "tree.h" -#include "obstack.h" #include "flags.h" #include "regs.h" #include "hard-reg-set.h" @@ -41,6 +41,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #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)) @@ -61,7 +62,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA 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), +#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" @@ -72,8 +73,6 @@ const char *const built_in_names[(int) END_BUILTINS] = 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)); @@ -98,11 +97,11 @@ static rtx expand_builtin_mathfn PARAMS ((tree, rtx, rtx)); 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_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)); + enum machine_mode)); static rtx expand_builtin_strcmp PARAMS ((tree, rtx, enum machine_mode)); static rtx expand_builtin_strncmp PARAMS ((tree, rtx, @@ -118,17 +117,19 @@ static rtx expand_builtin_strspn PARAMS ((tree, rtx, static rtx expand_builtin_strcspn PARAMS ((tree, rtx, enum machine_mode)); static rtx expand_builtin_memcpy PARAMS ((tree, rtx, - enum machine_mode)); + enum machine_mode)); static rtx expand_builtin_strcpy PARAMS ((tree, rtx, - enum machine_mode)); + 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)); + 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, @@ -147,6 +148,8 @@ static tree stabilize_va_list PARAMS ((tree, int)); 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, ...)); @@ -511,7 +514,7 @@ expand_builtin_setjmp_setup (buf_addr, receiver_label) void expand_builtin_setjmp_receiver (receiver_label) - rtx receiver_label ATTRIBUTE_UNUSED; + 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. */ @@ -639,7 +642,7 @@ void expand_builtin_longjmp (buf_addr, value) rtx buf_addr, value; { - rtx fp, lab, stack, insn; + rtx fp, lab, stack, insn, last; enum machine_mode sa_mode = STACK_SAVEAREA_MODE (SAVE_NONLOCAL); if (setjmp_alias_set == -1) @@ -662,6 +665,7 @@ expand_builtin_longjmp (buf_addr, value) current_function_calls_longjmp = 1; + last = get_last_insn (); #ifdef HAVE_builtin_longjmp if (HAVE_builtin_longjmp) emit_insn (gen_builtin_longjmp (buf_addr)); @@ -707,6 +711,8 @@ expand_builtin_longjmp (buf_addr, value) 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, @@ -714,7 +720,7 @@ expand_builtin_longjmp (buf_addr, value) break; } else if (GET_CODE (insn) == CALL_INSN) - break; + break; } } @@ -740,7 +746,7 @@ expand_builtin_prefetch (arglist) { arg1 = TREE_VALUE (TREE_CHAIN (arglist)); if (TREE_CHAIN (TREE_CHAIN (arglist))) - arg2 = TREE_VALUE (TREE_CHAIN (TREE_CHAIN (arglist))); + arg2 = TREE_VALUE (TREE_CHAIN (TREE_CHAIN (arglist))); else arg2 = build_int_2 (3, 0); } @@ -756,8 +762,8 @@ expand_builtin_prefetch (arglist) /* 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; + 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. */ @@ -784,19 +790,26 @@ expand_builtin_prefetch (arglist) #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); + 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); + /* 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 @@ -820,7 +833,7 @@ get_memory_rtx (exp) 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) + || TREE_CODE (exp) == NON_LVALUE_EXPR) && POINTER_TYPE_P (TREE_TYPE (TREE_OPERAND (exp, 0)))) exp = TREE_OPERAND (exp, 0); @@ -874,7 +887,7 @@ apply_args_register_offset (regno) /* Arguments are always put in outgoing registers (in the argument block) if such make sense. */ #ifdef OUTGOING_REGNO - regno = OUTGOING_REGNO(regno); + regno = OUTGOING_REGNO (regno); #endif return apply_args_reg_offset[regno]; } @@ -1001,7 +1014,7 @@ apply_result_size () mode = GET_MODE_WIDER_MODE (mode)) if (HARD_REGNO_MODE_OK (regno, mode) && have_insn_for (SET, mode)) - best_mode = mode; + best_mode = mode; if (best_mode == VOIDmode) for (mode = GET_CLASS_NARROWEST_MODE (MODE_VECTOR_INT); @@ -1147,12 +1160,12 @@ expand_builtin_apply_args () 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 + /* 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_insns_before (seq, NEXT_INSN (get_insns ())); + emit_insn_before (seq, NEXT_INSN (get_insns ())); pop_topmost_sequence (); return temp; } @@ -1214,7 +1227,7 @@ expand_builtin_apply (function, arguments, argsize) 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); + emit_block_move (dest, src, argsize, BLOCK_OP_NORMAL); /* Refer to the argument block. */ apply_args_size (); @@ -1249,7 +1262,7 @@ expand_builtin_apply (function, arguments, argsize) 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); + use_reg (&call_fusage, struct_value_rtx); size += GET_MODE_SIZE (Pmode); } @@ -1381,7 +1394,7 @@ expand_builtin_return (result) } /* Put the USE insns before the return. */ - emit_insns (call_fusage); + emit_insn (call_fusage); /* Return whatever values was restored by jumping directly to the end of the function. */ @@ -1470,6 +1483,7 @@ expand_builtin_mathfn (exp, target, subtarget) 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; @@ -1512,14 +1526,22 @@ expand_builtin_mathfn (exp, target, subtarget) case BUILT_IN_SQRTF: case BUILT_IN_SQRTL: builtin_optab = sqrt_optab; break; - default: + 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. */ - target = expand_unop (TYPE_MODE (TREE_TYPE (TREE_VALUE (arglist))), - builtin_optab, op0, target, 0); + 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 @@ -1530,18 +1552,12 @@ expand_builtin_mathfn (exp, target, subtarget) return 0; } - /* If errno must be maintained and if we are not allowing unsafe - math optimizations, check the result. */ + /* If errno must be maintained, we must set it to EDOM for NaN results. */ - if (flag_errno_math && ! flag_unsafe_math_optimizations) + if (flag_errno_math && HONOR_NANS (argmode)) { 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 @@ -1550,16 +1566,16 @@ expand_builtin_mathfn (exp, target, subtarget) 0, lab1); #ifdef TARGET_EDOM - { + { #ifdef GEN_ERRNO_RTX - rtx errno_rtx = GEN_ERRNO_RTX; + rtx errno_rtx = GEN_ERRNO_RTX; #else - rtx errno_rtx - = gen_rtx_MEM (word_mode, gen_rtx_SYMBOL_REF (Pmode, "errno")); + rtx errno_rtx + = gen_rtx_MEM (word_mode, gen_rtx_SYMBOL_REF (Pmode, "errno")); #endif - emit_move_insn (errno_rtx, GEN_INT (TARGET_EDOM)); - } + 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. */ @@ -1574,7 +1590,7 @@ expand_builtin_mathfn (exp, target, subtarget) /* Output the entire sequence. */ insns = get_insns (); end_sequence (); - emit_insns (insns); + emit_insn (insns); return target; } @@ -1636,7 +1652,7 @@ expand_builtin_strlen (exp, target) /* Mark the beginning of the strlen sequence so we can emit the source operand later. */ - before_strlen = get_last_insn(); + before_strlen = get_last_insn (); char_rtx = const0_rtx; char_mode = insn_data[(int) icode].operand[2].mode; @@ -1656,7 +1672,7 @@ expand_builtin_strlen (exp, target) expand_expr (src, src_reg, ptr_mode, EXPAND_SUM)); if (pat != src_reg) emit_move_insn (src_reg, pat); - pat = gen_sequence (); + pat = get_insns (); end_sequence (); if (before_strlen) @@ -1942,20 +1958,20 @@ expand_builtin_memcpy (arglist, target, mode) /* If DEST is not a pointer type, call the normal function. */ if (dest_align == 0) - return 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); - } + { + /* 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; + return 0; dest_mem = get_memory_rtx (dest); set_mem_align (dest_mem, dest_align); @@ -1974,17 +1990,29 @@ expand_builtin_memcpy (arglist, target, mode) 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); + 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); + 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); + { + 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; } @@ -2002,7 +2030,7 @@ expand_builtin_strcpy (exp, target, mode) enum machine_mode mode; { tree arglist = TREE_OPERAND (exp, 1); - tree fn, len; + tree fn, len, src, dst; if (!validate_arglist (arglist, POINTER_TYPE, POINTER_TYPE, VOID_TYPE)) return 0; @@ -2011,14 +2039,18 @@ expand_builtin_strcpy (exp, target, mode) if (!fn) return 0; - len = c_strlen (TREE_VALUE (TREE_CHAIN (arglist))); - if (len == 0) + src = TREE_VALUE (TREE_CHAIN (arglist)); + len = c_strlen (src); + if (len == 0 || TREE_SIDE_EFFECTS (len)) return 0; + dst = TREE_VALUE (arglist); len = size_binop (PLUS_EXPR, len, ssize_int (1)); - chainon (arglist, build_tree_list (NULL_TREE, len)); + arglist = build_tree_list (NULL_TREE, len); + arglist = tree_cons (NULL_TREE, src, arglist); + arglist = tree_cons (NULL_TREE, dst, arglist); return expand_expr (build_function_call_expr (fn, arglist), - target, mode, EXPAND_NORMAL); + target, mode, EXPAND_NORMAL); } /* Callback routine for store_by_pieces. Read GET_MODE_BITSIZE (MODE) @@ -2063,9 +2095,9 @@ expand_builtin_strncpy (arglist, target, mode) /* 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. */ + { + /* 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. */ @@ -2100,15 +2132,20 @@ expand_builtin_strncpy (arglist, target, mode) 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); + 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 0; return expand_expr (build_function_call_expr (fn, arglist), - target, mode, EXPAND_NORMAL); + target, mode, EXPAND_NORMAL); } } @@ -2130,6 +2167,34 @@ builtin_memset_read_str (data, offset, mode) 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 @@ -2164,14 +2229,46 @@ expand_builtin_memset (exp, target, mode) /* 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); - } + { + /* 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; + { + 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; @@ -2189,7 +2286,12 @@ expand_builtin_memset (exp, target, mode) 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); + 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); @@ -2199,7 +2301,13 @@ expand_builtin_memset (exp, target, mode) dest_addr = clear_storage (dest_mem, len_rtx); if (dest_addr == 0) - dest_addr = force_operand (XEXP (dest_mem, 0), NULL_RTX); + { + 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; } @@ -2256,7 +2364,7 @@ expand_builtin_memcmp (exp, arglist, target, mode) const char *p1, *p2; if (!validate_arglist (arglist, - POINTER_TYPE, POINTER_TYPE, INTEGER_TYPE, VOID_TYPE)) + POINTER_TYPE, POINTER_TYPE, INTEGER_TYPE, VOID_TYPE)) return 0; arg1 = TREE_VALUE (arglist); @@ -2295,12 +2403,12 @@ expand_builtin_memcmp (exp, arglist, target, mode) 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)))); + 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)))); + 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); } @@ -2437,12 +2545,12 @@ expand_builtin_strcmp (exp, target, mode) if (!len || TREE_CODE (len) != INTEGER_CST) { if (len2 && !TREE_SIDE_EFFECTS (len2)) - len = len2; + len = len2; else if (len == 0) - return 0; + return 0; } else if (len2 && TREE_CODE (len2) == INTEGER_CST - && tree_int_cst_lt (len2, len)) + && tree_int_cst_lt (len2, len)) len = len2; /* If both arguments have side effects, we cannot optimize. */ @@ -2453,9 +2561,11 @@ expand_builtin_strcmp (exp, target, mode) if (!fn) return 0; - chainon (arglist, build_tree_list (NULL_TREE, len)); + arglist = build_tree_list (NULL_TREE, len); + arglist = tree_cons (NULL_TREE, arg2, arglist); + arglist = tree_cons (NULL_TREE, arg1, arglist); return expand_expr (build_function_call_expr (fn, arglist), - target, mode, EXPAND_NORMAL); + target, mode, EXPAND_NORMAL); } /* Expand expression EXP, which is a call to the strncmp builtin. Return 0 @@ -2483,23 +2593,23 @@ expand_builtin_strncmp (exp, target, mode) /* 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; - } + { + /* 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)); - } + { + 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). */ @@ -2557,7 +2667,7 @@ expand_builtin_strncmp (exp, target, mode) 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); + target, mode, EXPAND_NORMAL); } /* Expand expression EXP, which is a call to the strcat builtin. @@ -2609,7 +2719,7 @@ expand_builtin_strncat (arglist, target, mode) /* 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); @@ -2621,7 +2731,7 @@ expand_builtin_strncat (arglist, target, mode) 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]; @@ -2657,14 +2767,14 @@ expand_builtin_strspn (arglist, target, mode) /* 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); @@ -2694,14 +2804,14 @@ expand_builtin_strcspn (arglist, target, mode) /* 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); @@ -2710,7 +2820,7 @@ expand_builtin_strcspn (arglist, target, mode) /* 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]; @@ -2766,11 +2876,11 @@ expand_builtin_saveregs () 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 + /* 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_insns_after (seq, get_insns ()); + emit_insn_after (seq, get_insns ()); pop_topmost_sequence (); return val; @@ -2838,10 +2948,9 @@ expand_builtin_next_arg (arglist) { 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) + 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; @@ -2864,7 +2973,7 @@ expand_builtin_next_arg (arglist) if (arg != last_parm) warning ("second parameter of `va_start' not last named argument"); } - else if (! current_function_varargs) + 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"); @@ -2928,25 +3037,12 @@ stabilize_va_list (valist, needs_lvalue) the variable. */ void -std_expand_builtin_va_start (stdarg_p, valist, nextarg) - int stdarg_p; +std_expand_builtin_va_start (valist, nextarg) 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; @@ -2954,31 +3050,27 @@ std_expand_builtin_va_start (stdarg_p, valist, nextarg) 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. */ +/* Expand ARGLIST, from a call to __builtin_va_start. */ static rtx -expand_builtin_va_start (stdarg_p, arglist) - int stdarg_p; +expand_builtin_va_start (arglist) tree arglist; { rtx nextarg; - tree chain = arglist, valist; + tree chain, valist; - if (stdarg_p) - nextarg = expand_builtin_next_arg (chain = TREE_CHAIN (arglist)); - else - nextarg = expand_builtin_next_arg (NULL_TREE); + 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 (stdarg_p, valist, nextarg); + EXPAND_BUILTIN_VA_START (valist, nextarg); #else - std_expand_builtin_va_start (stdarg_p, valist, nextarg); + std_expand_builtin_va_start (valist, nextarg); #endif return const0_rtx; @@ -3078,7 +3170,8 @@ expand_builtin_va_arg (valist, type) /* 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) + else if ((promoted_type = (*lang_hooks.types.type_promotes_to) (type)) + != type) { const char *name = "", *pname = 0; static bool gave_help; @@ -3154,7 +3247,7 @@ expand_builtin_va_end (arglist) #ifdef EXPAND_BUILTIN_VA_END valist = stabilize_va_list (valist, 0); - EXPAND_BUILTIN_VA_END(arglist); + EXPAND_BUILTIN_VA_END (arglist); #else /* Evaluate for side effects, if needed. I hate macros that don't do that. */ @@ -3214,7 +3307,7 @@ expand_builtin_va_copy (arglist) set_mem_align (srcb, TYPE_ALIGN (va_list_type_node)); /* Copy. */ - emit_block_move (dstb, srcb, size); + emit_block_move (dstb, srcb, size, BLOCK_OP_NORMAL); } return const0_rtx; @@ -3385,8 +3478,12 @@ expand_builtin_fputs (arglist, ignore, unlocked) /* FALLTHROUGH */ case 1: /* length is greater than 1, call fwrite. */ { - tree string_arg = TREE_VALUE (arglist); + tree string_arg; + /* If optimizing for size keep fputs. */ + if (optimize_size) + return 0; + string_arg = TREE_VALUE (arglist); /* New argument list transforming fputs(string, stream) to fwrite(string, 1, len, stream). */ arglist = build_tree_list (NULL_TREE, TREE_VALUE (TREE_CHAIN (arglist))); @@ -3432,7 +3529,7 @@ expand_builtin_expect (arglist, target) target = expand_expr (exp, target, VOIDmode, EXPAND_NORMAL); /* Don't bother with expected value notes for integral constants. */ - if (GET_CODE (target) != CONST_INT) + 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 @@ -3450,7 +3547,7 @@ expand_builtin_expect (arglist, target) /* 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 + 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. */ @@ -3471,8 +3568,8 @@ expand_builtin_expect_jump (exp, if_false_label, if_true_label) if (TREE_CODE (TREE_TYPE (arg1)) == INTEGER_TYPE && (integer_zerop (arg1) || integer_onep (arg1))) { - int j; 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 @@ -3493,16 +3590,17 @@ expand_builtin_expect_jump (exp, if_false_label, if_true_label) /* Expand the jump insns. */ start_sequence (); do_jump (arg0, if_false_label, if_true_label); - ret = gen_sequence (); + 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. */ - for (j = 0; j < XVECLEN (ret, 0); j++) + insn = ret; + while (insn != NULL_RTX) { - rtx insn = XVECEXP (ret, 0, j); + rtx next = NEXT_INSN (insn); rtx pattern; if (GET_CODE (insn) == JUMP_INSN && any_condjump_p (insn) @@ -3513,7 +3611,7 @@ expand_builtin_expect_jump (exp, if_false_label, if_true_label) int taken; if (GET_CODE (ifelse) != IF_THEN_ELSE) - continue; + goto do_next_insn; if (GET_CODE (XEXP (ifelse, 1)) == LABEL_REF) { @@ -3540,7 +3638,7 @@ expand_builtin_expect_jump (exp, if_false_label, if_true_label) label = NULL_RTX; } else - continue; + goto do_next_insn; /* If the test is expected to fail, reverse the probabilities. */ @@ -3554,11 +3652,14 @@ expand_builtin_expect_jump (exp, if_false_label, if_true_label) else if (label == if_false_label) taken = 1 - taken; else if (label != if_true_label) - continue; + 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 @@ -3600,6 +3701,9 @@ expand_builtin (exp, target, subtarget, mode, ignore) tree arglist = TREE_OPERAND (exp, 1); enum built_in_function fcode = DECL_FUNCTION_CODE (fndecl); + /* Perform postincrements before expanding builtin functions.  */ + emit_queue (); + if (DECL_BUILT_IN_CLASS (fndecl) == BUILT_IN_MD) return (*targetm.expand_builtin) (exp, target, subtarget, mode, ignore); @@ -3608,11 +3712,18 @@ expand_builtin (exp, target, subtarget, mode, ignore) 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_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: @@ -3646,11 +3757,11 @@ expand_builtin (exp, target, subtarget, mode, ignore) case BUILT_IN_FPUTC_UNLOCKED: case BUILT_IN_FPUTS_UNLOCKED: case BUILT_IN_FWRITE_UNLOCKED: - return expand_call (exp, target, ignore); + return expand_call (exp, target, ignore); default: - break; - } + break; + } switch (fcode) { @@ -3683,6 +3794,12 @@ expand_builtin (exp, target, subtarget, mode, ignore) 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) @@ -3695,9 +3812,6 @@ expand_builtin (exp, target, subtarget, mode, ignore) return target; break; - case BUILT_IN_FMOD: - break; - case BUILT_IN_APPLY_ARGS: return expand_builtin_apply_args (); @@ -3762,11 +3876,11 @@ expand_builtin (exp, target, subtarget, mode, ignore) 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; + || ! 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); + return XEXP (DECL_RTL (DECL_RESULT (current_function_decl)), 0); case BUILT_IN_ALLOCA: target = expand_builtin_alloca (arglist, target); @@ -3918,15 +4032,6 @@ expand_builtin (exp, target, subtarget, mode, ignore) 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) @@ -3945,8 +4050,8 @@ expand_builtin (exp, target, subtarget, mode, ignore) 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_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; @@ -3963,10 +4068,9 @@ expand_builtin (exp, target, subtarget, mode, ignore) 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_VA_START: case BUILT_IN_STDARG_START: - return expand_builtin_va_start (1, arglist); + return expand_builtin_va_start (arglist); case BUILT_IN_VA_END: return expand_builtin_va_end (arglist); case BUILT_IN_VA_COPY: @@ -3978,9 +4082,10 @@ expand_builtin (exp, target, subtarget, mode, ignore) return const0_rtx; - default: /* just do library call, if unknown builtin */ - error ("built-in function `%s' not currently supported", - IDENTIFIER_POINTER (DECL_NAME (fndecl))); + 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 @@ -4042,6 +4147,44 @@ fold_builtin_classify_type (arglist) 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. */ @@ -4078,6 +4221,26 @@ fold_builtin (exp) } 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; } @@ -4112,29 +4275,32 @@ validate_arglist VPARAMS ((tree arglist, ...)) VA_OPEN (ap, arglist); VA_FIXEDARG (ap, tree, arglist); - do { - code = va_arg (ap, enum tree_code); - switch (code) + do { - 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; + 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); } - arglist = TREE_CHAIN (arglist); - } while (1); + while (1); /* We need gotos here since we can only have one VA_CLOSE in a function. */ diff --git a/contrib/gcc/builtins.def b/contrib/gcc/builtins.def index c6f6dc4..c208b75 100644 --- a/contrib/gcc/builtins.def +++ b/contrib/gcc/builtins.def @@ -22,7 +22,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA /* Before including this file, you should define a macro: DEF_BUILTIN (ENUM, NAME, CLASS, TYPE, LIBTYPE, BOTH_P, - FALLBACK_P, NONANSI_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 @@ -50,15 +50,18 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA 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. */ + 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) \ +#define DEF_GCC_BUILTIN(ENUM, NAME, TYPE, ATTRS) \ DEF_BUILTIN (ENUM, NAME, BUILT_IN_NORMAL, TYPE, BT_LAST, \ - false, false, false) + false, false, false, ATTRS) /* A fallback builtin is a builtin (like __builtin_puts) that falls @@ -66,9 +69,9 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA for which we should not introduce the non-`__builtin' variant of the name. */ #undef DEF_FALLBACK_BUILTIN -#define DEF_FALLBACK_BUILTIN(ENUM, NAME, TYPE) \ +#define DEF_FALLBACK_BUILTIN(ENUM, NAME, TYPE, ATTRS) \ DEF_BUILTIN (ENUM, NAME, BUILT_IN_NORMAL, TYPE, TYPE, \ - false, true, false) + 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 @@ -77,74 +80,76 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #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) + 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. */ + version. */ #undef DEF_LIB_BUILTIN -#define DEF_LIB_BUILTIN(ENUM, NAME, TYPE) \ +#define DEF_LIB_BUILTIN(ENUM, NAME, TYPE, ATTRS) \ DEF_BUILTIN (ENUM, NAME, BUILT_IN_NORMAL, TYPE, TYPE, \ - true, true, false) + 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) + 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) \ +#define DEF_EXT_LIB_BUILTIN(ENUM, NAME, TYPE, ATTRS) \ DEF_BUILTIN (ENUM, NAME, BUILT_IN_NORMAL, TYPE, TYPE, \ - true, true, true) + 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) \ +#define DEF_C99_BUILTIN(ENUM, NAME, TYPE, ATTRS) \ DEF_BUILTIN (ENUM, NAME, BUILT_IN_NORMAL, TYPE, TYPE, \ - true, !flag_isoc99, true) + 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) \ +#define DEF_FRONT_END_LIB_BUILTIN(ENUM, NAME, TYPE, ATTRS) \ DEF_BUILTIN (ENUM, NAME, BUILT_IN_FRONTEND, TYPE, TYPE, \ - true, true, false) + 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) \ +#define DEF_EXT_FRONT_END_LIB_BUILTIN(ENUM, NAME, TYPE, ATTRS) \ DEF_BUILTIN (ENUM, NAME, BUILT_IN_FRONTEND, TYPE, TYPE, \ - true, true, true) + 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) + 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) + BT_FN_PTR_SIZE, + ATTR_MALLOC_NOTHROW_LIST) #else DEF_EXT_LIB_BUILTIN(BUILT_IN_ALLOCA, "__builtin_alloca", - BT_FN_PTR_SIZE) + BT_FN_PTR_SIZE, + ATTR_MALLOC_NOTHROW_LIST) #endif DEF_LIB_ALWAYS_BUILTIN(BUILT_IN_ABS, @@ -166,37 +171,48 @@ DEF_LIB_ALWAYS_BUILTIN(BUILT_IN_FABSL, DEF_C99_BUILTIN(BUILT_IN_LLABS, "__builtin_llabs", - BT_FN_LONGLONG_LONGLONG) + BT_FN_LONGLONG_LONGLONG, + ATTR_NOTHROW_LIST) DEF_C99_BUILTIN(BUILT_IN_IMAXABS, "__builtin_imaxabs", - BT_FN_INTMAX_INTMAX) + BT_FN_INTMAX_INTMAX, + ATTR_NOTHROW_LIST) DEF_C99_BUILTIN(BUILT_IN_CONJ, "__builtin_conj", - BT_FN_COMPLEX_DOUBLE_COMPLEX_DOUBLE) + BT_FN_COMPLEX_DOUBLE_COMPLEX_DOUBLE, + ATTR_NOTHROW_LIST) DEF_C99_BUILTIN(BUILT_IN_CONJF, "__builtin_conjf", - BT_FN_COMPLEX_FLOAT_COMPLEX_FLOAT) + 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) + BT_FN_COMPLEX_LONG_DOUBLE_COMPLEX_LONG_DOUBLE, + ATTR_NOTHROW_LIST) DEF_C99_BUILTIN(BUILT_IN_CREAL, "__builtin_creal", - BT_FN_DOUBLE_COMPLEX_DOUBLE) + BT_FN_DOUBLE_COMPLEX_DOUBLE, + ATTR_NOTHROW_LIST) DEF_C99_BUILTIN(BUILT_IN_CREALF, "__builtin_crealf", - BT_FN_FLOAT_COMPLEX_FLOAT) + BT_FN_FLOAT_COMPLEX_FLOAT, + ATTR_NOTHROW_LIST) DEF_C99_BUILTIN(BUILT_IN_CREALL, "__builtin_creall", - BT_FN_LONG_DOUBLE_COMPLEX_LONG_DOUBLE) + BT_FN_LONG_DOUBLE_COMPLEX_LONG_DOUBLE, + ATTR_NOTHROW_LIST) DEF_C99_BUILTIN(BUILT_IN_CIMAG, "__builtin_cimag", - BT_FN_DOUBLE_COMPLEX_DOUBLE) + BT_FN_DOUBLE_COMPLEX_DOUBLE, + ATTR_NOTHROW_LIST) DEF_C99_BUILTIN(BUILT_IN_CIMAGF, "__builtin_cimagf", - BT_FN_FLOAT_COMPLEX_FLOAT) + BT_FN_FLOAT_COMPLEX_FLOAT, + ATTR_NOTHROW_LIST) DEF_C99_BUILTIN(BUILT_IN_CIMAGL, "__builtin_cimagl", - BT_FN_LONG_DOUBLE_COMPLEX_LONG_DOUBLE) + BT_FN_LONG_DOUBLE_COMPLEX_LONG_DOUBLE, + ATTR_NOTHROW_LIST) DEF_UNUSED_BUILTIN(BUILT_IN_DIV) DEF_UNUSED_BUILTIN(BUILT_IN_LDIV) @@ -211,184 +227,383 @@ DEF_UNUSED_BUILTIN(BUILT_IN_FREM) DEF_BUILTIN (BUILT_IN_BZERO, "__builtin_bzero", BUILT_IN_NORMAL, - BT_FN_VOID_TRAD_PTR_LEN, + BT_FN_VOID_PTR_SIZE, BT_FN_VOID_VAR, - true, true, true) + true, true, true, + ATTR_NOTHROW_LIST) DEF_BUILTIN (BUILT_IN_BCMP, "__builtin_bcmp", BUILT_IN_NORMAL, - BT_FN_INT_TRAD_CONST_PTR_TRAD_CONST_PTR_LEN, + BT_FN_INT_CONST_PTR_CONST_PTR_SIZE, BT_FN_INT_VAR, - true, true, true) + true, true, true, + ATTR_PURE_NOTHROW_LIST) DEF_EXT_LIB_BUILTIN(BUILT_IN_FFS, "__builtin_ffs", - BT_FN_INT_INT) + BT_FN_INT_INT, + ATTR_CONST_NOTHROW_LIST) DEF_EXT_LIB_BUILTIN(BUILT_IN_INDEX, "__builtin_index", - BT_FN_STRING_CONST_STRING_INT) + 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) + BT_FN_STRING_CONST_STRING_INT, + ATTR_PURE_NOTHROW_LIST) DEF_LIB_BUILTIN(BUILT_IN_MEMCPY, "__builtin_memcpy", - BT_FN_TRAD_PTR_PTR_CONST_PTR_SIZE) + 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) + BT_FN_INT_CONST_PTR_CONST_PTR_SIZE, + ATTR_PURE_NOTHROW_LIST) DEF_LIB_BUILTIN(BUILT_IN_MEMSET, "__builtin_memset", - BT_FN_TRAD_PTR_PTR_INT_SIZE) + BT_FN_PTR_PTR_INT_SIZE, + ATTR_NOTHROW_LIST) DEF_LIB_BUILTIN(BUILT_IN_STRCAT, "__builtin_strcat", - BT_FN_STRING_STRING_CONST_STRING) + BT_FN_STRING_STRING_CONST_STRING, + ATTR_NOTHROW_LIST) DEF_LIB_BUILTIN(BUILT_IN_STRNCAT, "__builtin_strncat", - BT_FN_STRING_STRING_CONST_STRING_SIZE) + BT_FN_STRING_STRING_CONST_STRING_SIZE, + ATTR_NOTHROW_LIST) DEF_LIB_BUILTIN(BUILT_IN_STRCPY, "__builtin_strcpy", - BT_FN_STRING_STRING_CONST_STRING) + BT_FN_STRING_STRING_CONST_STRING, + ATTR_NOTHROW_LIST) DEF_LIB_BUILTIN(BUILT_IN_STRNCPY, "__builtin_strncpy", - BT_FN_STRING_STRING_CONST_STRING_SIZE) + 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) + 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) + BT_FN_INT_CONST_STRING_CONST_STRING_SIZE, + ATTR_PURE_NOTHROW_LIST) DEF_LIB_BUILTIN(BUILT_IN_STRLEN, "__builtin_strlen", - BT_FN_LEN_CONST_STRING) + BT_FN_SIZE_CONST_STRING, + ATTR_PURE_NOTHROW_LIST) DEF_LIB_BUILTIN(BUILT_IN_STRSTR, "__builtin_strstr", - BT_FN_STRING_CONST_STRING_CONST_STRING) + 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) + 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) + 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) + 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) + BT_FN_STRING_CONST_STRING_INT, + ATTR_PURE_NOTHROW_LIST) DEF_LIB_BUILTIN(BUILT_IN_STRRCHR, "__builtin_strrchr", - BT_FN_STRING_CONST_STRING_INT) + BT_FN_STRING_CONST_STRING_INT, + ATTR_PURE_NOTHROW_LIST) DEF_LIB_BUILTIN(BUILT_IN_SQRT, "__builtin_sqrt", - BT_FN_DOUBLE_DOUBLE) + 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) + 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) + 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) + 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) + 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) + 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) + 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) + 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) - -DEF_UNUSED_BUILTIN(BUILT_IN_GETEXP) -DEF_UNUSED_BUILTIN(BUILT_IN_GETMAN) + 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) + BT_FN_PTR_VAR, + ATTR_NULL) DEF_GCC_BUILTIN(BUILT_IN_CLASSIFY_TYPE, "__builtin_classify_type", - BT_FN_INT_VAR) + BT_FN_INT_VAR, + ATTR_NULL) DEF_GCC_BUILTIN(BUILT_IN_NEXT_ARG, "__builtin_next_arg", - BT_FN_PTR_VAR) + BT_FN_PTR_VAR, + ATTR_NULL) DEF_GCC_BUILTIN(BUILT_IN_ARGS_INFO, "__builtin_args_info", - BT_FN_INT_INT) + BT_FN_INT_INT, + ATTR_NULL) DEF_GCC_BUILTIN(BUILT_IN_CONSTANT_P, "__builtin_constant_p", - BT_FN_INT_VAR) + BT_FN_INT_VAR, + ATTR_NULL) DEF_GCC_BUILTIN(BUILT_IN_FRAME_ADDRESS, "__builtin_frame_address", - BT_FN_PTR_UNSIGNED) + BT_FN_PTR_UNSIGNED, + ATTR_NULL) DEF_GCC_BUILTIN(BUILT_IN_RETURN_ADDRESS, "__builtin_return_address", - BT_FN_PTR_UNSIGNED) + BT_FN_PTR_UNSIGNED, + ATTR_NULL) DEF_GCC_BUILTIN(BUILT_IN_AGGREGATE_INCOMING_ADDRESS, "__builtin_aggregate_incoming_address", - BT_FN_PTR_VAR) + BT_FN_PTR_VAR, + ATTR_NULL) DEF_GCC_BUILTIN(BUILT_IN_APPLY_ARGS, "__builtin_apply_args", - BT_FN_PTR_VAR) + BT_FN_PTR_VAR, + ATTR_NULL) DEF_GCC_BUILTIN(BUILT_IN_APPLY, "__builtin_apply", - BT_FN_PTR_PTR_FN_VOID_VAR_PTR_SIZE) + BT_FN_PTR_PTR_FN_VOID_VAR_PTR_SIZE, + ATTR_NULL) DEF_GCC_BUILTIN(BUILT_IN_RETURN, "__builtin_return", - BT_FN_VOID_PTR) + BT_FN_VOID_PTR, + ATTR_NORETURN_NOTHROW_LIST) DEF_GCC_BUILTIN(BUILT_IN_SETJMP, "__builtin_setjmp", - BT_FN_INT_PTR) + BT_FN_INT_PTR, + ATTR_NULL) DEF_GCC_BUILTIN(BUILT_IN_LONGJMP, "__builtin_longjmp", - BT_FN_VOID_PTR_INT) + BT_FN_VOID_PTR_INT, + ATTR_NORETURN_NOTHROW_LIST) DEF_GCC_BUILTIN(BUILT_IN_TRAP, "__builtin_trap", - BT_FN_VOID) + BT_FN_VOID, + ATTR_NORETURN_NOTHROW_LIST) 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) + 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) -DEF_FALLBACK_BUILTIN(BUILT_IN_FPUTC, - "__builtin_fputc", - BT_FN_INT_INT_PTR) + 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) + true, true, false, ATTR_NOTHROW_LIST) DEF_FALLBACK_BUILTIN(BUILT_IN_FWRITE, "__builtin_fwrite", - BT_FN_SIZE_CONST_PTR_SIZE_SIZE_PTR) + 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) + BT_FN_INT_PTR_CONST_STRING_VAR, + ATTR_FORMAT_PRINTF_2_3) -/* Stdio unlocked builtins. */ +/* stdio unlocked builtins (without FILE *). */ DEF_EXT_FALLBACK_BUILTIN(BUILT_IN_PUTCHAR_UNLOCKED, "__builtin_putchar_unlocked", @@ -398,91 +613,152 @@ DEF_EXT_FALLBACK_BUILTIN(BUILT_IN_PUTS_UNLOCKED, 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) + 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) + 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) + 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) + BT_FN_INT_VAR, + ATTR_CONST_NOTHROW_LIST) DEF_GCC_BUILTIN(BUILT_IN_ISGREATEREQUAL, "__builtin_isgreaterequal", - BT_FN_INT_VAR) + BT_FN_INT_VAR, + ATTR_CONST_NOTHROW_LIST) DEF_GCC_BUILTIN(BUILT_IN_ISLESS, "__builtin_isless", - BT_FN_INT_VAR) + BT_FN_INT_VAR, + ATTR_CONST_NOTHROW_LIST) DEF_GCC_BUILTIN(BUILT_IN_ISLESSEQUAL, "__builtin_islessequal", - BT_FN_INT_VAR) + BT_FN_INT_VAR, + ATTR_CONST_NOTHROW_LIST) DEF_GCC_BUILTIN(BUILT_IN_ISLESSGREATER, "__builtin_islessgreater", - BT_FN_INT_VAR) + BT_FN_INT_VAR, + ATTR_CONST_NOTHROW_LIST) DEF_GCC_BUILTIN(BUILT_IN_ISUNORDERED, "__builtin_isunordered", - BT_FN_INT_VAR) + 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) + BT_FN_VOID, + ATTR_NULL) 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) + 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) + BT_FN_VOID_PTR, + ATTR_NULL) DEF_GCC_BUILTIN(BUILT_IN_FROB_RETURN_ADDR, "__builtin_frob_return_addr", - BT_FN_PTR_PTR) + BT_FN_PTR_PTR, + ATTR_NULL) DEF_GCC_BUILTIN(BUILT_IN_EXTRACT_RETURN_ADDR, "__builtin_extract_return_addr", - BT_FN_PTR_PTR) + BT_FN_PTR_PTR, + ATTR_NULL) DEF_GCC_BUILTIN(BUILT_IN_EH_RETURN, "__builtin_eh_return", - BT_FN_VOID_PTRMODE_PTR) + 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) - -DEF_GCC_BUILTIN(BUILT_IN_VARARGS_START, - "__builtin_varargs_start", - BT_FN_VOID_VALIST_REF) -DEF_GCC_BUILTIN(BUILT_IN_STDARG_START, + 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) + BT_FN_VOID_VALIST_REF_VAR, + ATTR_NULL) DEF_GCC_BUILTIN(BUILT_IN_VA_END, "__builtin_va_end", - BT_FN_VOID_VALIST_REF) + BT_FN_VOID_VALIST_REF, + ATTR_NULL) DEF_GCC_BUILTIN(BUILT_IN_VA_COPY, "__builtin_va_copy", - BT_FN_VOID_VALIST_REF_VALIST_ARG) + BT_FN_VOID_VALIST_REF_VALIST_ARG, + ATTR_NULL) + DEF_GCC_BUILTIN(BUILT_IN_EXPECT, "__builtin_expect", - BT_FN_LONG_LONG_LONG) + 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 --git a/contrib/gcc/c-aux-info.c b/contrib/gcc/c-aux-info.c index 67ecae6..761fa84 100644 --- a/contrib/gcc/c-aux-info.c +++ b/contrib/gcc/c-aux-info.c @@ -188,7 +188,7 @@ gen_formal_list_for_type (fntype, style) /* 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 + ellipsis. Given a tree node, the following function will return nonzero if the "function type" parameter list should end with an ellipsis. */ static int @@ -471,7 +471,7 @@ gen_type (ret_val, t, style) The given entity may be either a variable or a function. - If the "is_func_definition" parameter is non-zero, assume that the thing + 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 --git a/contrib/gcc/c-common.c b/contrib/gcc/c-common.c index 3511f15..b40a35a 100644 --- a/contrib/gcc/c-common.c +++ b/contrib/gcc/c-common.c @@ -22,6 +22,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include "config.h" #include "system.h" #include "tree.h" +#include "real.h" #include "flags.h" #include "toplev.h" #include "output.h" @@ -30,17 +31,17 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #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. */ +#include "langhooks.h" +#include "except.h" /* For USING_SJLJ_EXCEPTIONS. */ +#include "tree-inline.h" +#include "c-tree.h" -#undef WCHAR_TYPE_SIZE -#define WCHAR_TYPE_SIZE TYPE_PRECISION (wchar_type_node) +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. @@ -56,6 +57,10 @@ cpp_reader *parse_in; /* Declared in c-lex.h. */ #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 @@ -80,6 +85,10 @@ cpp_reader *parse_in; /* Declared in c-lex.h. */ : "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; @@ -180,6 +189,22 @@ enum c_language_kind c_language; 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; @@ -197,6 +222,180 @@ int flag_short_double; 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; @@ -204,6 +403,254 @@ int warn_sequence_point; /* 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; @@ -267,6 +714,169 @@ static int if_stack_space = 0; /* 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 handle_cleanup_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 }, + { "cleanup", 1, 1, true, false, false, + handle_cleanup_attribute }, + { 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. @@ -483,7 +1093,7 @@ fname_as_string (pretty_p) if (pretty_p) name = (current_function_decl - ? (*decl_printable_name) (current_function_decl, 2) + ? (*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)); @@ -530,6 +1140,13 @@ fname_decl (rid, id) 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) @@ -545,6 +1162,7 @@ fname_decl (rid, id) 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"); @@ -552,106 +1170,17 @@ fname_decl (rid, id) 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. */ +/* Given a STRING_CST, give it a suitable array-of-chars data type. */ tree -combine_strings (strings) - tree strings; +fix_string_type (value) + tree value; { - 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 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; - - 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; - } + int length = TREE_STRING_LENGTH (value); + int nchars; /* Compute the number of elements, for the array type. */ nchars = wide_flag ? length / wchar_bytes : length; @@ -664,8 +1193,7 @@ combine_strings (strings) -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)) + if (flag_const_strings && ! flag_writable_strings) { tree elements = build_type_variant (wide_flag ? wchar_type_node : char_type_node, @@ -684,21 +1212,127 @@ combine_strings (strings) TREE_STATIC (value) = 1; return value; } - -static int is_valid_printf_arglist PARAMS ((tree)); -static rtx c_expand_builtin PARAMS ((tree, rtx, enum machine_mode, enum expand_modifier)); -static rtx c_expand_builtin_printf PARAMS ((tree, rtx, enum machine_mode, - enum expand_modifier, int, int)); -static rtx c_expand_builtin_fprintf PARAMS ((tree, rtx, enum machine_mode, - enum expand_modifier, int, int)); - -/* Print a warning if a constant expression had overflow in folding. - Invoke this function on every expression that the language - requires to be a constant expression. - Note the ANSI C standard says it is erroneous for a - constant expression to overflow. */ -void +/* 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; +} + +static int is_valid_printf_arglist PARAMS ((tree)); +static rtx c_expand_builtin PARAMS ((tree, rtx, enum machine_mode, enum expand_modifier)); +static rtx c_expand_builtin_printf PARAMS ((tree, rtx, enum machine_mode, + enum expand_modifier, int, int)); +static rtx c_expand_builtin_fprintf PARAMS ((tree, rtx, enum machine_mode, + enum expand_modifier, int, int)); + +/* Print a warning if a constant expression had overflow in folding. + Invoke this function on every expression that the language + requires to be a constant expression. + Note the ANSI C standard says it is erroneous for a + constant expression to overflow. */ + +void constant_expression_warning (value) tree value; { @@ -755,13 +1389,15 @@ void unsigned_conversion_warning (result, operand) tree result, operand; { + tree type = TREE_TYPE (result); + if (TREE_CODE (operand) == INTEGER_CST - && TREE_CODE (TREE_TYPE (result)) == INTEGER_TYPE - && TREE_UNSIGNED (TREE_TYPE (result)) + && TREE_CODE (type) == INTEGER_TYPE + && TREE_UNSIGNED (type) && skip_evaluation == 0 - && !int_fits_type_p (operand, TREE_TYPE (result))) + && !int_fits_type_p (operand, type)) { - if (!int_fits_type_p (operand, signed_type (TREE_TYPE (result)))) + 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) @@ -810,7 +1446,8 @@ convert_and_check (type, expr) don't warn unless pedantic. */ if ((pedantic || TREE_UNSIGNED (type) - || ! constant_fits_type_p (expr, unsigned_type (type))) + || ! constant_fits_type_p (expr, + c_common_unsigned_type (type))) && skip_evaluation == 0) warning ("overflow in implicit constant conversion"); } @@ -1212,7 +1849,7 @@ verify_tree (x, pbefore_sp, pno_sp, writer) } } -/* Try to warn for undefined behaviour in EXPR due to missing sequence +/* Try to warn for undefined behavior in EXPR due to missing sequence points. */ static void @@ -1300,7 +1937,7 @@ check_case_value (value) that is unsigned if UNSIGNEDP is nonzero, otherwise signed. */ tree -type_for_size (bits, unsignedp) +c_common_type_for_size (bits, unsignedp) unsigned bits; int unsignedp; { @@ -1344,7 +1981,7 @@ type_for_size (bits, unsignedp) then UNSIGNEDP selects between signed and unsigned types. */ tree -type_for_mode (mode, unsignedp) +c_common_type_for_mode (mode, unsignedp) enum machine_mode mode; int unsignedp; { @@ -1399,41 +2036,44 @@ type_for_mode (mode, unsignedp) 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) { - 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; - } + 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; } -#endif return 0; } /* Return an unsigned type the same as TYPE in other respects. */ tree -unsigned_type (type) +c_common_unsigned_type (type) tree type; { tree type1 = TYPE_MAIN_VARIANT (type); @@ -1462,13 +2102,13 @@ unsigned_type (type) if (type1 == intQI_type_node) return unsigned_intQI_type_node; - return signed_or_unsigned_type (1, type); + return c_common_signed_or_unsigned_type (1, type); } /* Return a signed type the same as TYPE in other respects. */ tree -signed_type (type) +c_common_signed_type (type) tree type; { tree type1 = TYPE_MAIN_VARIANT (type); @@ -1497,14 +2137,14 @@ signed_type (type) if (type1 == unsigned_intQI_type_node) return intQI_type_node; - return signed_or_unsigned_type (0, type); + return c_common_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) +c_common_signed_or_unsigned_type (unsignedp, type) int unsignedp; tree type; { @@ -1572,8 +2212,9 @@ min_precision (value, unsignedp) 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). */ +/* 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) @@ -1753,19 +2394,20 @@ shorten_compare (op0_ptr, op1_ptr, restype_ptr, rescode_ptr) int unsignedp = TREE_UNSIGNED (*restype_ptr); tree val; - type = signed_or_unsigned_type (unsignedp0, TREE_TYPE (primop0)); + 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 = type_for_size (TYPE_PRECISION (type), unsignedp0); + 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 = signed_type (*restype_ptr); + *restype_ptr = c_common_signed_type (*restype_ptr); if (TREE_TYPE (primop1) != *restype_ptr) primop1 = convert (*restype_ptr, primop1); @@ -1862,22 +2504,11 @@ shorten_compare (op0_ptr, op1_ptr, restype_ptr, rescode_ptr) default: break; } - type = unsigned_type (type); + type = c_common_unsigned_type (type); } - if (!max_gt && !unsignedp0 && TREE_CODE (primop0) != INTEGER_CST) + if (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) @@ -1914,15 +2545,19 @@ shorten_compare (op0_ptr, op1_ptr, restype_ptr, rescode_ptr) && 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); + 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 (signed_or_unsigned_type (unsignedp0, TREE_TYPE (primop0)), - primop0); - primop1 = convert (signed_or_unsigned_type (unsignedp1, TREE_TYPE (primop1)), - primop1); + 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 { @@ -1945,7 +2580,7 @@ shorten_compare (op0_ptr, op1_ptr, restype_ptr, rescode_ptr) so suppress the warning. */ if (extra_warnings && !in_system_header && ! (TREE_CODE (primop0) == INTEGER_CST - && ! TREE_OVERFLOW (convert (signed_type (type), + && ! TREE_OVERFLOW (convert (c_common_signed_type (type), primop0)))) warning ("comparison of unsigned expression >= 0 is always true"); value = boolean_true_node; @@ -1954,7 +2589,7 @@ shorten_compare (op0_ptr, op1_ptr, restype_ptr, rescode_ptr) case LT_EXPR: if (extra_warnings && !in_system_header && ! (TREE_CODE (primop0) == INTEGER_CST - && ! TREE_OVERFLOW (convert (signed_type (type), + && ! TREE_OVERFLOW (convert (c_common_signed_type (type), primop0)))) warning ("comparison of unsigned expression < 0 is always false"); value = boolean_false_node; @@ -2063,8 +2698,8 @@ pointer_int_sum (resultcode, ptrop, intop) 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); + 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 @@ -2096,7 +2731,7 @@ pointer_int_sum (resultcode, ptrop, intop) The resulting type should always be `boolean_type_node'. */ tree -truthvalue_conversion (expr) +c_common_truthvalue_conversion (expr) tree expr; { if (TREE_CODE (expr) == ERROR_MARK) @@ -2162,32 +2797,32 @@ truthvalue_conversion (expr) 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)), + 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 non-zero or zero. */ - return truthvalue_conversion (TREE_OPERAND (expr, 0)); + /* 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 non-zero, but + /* 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), - truthvalue_conversion (TREE_OPERAND (expr, 0))); + c_common_truthvalue_conversion (TREE_OPERAND (expr, 0))); else - return truthvalue_conversion (TREE_OPERAND (expr, 0)); + 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), - truthvalue_conversion (TREE_OPERAND (expr, 1)), - truthvalue_conversion (TREE_OPERAND (expr, 2)))); + 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, @@ -2200,14 +2835,19 @@ truthvalue_conversion (expr) /* 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)); + return c_common_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) + /* 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: @@ -2240,12 +2880,12 @@ truthvalue_conversion (expr) if (TREE_CODE (TREE_TYPE (expr)) == COMPLEX_TYPE) { - tree tem = save_expr (expr); + tree t = 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)), + c_common_truthvalue_conversion (build_unary_op (REALPART_EXPR, t, 0)), + c_common_truthvalue_conversion (build_unary_op (IMAGPART_EXPR, t, 0)), 0)); } @@ -2254,7 +2894,7 @@ truthvalue_conversion (expr) static tree builtin_function_2 PARAMS ((const char *, const char *, tree, tree, int, enum built_in_class, int, int, - int)); + tree)); /* Make a variant type in the proper way for C/C++, propagating qualifiers down to the element type of an array. */ @@ -2316,7 +2956,6 @@ c_apply_type_quals_to_decl (type_quals, decl) } } - /* 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. */ @@ -2349,13 +2988,17 @@ c_common_get_alias_set (t) || 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 = signed_type (t); + tree t1 = c_common_signed_type (t); /* t1 == t can happen for boolean nodes which are always unsigned. */ if (t1 != t) @@ -2396,36 +3039,66 @@ c_common_get_alias_set (t) return -1; } -/* Implement the __alignof keyword: Return the minimum required - alignment of TYPE, measured in bytes. */ - +/* 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_alignof (type) +c_sizeof_or_alignof_type (type, op, complain) tree type; + enum tree_code op; + int complain; { - 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) + 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) { - type = TREE_TYPE (type); - code = TREE_CODE (type); + 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; } - - 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; + if (complain) + error ("invalid application of `%s' to an incomplete type", op_name); + value = size_zero_node; } else - t = size_int (TYPE_ALIGN (type) / BITS_PER_UNIT); + { + 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); + } - return fold (build1 (NOP_EXPR, size_type_node, t)); + /* 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 @@ -2476,19 +3149,30 @@ c_alignof_expr (expr) return fold (build1 (NOP_EXPR, size_type_node, t)); } -/* Give the specifications for the format attributes, used by C and all - descendents. */ +/* Handle C and C++ default attributes. */ -static const struct attribute_spec c_format_attribute_table[] = +enum built_in_attribute { - /* { 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 } +#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. */ @@ -2506,6 +3190,7 @@ c_common_nodes_and_builtins () #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 @@ -2517,6 +3202,7 @@ c_common_nodes_and_builtins () #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 }; @@ -2526,18 +3212,9 @@ c_common_nodes_and_builtins () 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); @@ -2571,41 +3248,52 @@ c_common_nodes_and_builtins () 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)); + /* 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 - pushdecl (build_decl (TYPE_DECL, get_identifier ("__int128_t"), intTI_type_node)); + (*lang_hooks.decls.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)); + (*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 - pushdecl (build_decl (TYPE_DECL, get_identifier ("__uint128_t"), unsigned_intTI_type_node)); + (*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); - pushdecl (build_decl (TYPE_DECL, NULL_TREE, - widest_integer_literal_type_node)); + (*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); - pushdecl (build_decl (TYPE_DECL, NULL_TREE, - widest_unsigned_literal_type_node)); + (*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 = signed_type (size_type_node); - if (flag_traditional) - size_type_node = signed_size_type_node; + signed_size_type_node = c_common_signed_type (size_type_node); set_sizetype (size_type_node); build_common_tree_nodes_2 (flag_short_double); @@ -2614,14 +3302,18 @@ c_common_nodes_and_builtins () 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)); + (*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. */ @@ -2643,12 +3335,12 @@ c_common_nodes_and_builtins () 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)); + (*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 @@ -2668,12 +3360,12 @@ c_common_nodes_and_builtins () 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)); + (*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); @@ -2705,19 +3397,8 @@ c_common_nodes_and_builtins () = 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 = 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) @@ -2730,8 +3411,8 @@ c_common_nodes_and_builtins () } else { - signed_wchar_type_node = signed_type (wchar_type_node); - unsigned_wchar_type_node = unsigned_type (wchar_type_node); + 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. */ @@ -2749,16 +3430,19 @@ c_common_nodes_and_builtins () 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); + unsigned_ptrdiff_type_node = c_common_unsigned_type (ptrdiff_type_node); - 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_va_list"), + va_list_type_node)); - pushdecl (build_decl (TYPE_DECL, get_identifier ("__builtin_ptrdiff_t"), - ptrdiff_type_node)); + (*lang_hooks.decls.pushdecl) + (build_decl (TYPE_DECL, get_identifier ("__builtin_ptrdiff_t"), + ptrdiff_type_node)); - pushdecl (build_decl (TYPE_DECL, get_identifier ("__builtin_size_t"), - sizetype)); + (*lang_hooks.decls.pushdecl) + (build_decl (TYPE_DECL, get_identifier ("__builtin_size_t"), + sizetype)); if (TREE_CODE (va_list_type_node) == ARRAY_TYPE) { @@ -2771,10 +3455,6 @@ c_common_nodes_and_builtins () 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) \ @@ -2840,6 +3520,19 @@ c_common_nodes_and_builtins () 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]); @@ -2851,10 +3544,15 @@ c_common_nodes_and_builtins () #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 -#define DEF_BUILTIN(ENUM, NAME, CLASS, \ - TYPE, LIBTYPE, BOTH_P, FALLBACK_P, NONANSI_P) \ + 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; \ @@ -2867,7 +3565,8 @@ c_common_nodes_and_builtins () CLASS, \ (FALLBACK_P \ ? (NAME + strlen ("__builtin_")) \ - : NULL)); \ + : NULL), \ + built_in_attributes[(int) ATTRS]); \ else \ decl = builtin_function_2 (NAME, \ NAME + strlen ("__builtin_"), \ @@ -2877,40 +3576,16 @@ c_common_nodes_and_builtins () CLASS, \ FALLBACK_P, \ NONANSI_P, \ - /*noreturn_p=*/0); \ + built_in_attributes[(int) ATTRS]); \ \ 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); + (*targetm.init_builtins) (); 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 @@ -2977,15 +3652,15 @@ builtin_function_disabled_p (name) 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. + 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, noreturn_p) + class, library_name_p, nonansi_p, attrs) const char *builtin_name; const char *name; tree builtin_type; @@ -2994,31 +3669,23 @@ builtin_function_2 (builtin_name, name, builtin_type, type, function_code, enum built_in_class class; int library_name_p; int nonansi_p; - int noreturn_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); - if (noreturn_p) - { - TREE_THIS_VOLATILE (bdecl) = 1; - TREE_SIDE_EFFECTS (bdecl) = 1; - } + 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); + decl = builtin_function (name, type, function_code, class, NULL, + attrs); 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); } @@ -3054,34 +3721,6 @@ c_promoting_integer_type_p (t) } } -/* 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. */ @@ -3122,6 +3761,81 @@ strip_array_types (type) 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. */ @@ -3134,8 +3848,6 @@ tree 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; @@ -3174,72 +3886,22 @@ expand_tree_builtin (function, params, coerced_params) 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; + return expand_unordered_cmp (function, params, UNLE_EXPR, LE_EXPR); case BUILT_IN_ISGREATEREQUAL: - if (TARGET_FLOAT_FORMAT == IEEE_FLOAT_FORMAT) - code = UNLT_EXPR; - else - code = LT_EXPR; - goto unordered_cmp; + return expand_unordered_cmp (function, params, UNLT_EXPR, LT_EXPR); case BUILT_IN_ISLESS: - if (TARGET_FLOAT_FORMAT == IEEE_FLOAT_FORMAT) - code = UNGE_EXPR; - else - code = GE_EXPR; - goto unordered_cmp; + return expand_unordered_cmp (function, params, UNGE_EXPR, GE_EXPR); case BUILT_IN_ISLESSEQUAL: - if (TARGET_FLOAT_FORMAT == IEEE_FLOAT_FORMAT) - code = UNGT_EXPR; - else - code = GT_EXPR; - goto unordered_cmp; + return expand_unordered_cmp (function, params, UNGT_EXPR, GT_EXPR); case BUILT_IN_ISLESSGREATER: - if (TARGET_FLOAT_FORMAT == IEEE_FLOAT_FORMAT) - code = UNEQ_EXPR; - else - code = EQ_EXPR; - goto unordered_cmp; + return expand_unordered_cmp (function, params, UNEQ_EXPR, EQ_EXPR); 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; + return expand_unordered_cmp (function, params, UNORDERED_EXPR, NOP_EXPR); default: break; @@ -3248,7 +3910,7 @@ expand_tree_builtin (function, params, coerced_params) return NULL_TREE; } -/* Returns non-zero if CODE is the code for a statement. */ +/* Returns nonzero if CODE is the code for a statement. */ int statement_code_p (code) @@ -3566,41 +4228,6 @@ finish_label_address_expr (label) 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 @@ -3608,7 +4235,7 @@ c_expand_expr (exp, target, tmode, modifier) tree exp; rtx target; enum machine_mode tmode; - enum expand_modifier modifier; + int modifier; /* Actually enum_modifier. */ { switch (TREE_CODE (exp)) { @@ -3749,7 +4376,7 @@ c_safe_from_p (target, exp) /* Hook used by unsafe_for_reeval to handle language-specific tree codes. */ int -c_unsafe_for_reeval (exp) +c_common_unsafe_for_reeval (exp) tree exp; { /* Statement expressions may not be reevaluated, likewise compound @@ -3774,56 +4401,6 @@ c_staticp (exp) 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)) @@ -4012,7 +4589,7 @@ c_expand_builtin_printf (arglist, target, tmode, modifier, ignore, unlocked) memcpy (newstr, TREE_STRING_POINTER (stripped_string), newlen - 1); newstr[newlen - 1] = 0; - arglist = combine_strings (build_string (newlen, newstr)); + arglist = fix_string_type (build_string (newlen, newstr)); arglist = build_tree_list (NULL_TREE, arglist); fn = fn_puts; } @@ -4151,112 +4728,449 @@ boolean_increment (code, arg) return val; } -/* Handle C and C++ default attributes. */ +/* 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)); +} -enum built_in_attribute +/* 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; { -#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 -}; + /* 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); + } +} -static tree built_in_attributes[(int) ATTR_LAST]; +/* 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; -static bool c_attrs_initialized = false; + if (c_language == clk_cplusplus) + { + if (SUPPORTS_ONE_ONLY) + cpp_define (pfile, "__GXX_WEAK__=1"); + else + cpp_define (pfile, "__GXX_WEAK__=0"); + if (warn_deprecated) + cpp_define (pfile, "__DEPRECATED"); + } + if (flag_exceptions) + cpp_define (pfile, "__EXCEPTIONS"); + + /* 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"); -static void c_init_attributes PARAMS ((void)); + if (flag_iso) + cpp_define (pfile, "__STRICT_ANSI__"); -/* 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); + 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__"); - /* Mark as "unspecified" (see c_common_post_options). */ - flag_bounds_check = -1; + /* 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 (); } -/* Post-switch processing. */ +/* 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 -c_common_post_options () +builtin_define_std (macro) + const char *macro; { - cpp_post_options (parse_in); - - flag_inline_trees = 1; + 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); - /* 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 it was in user's namespace... */ + if (p != buff + 2) { - if (!flag_no_inline) - flag_no_inline = 1; - if (flag_inline_functions) - { - flag_inline_trees = 2; - flag_inline_functions = 0; - } + /* 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); - /* 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); + cpp_define (parse_in, buf); } -/* Front end initialization common to C, ObjC and C++. */ -const char * -c_common_init (filename) - const char *filename; +/* 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; { - /* Do this before initializing pragmas, as then cpplib's hash table - has been set up. */ - filename = init_c_lex (filename); + char *buf; + size_t mlen = strlen (macro); + size_t vlen = 18; + size_t extra = 2; /* space for = and NUL. */ - init_pragma (); + buf = alloca (mlen + vlen + extra); + memcpy (buf, macro, mlen); + buf[mlen] = '='; + sprintf (buf + mlen + 1, HOST_WIDE_INT_PRINT_DEC, value); - if (!c_attrs_initialized) - c_init_attributes (); + 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); - return filename; + sprintf (buf, "%s=%s%s", macro, dec_str, fp_suffix); + cpp_define (parse_in, buf); } -/* Common finish hook for the C, ObjC and C++ front ends. */ -void -c_common_finish () +/* 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; { - cpp_finish (parse_in); + 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); - /* For performance, avoid tearing down cpplib's internal structures. - Call cpp_errors () instead of cpp_destroy (). */ - errorcount += cpp_errors (parse_in); + cpp_define (parse_in, buf); } static void @@ -4281,7 +5195,6 @@ c_init_attributes () #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; } @@ -4325,3 +5238,1447 @@ shadow_warning (msgid, name, decl) "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 "cleanup" attribute; arguments as in + struct attribute_spec.handler. */ + +static tree +handle_cleanup_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; + tree cleanup_id, cleanup_decl; + + /* ??? Could perhaps support cleanups on TREE_STATIC, much like we do + for global destructors in C++. This requires infrastructure that + we don't have generically at the moment. It's also not a feature + we'd be missing too much, since we do have attribute constructor. */ + if (TREE_CODE (decl) != VAR_DECL || TREE_STATIC (decl)) + { + warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name)); + *no_add_attrs = true; + return NULL_TREE; + } + + /* Verify that the argument is a function in scope. */ + /* ??? We could support pointers to functions here as well, if + that was considered desirable. */ + cleanup_id = TREE_VALUE (args); + if (TREE_CODE (cleanup_id) != IDENTIFIER_NODE) + { + error ("cleanup arg not an identifier"); + *no_add_attrs = true; + return NULL_TREE; + } + cleanup_decl = lookup_name (cleanup_id); + if (!cleanup_decl || TREE_CODE (cleanup_decl) != FUNCTION_DECL) + { + error ("cleanup arg not a function"); + *no_add_attrs = true; + return NULL_TREE; + } + + /* That the function has proper type is checked with the + eventual call to build_function_call. */ + + 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 --git a/contrib/gcc/c-common.def b/contrib/gcc/c-common.def index 7ad9e38..802238a 100644 --- a/contrib/gcc/c-common.def +++ b/contrib/gcc/c-common.def @@ -23,7 +23,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* Tree nodes relevant to both C and C++. These were originally in -cp-tree.def in the cp subdir. */ +cp-tree.def in the cp subdir. */ /* A node to remember a source position. */ DEFTREECODE (SRCLOC, "srcloc", 'x', 2) @@ -33,55 +33,55 @@ DEFTREECODE (ARROW_EXPR, "arrow_expr", 'e', 1) DEFTREECODE (ALIGNOF_EXPR, "alignof_expr", '1', 1) /* Used to represent an expression statement. Use `EXPR_STMT_EXPR' to - obtain the expression. */ + obtain the expression. */ DEFTREECODE (EXPR_STMT, "expr_stmt", 'e', 1) /* Used to represent a brace-enclosed block. The operand is - COMPOUND_BODY. */ + COMPOUND_BODY. */ DEFTREECODE (COMPOUND_STMT, "compound_stmt", 'e', 1) /* Used to represent a local declaration. The operand is - DECL_STMT_DECL. */ + 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. */ + 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. */ + 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. */ + 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. */ + DO_COND, respectively. */ DEFTREECODE (DO_STMT, "do_stmt", 'e', 2) /* Used to represent a 'return' statement. The operand is - RETURN_EXPR. */ + RETURN_STMT_EXPR. */ DEFTREECODE (RETURN_STMT, "return_stmt", 'e', 1) -/* Used to represent a 'break' statement. */ +/* Used to represent a 'break' statement. */ DEFTREECODE (BREAK_STMT, "break_stmt", 'e', 0) -/* Used to represent a 'continue' statement. */ +/* 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. */ + 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. */ +/* 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. */ + and can be obtained through the macro LABEL_STMT_LABEL. */ DEFTREECODE (LABEL_STMT, "label_stmt", 'e', 1) -/* Used to represent an inline assembly statement. */ +/* 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 --git a/contrib/gcc/c-common.h b/contrib/gcc/c-common.h index f5e4659..1f59ebd 100644 --- a/contrib/gcc/c-common.h +++ b/contrib/gcc/c-common.h @@ -43,7 +43,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA */ /* 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 + 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. */ @@ -58,7 +58,7 @@ enum rid RID_VOLATILE, RID_SIGNED, RID_AUTO, RID_RESTRICT, /* C extensions */ - RID_BOUNDED, RID_UNBOUNDED, RID_COMPLEX, + RID_BOUNDED, RID_UNBOUNDED, RID_COMPLEX, RID_THREAD, /* C++ */ RID_FRIEND, RID_VIRTUAL, RID_EXPLICIT, RID_EXPORT, RID_MUTABLE, @@ -93,12 +93,7 @@ enum rid /* 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 */ + /* 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, @@ -179,10 +174,10 @@ enum c_tree_index /* Identifier part common to the C front ends. Inherits from tree_identifier, despite appearances. */ -struct c_common_identifier +struct c_common_identifier GTY(()) { struct tree_common common; - struct cpp_hashnode node; + struct cpp_hashnode GTY ((skip (""))) node; }; #define wchar_type_node c_global_trees[CTI_WCHAR_TYPE] @@ -226,7 +221,7 @@ struct c_common_identifier /* A node for `((void) 0)'. */ #define void_zero_node c_global_trees[CTI_VOID_ZERO] -extern tree c_global_trees[CTI_MAX]; +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. */ @@ -238,16 +233,14 @@ extern tree c_global_trees[CTI_MAX]; 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 */ + 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 { +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 @@ -255,12 +248,12 @@ struct stmt_tree_s { 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 + /* 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 non-zero, since those are the normal semantics of + variable is nonzero, since those are the normal semantics of C++. However, in order to represent aggregate initialization code as @@ -277,7 +270,7 @@ typedef struct stmt_tree_s *stmt_tree; /* Global state pertinent to the current function. Some C dialects extend this structure with additional fields. */ -struct language_function { +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; @@ -316,11 +309,14 @@ extern int (*lang_statement_code_p) PARAMS ((enum tree_code)); 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)); @@ -336,7 +332,6 @@ extern tree walk_stmt_tree PARAMS ((tree *, 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)); @@ -349,7 +344,7 @@ extern void c_finish_while_stmt_cond PARAMS ((tree, tree)); structure for FUNCTION_DECLs; all other DECLs have a NULL DECL_LANG_SPECIFIC field. */ -struct c_lang_decl { +struct c_lang_decl GTY(()) { unsigned declared_inline : 1; }; @@ -360,17 +355,35 @@ struct c_lang_decl { #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 *'. */ +/* Switches common to the C front ends. */ -extern int flag_const_strings; +/* 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'. */ @@ -380,7 +393,91 @@ extern int flag_short_double; extern int flag_short_wchar; -/* Warn about *printf or *scanf format/argument anomalies. */ +/* 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; @@ -392,6 +489,10 @@ extern int warn_format_y2k; 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; @@ -400,25 +501,19 @@ extern int warn_format_nonliteral; 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; +/* C/ObjC language option variables. */ -/* Nonzero means warn about sizeof (function) or addition/subtraction - of function pointers. */ -extern int warn_pointer_arith; +/* Nonzero means message about use of implicit function declarations; + 1 means warning; 2 means error. */ -/* Nonzero means to warn about compile-time division by zero. */ -extern int warn_div_by_zero; +extern int mesg_implicit_function_declaration; -/* Nonzero means do some things the same way PCC does. */ +/* Nonzero means allow type mismatches in conditional expressions; + just make their values `void'. */ -extern int flag_traditional; +extern int flag_cond_mismatch; /* Nonzero means enable C89 Amendment 1 features. */ @@ -428,7 +523,7 @@ extern int flag_isoc94; extern int flag_isoc99; -/* Nonzero means environment is hosted (i.e., not freestanding) */ +/* Nonzero means that we have builtin functions, and main is an int */ extern int flag_hosted; @@ -437,27 +532,286 @@ extern int flag_hosted; extern int flag_noniso_default_format_attributes; -/* Nonzero means don't recognize any builtin functions. */ +/* 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 flag_no_builtin; +extern int warn_bad_function_cast; -/* Nonzero means don't recognize the non-ANSI builtin functions. - -ansi sets this. */ +/* Warn about traditional constructs whose meanings changed in ANSI C. */ -extern int flag_no_nonansi_builtin; +extern int warn_traditional; -/* Nonzero means warn about suggesting putting in ()'s. */ +/* Nonzero means warn for non-prototype function decls + or non-prototyped defs without previous prototype. */ -extern int warn_parentheses; +extern int warn_strict_prototypes; -/* Warn if a type conversion is done that might have confusing results. */ +/* Nonzero means warn for any global function def + without separate previous decl. */ -extern int warn_conversion; +extern int warn_missing_declarations; -/* Nonzero means warn about usage of long long, - when `-pedantic' and not C99. */ +/* 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_long_long; +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. */ @@ -484,6 +838,10 @@ extern int skip_evaluation; 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 @@ -501,6 +859,12 @@ extern const char *fname_as_string PARAMS ((int)); 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, @@ -508,23 +872,34 @@ extern tree handle_format_attribute PARAMS ((tree *, tree, tree, 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 PARAMS ((tree)); -extern tree c_alignof PARAMS ((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_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 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)); @@ -533,6 +908,8 @@ extern void unsigned_conversion_warning PARAMS ((tree, tree)); /* 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 @@ -554,13 +931,13 @@ extern void disable_builtin_function PARAMS ((const char *)); 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 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 simple_type_promotes_to PARAMS ((tree)); extern tree strip_array_types PARAMS ((tree)); /* These macros provide convenient access to the various _STMT nodes. */ @@ -591,7 +968,7 @@ extern tree strip_array_types PARAMS ((tree)); /* 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) +#define RETURN_STMT_EXPR(NODE) TREE_OPERAND (RETURN_STMT_CHECK (NODE), 0) /* EXPR_STMT accessor. This gives the expression associated with an expression statement. */ @@ -721,7 +1098,7 @@ extern tree strip_array_types PARAMS ((tree)); #define STMT_LINENO(NODE) \ (TREE_COMPLEXITY ((NODE))) -/* If non-zero, the STMT_LINENO for NODE is the line at which the +/* 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))) @@ -744,7 +1121,6 @@ enum c_tree_code { #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)); @@ -830,8 +1206,6 @@ extern tree boolean_increment PARAMS ((enum tree_code, 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)); @@ -847,18 +1221,19 @@ extern tree finish_label_address_expr PARAMS ((tree)); 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 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_unsafe_for_reeval 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. */ @@ -872,4 +1247,6 @@ struct c_fileinfo 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 --git a/contrib/gcc/c-config-lang.in b/contrib/gcc/c-config-lang.in new file mode 100644 index 0000000..c0a786f --- /dev/null +++ b/contrib/gcc/c-config-lang.in @@ -0,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 --git a/contrib/gcc/c-convert.c b/contrib/gcc/c-convert.c index 947c79b..3634bbe 100644 --- a/contrib/gcc/c-convert.c +++ b/contrib/gcc/c-convert.c @@ -1,5 +1,5 @@ /* Language-level data type conversion for GNU C. - Copyright (C) 1987, 1988, 1991, 1998 Free Software Foundation, Inc. + Copyright (C) 1987, 1988, 1991, 1998, 2002 Free Software Foundation, Inc. This file is part of GCC. @@ -29,6 +29,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #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-- @@ -42,7 +43,8 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA 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 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. */ @@ -90,9 +92,9 @@ convert (type, expr) 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 (). */ + 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 --git a/contrib/gcc/c-decl.c b/contrib/gcc/c-decl.c index 2c8857f..37b22a7 100644 --- a/contrib/gcc/c-decl.c +++ b/contrib/gcc/c-decl.c @@ -37,7 +37,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include "output.h" #include "expr.h" #include "c-tree.h" -#include "c-lex.h" #include "toplev.h" #include "ggc.h" #include "tm_p.h" @@ -47,6 +46,8 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include "timevar.h" #include "c-common.h" #include "c-pragma.h" +#include "libfuncs.h" +#include "except.h" /* In grokdeclarator, distinguish syntactic contexts of declarators. */ enum decl_context @@ -104,26 +105,21 @@ static int current_function_prototype_line; /* The current statement tree. */ -static struct stmt_tree_s c_stmt_tree; +static GTY(()) struct stmt_tree_s c_stmt_tree; /* The current scope statement stack. */ -static tree c_scope_stmt_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 tree named_labels; +static GTY(()) 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; +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. */ @@ -165,7 +161,7 @@ static int current_extern_inline; /* 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 +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. @@ -216,9 +212,9 @@ struct binding_level /* 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; + /* 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. @@ -230,22 +226,22 @@ struct binding_level /* The binding level currently in effect. */ -static struct binding_level *current_binding_level; +static GTY(()) struct binding_level *current_binding_level; /* A chain of binding_level structures awaiting reuse. */ -static struct binding_level *free_binding_level; +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 struct binding_level *global_binding_level; +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, 0, + = {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. */ @@ -263,7 +259,7 @@ static int keep_next_if_subblocks; saved values of named_labels and shadowed_labels for a label binding level outside the current one. */ -static struct binding_level *label_level_chain; +static GTY(()) struct binding_level *label_level_chain; /* Functions called automatically at the beginning and end of execution. */ @@ -272,7 +268,7 @@ tree static_ctors, static_dtors; /* Forward declarations. */ static struct binding_level * make_binding_level PARAMS ((void)); -static void mark_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)); @@ -288,163 +284,9 @@ static void layout_array_type PARAMS ((tree)); 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 *)); -/* 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 @@ -457,357 +299,6 @@ enum deprecated_states { 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; @@ -834,7 +325,7 @@ c_print_identifier (file, node, indent) for a top-level tentative array defn that wasn't complete before. */ void -finish_incomplete_decl (decl) +c_finish_incomplete_decl (decl) tree decl; { if (TREE_CODE (decl) == VAR_DECL) @@ -854,13 +345,33 @@ finish_incomplete_decl (decl) } } -/* Create a new `struct binding_level'. */ +/* Reuse or create a struct for this binding level. */ static struct binding_level * make_binding_level () { - /* NOSTRICT */ - return (struct binding_level *) xmalloc (sizeof (struct 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. */ @@ -928,17 +439,7 @@ pushlevel (tag_transparent) 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 (); - } + newlevel = make_binding_level (); /* Add this level to the front of the chain (stack) of levels that are active. */ @@ -1159,13 +660,7 @@ poplevel (keep, reverse, functionbody) /* 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; - } + pop_binding_level (¤t_binding_level); /* Dispose of the block that we just made inside some higher level. */ if (functionbody) @@ -1244,17 +739,7 @@ push_label_level () { 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 (); - } + newlevel = make_binding_level (); /* Add this level to the front of the chain (stack) of label levels. */ @@ -1316,9 +801,7 @@ pop_label_level () 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; + pop_binding_level (&label_level_chain); } /* Push a definition or a declaration of struct, union or enum tag "name". @@ -1483,14 +966,7 @@ duplicate_decls (newdecl, olddecl, different_binding_level) 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)) + if (TREE_CODE (olddecl) == FUNCTION_DECL && DECL_BUILT_IN (olddecl)) { /* A function declaration for a built-in function. */ if (!TREE_PUBLIC (newdecl)) @@ -1657,7 +1133,7 @@ duplicate_decls (newdecl, olddecl, different_binding_level) break; } - if (simple_type_promotes_to (type) != NULL_TREE) + 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; @@ -1665,6 +1141,27 @@ duplicate_decls (newdecl, olddecl, different_binding_level) } } error_with_decl (olddecl, "previous declaration of `%s'"); + + /* This is safer because the initializer might contain references + to variables that were declared between olddecl and newdecl. This + will make the initializer invalid for olddecl in case it gets + assigned to olddecl below. */ + 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 { @@ -1739,12 +1236,7 @@ duplicate_decls (newdecl, olddecl, different_binding_level) } /* 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))) + if (! comptypes (TREE_VALUE (parm), TREE_VALUE (type))) { error_with_decl (newdecl, "prototype for `%s' follows and argument %d doesn't match", @@ -1879,11 +1371,6 @@ duplicate_decls (newdecl, olddecl, different_binding_level) 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; @@ -2197,10 +1684,7 @@ pushdecl (x) 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) + if (! t && DECL_EXTERNAL (x) && TREE_PUBLIC (x)) { t = IDENTIFIER_GLOBAL_VALUE (name); /* Type decls at global scope don't conflict with externs declared @@ -2219,9 +1703,8 @@ pushdecl (x) } /* 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) + warn. */ + if (TREE_PUBLIC (name) /* Don't test for DECL_EXTERNAL, because grokdeclarator sets this for all functions. */ && ! TREE_PUBLIC (x) @@ -2253,7 +1736,7 @@ pushdecl (x) } /* If we are processing a typedef statement, generate a whole new - ..._TYPE node (which will be just an variant of the existing + ..._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. @@ -2315,9 +1798,6 @@ pushdecl (x) } /* 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) @@ -2325,11 +1805,7 @@ pushdecl (x) { 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) + if (IDENTIFIER_LIMBO_VALUE (name) != 0) /* Decls in limbo are always extern, so no need to check that. */ decl = IDENTIFIER_LIMBO_VALUE (name); else @@ -2359,39 +1835,6 @@ pushdecl (x) "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) @@ -2548,7 +1991,7 @@ pushdecl (x) b->shadowed = tree_cons (name, oldlocal, b->shadowed); } - /* Keep count of variables in this level with incomplete type. + /* 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. */ @@ -2561,7 +2004,7 @@ pushdecl (x) element = TREE_TYPE (element); if (TREE_CODE (element) == RECORD_TYPE || TREE_CODE (element) == UNION_TYPE) - ++b->n_incomplete; + b->incomplete_list = tree_cons (NULL_TREE, x, b->incomplete_list); } } @@ -2625,12 +2068,12 @@ implicitly_declare (functionid) 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. */ + 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-actions.c. */ - maybe_objc_check_decl (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); @@ -2674,17 +2117,8 @@ redeclaration_error_message (newdecl, olddecl) { 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; + /* 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; @@ -3030,25 +2464,6 @@ lookup_name_current_level (name) 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. @@ -3102,22 +2517,6 @@ c_init_decl_processing () 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 @@ -3166,24 +2565,21 @@ c_make_fname_decl (id, type_dep) 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. */ + 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) +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 -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); @@ -3191,17 +2587,16 @@ builtin_function (name, type, function_code, class, library_name) 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); + if (attrs) + decl_attributes (&decl, attrs, ATTR_FLAG_BUILT_IN); + else + decl_attributes (&decl, NULL_TREE, 0); return decl; } @@ -3210,7 +2605,7 @@ builtin_function (name, type, function_code, class, library_name) attributes. */ void -insert_default_attributes (decl) +c_insert_default_attributes (decl) tree decl; { if (!TREE_PUBLIC (decl)) @@ -3307,8 +2702,8 @@ shadow_tag_warned (declspecs, warned) /* 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 + 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 @@ -3330,9 +2725,9 @@ build_array_declarator (expr, quals, static_p, vla_unspec_p) if (pedantic && !flag_isoc99) { if (static_p || quals != NULL_TREE) - pedwarn ("ISO C89 does not support `static' or type qualifiers in parameter array declarators"); + pedwarn ("ISO C90 does not support `static' or type qualifiers in parameter array declarators"); if (vla_unspec_p) - pedwarn ("ISO C89 does not support `[*]' array declarators"); + pedwarn ("ISO C90 does not support `[*]' array declarators"); } if (vla_unspec_p) warning ("GCC does not yet properly implement `[*]' array declarators"); @@ -3341,7 +2736,7 @@ build_array_declarator (expr, quals, static_p, vla_unspec_p) /* 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 + 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. */ @@ -3517,9 +2912,19 @@ start_decl (declarator, declspecs, initialized, attributes) /* 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)) + + -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. */ @@ -3690,8 +3095,9 @@ finish_decl (decl, init, asmspec_tree) 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); + /* 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)) { @@ -3753,8 +3159,9 @@ finish_decl (decl, init, asmspec_tree) 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); + /* 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); } @@ -3763,17 +3170,41 @@ finish_decl (decl, init, asmspec_tree) computing them in the following function definition. */ if (current_binding_level == global_binding_level) get_pending_sizes (); -} -/* If DECL has a cleanup, build and return that cleanup here. - This is a callback called by expand_expr. */ + /* Install a cleanup (aka destructor) if one was given. */ + if (TREE_CODE (decl) == VAR_DECL && !TREE_STATIC (decl)) + { + tree attr = lookup_attribute ("cleanup", DECL_ATTRIBUTES (decl)); + if (attr) + { + static bool eh_initialized_p; -tree -maybe_build_cleanup (decl) - tree decl ATTRIBUTE_UNUSED; -{ - /* There are no cleanups in C. */ - return NULL_TREE; + tree cleanup_id = TREE_VALUE (TREE_VALUE (attr)); + tree cleanup_decl = lookup_name (cleanup_id); + tree cleanup; + + /* Build "cleanup(&decl)" for the destructor. */ + cleanup = build_unary_op (ADDR_EXPR, decl, 0); + cleanup = build_tree_list (NULL_TREE, cleanup); + cleanup = build_function_call (cleanup_decl, cleanup); + + /* Don't warn about decl unused; the cleanup uses it. */ + TREE_USED (decl) = 1; + + /* Initialize EH, if we've been told to do so. */ + if (flag_exceptions && !eh_initialized_p) + { + eh_initialized_p = true; + eh_personality_libfunc + = init_one_libfunc (USING_SJLJ_EXCEPTIONS + ? "__gcc_personality_sj0" + : "__gcc_personality_v0"); + using_eh_for_cleanups (); + } + + add_stmt (build_stmt (CLEANUP_STMT, decl, cleanup)); + } + } } /* Given a parsed parameter declaration, @@ -3958,6 +3389,40 @@ complete_array_type (type, initial_value, do_default) 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. @@ -4109,7 +3574,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized) enum rid i = C_RID_CODE (id); if ((int) i <= (int) RID_LAST_MODIFIER) { - if (i == RID_LONG && (specbits & (1 << (int) i))) + if (i == RID_LONG && (specbits & (1 << (int) RID_LONG))) { if (longlong) error ("`long long long' is too long for GCC"); @@ -4117,12 +3582,33 @@ grokdeclarator (declarator, declspecs, decl_context, initialized) { if (pedantic && !flag_isoc99 && ! in_system_header && warn_long_long) - pedwarn ("ISO C89 does not support `long long'"); + pedwarn ("ISO C90 does not support `long long'"); longlong = 1; } } else if (specbits & (1 << (int) i)) - pedwarn ("duplicate `%s'", IDENTIFIER_POINTER (id)); + { + 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; } @@ -4242,12 +3728,11 @@ grokdeclarator (declarator, declspecs, decl_context, initialized) else { ok = 1; - if (!explicit_int && !defaulted_int && !explicit_char && pedantic) + if (!explicit_int && !defaulted_int && !explicit_char) { - pedwarn ("long, short, signed or unsigned used invalidly for `%s'", - name); - if (flag_pedantic_errors) - ok = 0; + error ("long, short, signed or unsigned used invalidly for `%s'", + name); + ok = 0; } } @@ -4270,9 +3755,6 @@ grokdeclarator (declarator, declspecs, decl_context, initialized) /* 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' @@ -4291,7 +3773,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized) else if (type == char_type_node) type = unsigned_char_type_node; else if (typedef_decl) - type = unsigned_type (type); + type = c_common_unsigned_type (type); else type = unsigned_type_node; } @@ -4308,7 +3790,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized) if (specbits & 1 << (int) RID_COMPLEX) { if (pedantic && !flag_isoc99) - pedwarn ("ISO C89 does not support complex types"); + 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 @@ -4375,6 +3857,12 @@ grokdeclarator (declarator, declspecs, decl_context, initialized) 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.). */ @@ -4384,7 +3872,8 @@ grokdeclarator (declarator, declspecs, decl_context, initialized) && (specbits & ((1 << (int) RID_REGISTER) | (1 << (int) RID_AUTO) - | (1 << (int) RID_TYPEDEF)))) + | (1 << (int) RID_TYPEDEF) + | (1 << (int) RID_THREAD)))) { if (specbits & 1 << (int) RID_AUTO && (pedantic || current_binding_level == global_binding_level)) @@ -4393,8 +3882,10 @@ grokdeclarator (declarator, declspecs, decl_context, initialized) 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_AUTO) | (1 << (int) RID_THREAD)); } else if (decl_context != NORMAL && nclasses > 0) { @@ -4417,7 +3908,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized) } specbits &= ~((1 << (int) RID_TYPEDEF) | (1 << (int) RID_REGISTER) | (1 << (int) RID_AUTO) | (1 << (int) RID_STATIC) - | (1 << (int) RID_EXTERN)); + | (1 << (int) RID_EXTERN) | (1 << (int) RID_THREAD)); } } else if (specbits & 1 << (int) RID_EXTERN && initialized && ! funcdef_flag) @@ -4428,12 +3919,25 @@ grokdeclarator (declarator, declspecs, decl_context, initialized) 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); + 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. @@ -4501,7 +4005,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized) 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); + tree index_type = c_common_signed_type (sizetype); array_ptr_quals = TREE_TYPE (declarator); array_parm_static = TREE_STATIC (declarator); @@ -4522,6 +4026,9 @@ grokdeclarator (declarator, declspecs, decl_context, initialized) 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; @@ -4564,10 +4071,10 @@ grokdeclarator (declarator, declspecs, decl_context, initialized) if (!flag_isoc99 && pedantic) { if (TREE_CONSTANT (size)) - pedwarn ("ISO C89 forbids array `%s' whose size can't be evaluated", + pedwarn ("ISO C90 forbids array `%s' whose size can't be evaluated", name); else - pedwarn ("ISO C89 forbids variable-size array `%s'", + pedwarn ("ISO C90 forbids variable-size array `%s'", name); } } @@ -4603,14 +4110,27 @@ grokdeclarator (declarator, declspecs, decl_context, initialized) } if (size_varies) - itype = variable_size (itype); + { + /* 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 C89 does not support flexible array members"); + pedwarn ("ISO C90 does not support flexible array members"); /* ISO C99 Flexible array members are effectively identical to GCC's zero-length array extension. */ @@ -4682,13 +4202,6 @@ grokdeclarator (declarator, declspecs, decl_context, initialized) 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. */ @@ -4976,11 +4489,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized) if (type == error_mark_node) promoted_type = type; else - { - promoted_type = simple_type_promotes_to (type); - if (! promoted_type) - promoted_type = type; - } + promoted_type = c_type_promotes_to (type); DECL_ARG_TYPE (decl) = promoted_type; DECL_ARG_TYPE_AS_WRITTEN (decl) = type_as_written; @@ -5032,6 +4541,8 @@ grokdeclarator (declarator, declspecs, decl_context, initialized) 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. */ @@ -5091,6 +4602,8 @@ grokdeclarator (declarator, declspecs, decl_context, initialized) 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; } @@ -5124,22 +4637,32 @@ grokdeclarator (declarator, declspecs, decl_context, initialized) 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); + 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) = DECL_EXTERNAL (decl); + 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"); } } @@ -5156,7 +4679,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized) 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); + c_mark_addressable (decl); decl_attributes (&decl, returned_attrs, 0); @@ -5491,25 +5014,22 @@ start_struct (code, name) 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)); + error ("redefinition of `union %s'", IDENTIFIER_POINTER (name)); else - error ("redefinition of `struct %s'", - IDENTIFIER_POINTER (name)); + error ("redefinition of `struct %s'", IDENTIFIER_POINTER (name)); } - - return ref; } + else + { + /* Otherwise create a forward-reference just so the tag is in scope. */ - /* Otherwise create a forward-reference just so the tag is in scope. */ - - ref = make_node (code); - pushtag (name, ref); + ref = make_node (code); + pushtag (name, ref); + } + C_TYPE_BEING_DEFINED (ref) = 1; TYPE_PACKED (ref) = flag_pack_struct; return ref; @@ -5533,15 +5053,44 @@ grokfield (filename, line, declarator, declspecs, width) 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. */ + /* 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 (TREE_CODE (type) == TYPE_DECL) + 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 (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 { - error ("unnamed fields of type other than struct or union are not allowed"); + warn_unnamed_field: + warning ("declaration does not declare anything"); return NULL_TREE; } } @@ -5551,7 +5100,8 @@ grokfield (filename, line, declarator, declspecs, width) finish_decl (value, NULL_TREE, NULL_TREE); DECL_INITIAL (value) = width; - maybe_objc_check_decl (value); + if (flag_objc) + objc_check_decl (value); return value; } @@ -5584,7 +5134,7 @@ finish_struct (t, fieldlist, attributes) if (pedantic) pedwarn ("%s defined inside parms", TREE_CODE (t) == UNION_TYPE ? _("union") : _("structure")); - else if (! flag_traditional) + else warning ("%s defined inside parms", TREE_CODE (t) == UNION_TYPE ? _("union") : _("structure")); } @@ -5727,18 +5277,6 @@ finish_struct (t, fieldlist, attributes) } } - 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. */ @@ -5754,6 +5292,11 @@ finish_struct (t, fieldlist, attributes) 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; } @@ -5827,22 +5370,29 @@ finish_struct (t, fieldlist, attributes) /* 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) + if (current_binding_level->incomplete_list != NULL_TREE) { - tree decl; - for (decl = current_binding_level->names; decl; decl = TREE_CHAIN (decl)) - { + 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-actions.c. */ - maybe_objc_check_decl (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, toplevel, 0); if (! toplevel) expand_decl (decl); - if (--current_binding_level->n_incomplete == 0) - break; + /* 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) @@ -5856,13 +5406,17 @@ finish_struct (t, fieldlist, attributes) if (TREE_CODE (decl) != TYPE_DECL) { layout_decl (decl, 0); - maybe_objc_check_decl (decl); + if (flag_objc) + 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; + /* Unlink X from the incomplete list. */ + if (prev) + TREE_CHAIN (prev) = TREE_CHAIN (x); + else + current_binding_level->incomplete_list = TREE_CHAIN (x); } } } @@ -5979,7 +5533,7 @@ finish_enum (enumtype, values, attributes) min_precision (maxnode, unsign)); if (TYPE_PACKED (enumtype) || precision > TYPE_PRECISION (integer_type_node)) { - tree narrowest = type_for_size (precision, unsign); + tree narrowest = c_common_type_for_size (precision, unsign); if (narrowest == 0) { warning ("enumeration values exceed range of largest integer"); @@ -5992,7 +5546,7 @@ finish_enum (enumtype, values, attributes) precision = TYPE_PRECISION (integer_type_node); if (precision == TYPE_PRECISION (integer_type_node)) - enum_value_type = type_for_size (precision, 0); + enum_value_type = c_common_type_for_size (precision, 0); else enum_value_type = enumtype; @@ -6120,11 +5674,11 @@ build_enumerator (name, value) /* 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))); + 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); @@ -6159,7 +5713,6 @@ start_function (declspecs, declarator, attributes) current_function_returns_abnormally = 0; warn_about_return_type = 0; current_extern_inline = 0; - c_function_varargs = 0; named_labels = 0; shadowed_labels = 0; @@ -6356,12 +5909,10 @@ start_function (declspecs, declarator, attributes) /* 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. */ + /* It retains unsignedness if not really getting wider. */ if (TREE_UNSIGNED (restype) - && (flag_traditional - || (TYPE_PRECISION (restype) - == TYPE_PRECISION (integer_type_node)))) + && (TYPE_PRECISION (restype) + == TYPE_PRECISION (integer_type_node))) restype = unsigned_type_node; else restype = integer_type_node; @@ -6380,16 +5931,6 @@ start_function (declspecs, declarator, attributes) 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 @@ -6580,15 +6121,6 @@ store_parm_decls () 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) { @@ -6722,11 +6254,7 @@ store_parm_decls () "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)) + else { error ("argument `%s' doesn't match prototype", IDENTIFIER_POINTER (DECL_NAME (parm))); @@ -6861,13 +6389,6 @@ finish_function (nested, can_defer_p) 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))) @@ -6924,7 +6445,7 @@ finish_function (nested, can_defer_p) /* 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. */ + c_pop_function_context and then reset via pop_function_context. */ current_function_decl = NULL; } } @@ -6944,7 +6465,27 @@ c_expand_deferred_function (fndecl) } } -/* Generate the RTL for the body of FNDECL. If NESTED_P is non-zero, +/* 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. */ @@ -6955,12 +6496,19 @@ c_expand_body (fndecl, nested_p, can_defer_p) int nested_p, can_defer_p; { int uninlinable = 1; + int saved_lineno; + const char *saved_input_filename; /* There's no reason to do any of the work here if we're only doing semantic analysis; this code just generates RTL. */ if (flag_syntax_only) return; + saved_lineno = lineno; + saved_input_filename = input_filename; + lineno = DECL_SOURCE_LINE (fndecl); + input_filename = DECL_SOURCE_FILE (fndecl); + if (flag_inline_trees) { /* First, cache whether the current function is inlinable. Some @@ -6978,6 +6526,8 @@ c_expand_body (fndecl, nested_p, can_defer_p) /* Let the back-end know that this function exists. */ (*debug_hooks->deferred_inline_function) (fndecl); timevar_pop (TV_INTEGRATION); + lineno = saved_lineno; + input_filename = saved_input_filename; return; } @@ -6999,7 +6549,6 @@ c_expand_body (fndecl, nested_p, can_defer_p) /* Initialize the RTL code for the function. */ current_function_decl = fndecl; - input_filename = DECL_SOURCE_FILE (fndecl); init_function_start (fndecl, input_filename, DECL_SOURCE_LINE (fndecl)); /* This function is being processed in whole-function mode. */ @@ -7012,13 +6561,18 @@ c_expand_body (fndecl, nested_p, can_defer_p) 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 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) @@ -7028,7 +6582,9 @@ c_expand_body (fndecl, nested_p, can_defer_p) /* Generate the RTL for this function. */ expand_stmt (DECL_SAVED_TREE (fndecl)); - if (uninlinable) + + /* 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; @@ -7099,7 +6655,7 @@ c_expand_body (fndecl, nested_p, can_defer_p) /* 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. + 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; @@ -7129,6 +6685,9 @@ c_expand_body (fndecl, nested_p, can_defer_p) /* Return to the enclosing function. */ pop_function_context (); timevar_pop (TV_EXPAND); + + lineno = saved_lineno; + input_filename = saved_input_filename; } /* Check the declarations given in a for-loop for satisfying the C99 @@ -7193,9 +6752,9 @@ check_for_loop_decls () that keep track of the progress of compilation of the current function. Used for nested functions. */ -struct c_language_function +struct language_function GTY(()) { - struct language_function base; + struct c_language_function base; tree named_labels; tree shadowed_labels; int returns_value; @@ -7210,13 +6769,13 @@ struct c_language_function used during compilation of a C function. */ void -push_c_function_context (f) +c_push_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; + 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; @@ -7233,11 +6792,10 @@ push_c_function_context (f) /* Restore the variables used during compilation of a C function. */ void -pop_c_function_context (f) +c_pop_function_context (f) struct function *f; { - struct c_language_function *p - = (struct c_language_function *) f->language; + struct language_function *p = f->language; tree link; /* Bring back all the labels that were shadowed. */ @@ -7267,32 +6825,13 @@ pop_c_function_context (f) current_extern_inline = p->extern_inline; current_binding_level = p->binding_level; - free (p); - f->language = 0; + f->language = NULL; } -/* Mark the language specific parts of F for GC. */ +/* Copy the DECL_LANG_SPECIFIC data associated with DECL. */ 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) +c_dup_lang_specific_decl (decl) tree decl; { struct lang_decl *ld; @@ -7306,38 +6845,12 @@ copy_lang_decl (decl) 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, +/* 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. */ @@ -7446,3 +6959,26 @@ build_void_list_node () 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 --git a/contrib/gcc/c-dump.c b/contrib/gcc/c-dump.c new file mode 100644 index 0000000..65407a5 --- /dev/null +++ b/contrib/gcc/c-dump.c @@ -0,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 --git a/contrib/gcc/c-errors.c b/contrib/gcc/c-errors.c index 3f030f9..1bd52a8 100644 --- a/contrib/gcc/c-errors.c +++ b/contrib/gcc/c-errors.c @@ -32,13 +32,12 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA void pedwarn_c99 VPARAMS ((const char *msgid, ...)) { - diagnostic_context dc; - + diagnostic_info diagnostic; 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); + diagnostic_set_info (&diagnostic, msgid, &ap, input_filename, lineno, + flag_isoc99 ? pedantic_error_kind () : DK_WARNING); + report_diagnostic (&diagnostic); VA_CLOSE (ap); } diff --git a/contrib/gcc/c-format.c b/contrib/gcc/c-format.c index 658ca30..083e912 100644 --- a/contrib/gcc/c-format.c +++ b/contrib/gcc/c-format.c @@ -27,31 +27,8 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include "c-common.h" #include "intl.h" #include "diagnostic.h" - +#include "langhooks.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 @@ -61,11 +38,15 @@ set_Wformat (setting) 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; } @@ -305,7 +286,7 @@ decode_format_attr (args, info, validated_p) /* Check a call to a format function against a parameter list. */ -/* The meaningfully distinct length modifiers for format checking recognised +/* The meaningfully distinct length modifiers for format checking recognized by GCC. */ enum format_lengths { @@ -348,7 +329,7 @@ enum format_std_version ? "ISO C++" \ : ((FEATURE_VER) == STD_EXT \ ? "ISO C" \ - : "ISO C89")) + : "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 \ @@ -458,7 +439,7 @@ typedef struct /* 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 + 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 @@ -488,11 +469,11 @@ typedef struct 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 + /* 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 non-zero character from flags2 if it only applies in some + 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; @@ -709,7 +690,6 @@ static const format_flag_pair strfmon_flag_pairs[] = #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 @@ -719,7 +699,6 @@ static const format_flag_pair strfmon_flag_pairs[] = #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 @@ -895,10 +874,16 @@ typedef struct 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_info_recurse PARAMS ((int *, format_check_results *, - function_format_info *, tree, - tree, unsigned HOST_WIDE_INT)); +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, @@ -1011,7 +996,7 @@ check_function_format (status, attrs, params) static void status_warning VPARAMS ((int *status, const char *msgid, ...)) { - diagnostic_context dc; + diagnostic_info diagnostic ; VA_OPEN (ap, msgid); VA_FIXEDARG (ap, int *, status); @@ -1022,9 +1007,9 @@ status_warning VPARAMS ((int *status, const char *msgid, ...)) else { /* This duplicates the warning function behavior. */ - set_diagnostic_context - (&dc, msgid, &ap, input_filename, lineno, /* warn = */ 1); - report_diagnostic (&dc); + diagnostic_set_info (&diagnostic, _(msgid), &ap, input_filename, lineno, + DK_WARNING); + report_diagnostic (&diagnostic); } VA_CLOSE (ap); @@ -1289,6 +1274,7 @@ check_format_info (status, info, params) function_format_info *info; tree params; { + format_check_context format_ctx; unsigned HOST_WIDE_INT arg_num; tree format_tree; format_check_results res; @@ -1315,7 +1301,13 @@ check_format_info (status, info, params) res.number_unterminated = 0; res.number_other = 0; - check_format_info_recurse (status, &res, info, format_tree, params, arg_num); + 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) { @@ -1361,8 +1353,9 @@ check_format_info (status, info, params) && 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"); + && 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"); @@ -1371,112 +1364,31 @@ check_format_info (status, info, params) 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. */ +/* 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_info_recurse (status, res, info, format_tree, params, arg_num) - int *status; - format_check_results *res; - function_format_info *info; +check_format_arg (ctx, format_tree, arg_num) + void *ctx; tree format_tree; - tree params; 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 (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) @@ -1751,11 +1663,6 @@ check_format_info_main (status, res, info, format_chars, format_length, /* "...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; @@ -1775,6 +1682,11 @@ check_format_info_main (status, res, info, format_chars, format_length, } 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) { @@ -2258,7 +2170,6 @@ check_format_types (status, types) tree cur_type; tree orig_cur_type; tree wanted_type; - tree promoted_type; int arg_num; int i; int char_type_flag; @@ -2277,11 +2188,7 @@ check_format_types (status, types) abort (); if (types->pointer_count == 0) - { - promoted_type = simple_type_promotes_to (wanted_type); - if (promoted_type != NULL_TREE) - wanted_type = promoted_type; - } + wanted_type = (*lang_hooks.types.type_promotes_to) (wanted_type); STRIP_NOPS (cur_param); @@ -2386,8 +2293,8 @@ check_format_types (status, types) && 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))) + ? 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 --git a/contrib/gcc/c-lang.c b/contrib/gcc/c-lang.c index 2b7d473..8614e25 100644 --- a/contrib/gcc/c-lang.c +++ b/contrib/gcc/c-lang.c @@ -24,10 +24,11 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #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 const char *c_init PARAMS ((const char *)); static void c_init_options PARAMS ((void)); /* ### When changing hooks, consider if ObjC needs changing too!! ### */ @@ -35,25 +36,51 @@ static void c_init_options PARAMS ((void)); #undef LANG_HOOKS_NAME #define LANG_HOOKS_NAME "GNU C" #undef LANG_HOOKS_INIT -#define LANG_HOOKS_INIT c_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_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_SET_YYDEBUG -#define LANG_HOOKS_SET_YYDEBUG c_set_yydebug +#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 \ @@ -67,25 +94,70 @@ static void c_init_options PARAMS ((void)); #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); } -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 @@ -102,14 +174,21 @@ is_class_name (arg) return 0; } +tree +objc_is_id (arg) + tree arg ATTRIBUTE_UNUSED; +{ + return 0; +} + void -maybe_objc_check_decl (decl) +objc_check_decl (decl) tree decl ATTRIBUTE_UNUSED; { } int -maybe_objc_comptypes (lhs, rhs, reflexive) +objc_comptypes (lhs, rhs, reflexive) tree lhs ATTRIBUTE_UNUSED; tree rhs ATTRIBUTE_UNUSED; int reflexive ATTRIBUTE_UNUSED; @@ -118,13 +197,7 @@ maybe_objc_comptypes (lhs, rhs, reflexive) } tree -maybe_building_objc_message_expr () -{ - return 0; -} - -int -recognize_objc_keyword () +objc_message_selector () { return 0; } @@ -143,3 +216,5 @@ finish_file () { c_objc_common_finish_file (); } + +#include "gtype-c.h" diff --git a/contrib/gcc/c-lex.c b/contrib/gcc/c-lex.c index 48b087e..a60fbb0 100644 --- a/contrib/gcc/c-lex.c +++ b/contrib/gcc/c-lex.c @@ -1,6 +1,6 @@ -/* Lexical analyzer for C and Objective C. +/* Mainly the interface between cpplib and the C front ends. Copyright (C) 1987, 1988, 1989, 1992, 1994, 1995, 1996, 1997 - 1998, 1999, 2000 Free Software Foundation, Inc. + 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of GCC. @@ -22,13 +22,14 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #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-lex.h" #include "c-tree.h" +#include "c-common.h" #include "flags.h" #include "timevar.h" #include "cpplib.h" @@ -39,20 +40,10 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #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; @@ -64,9 +55,6 @@ static unsigned int src_lineno; 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; @@ -76,15 +64,18 @@ extern FILE *asm_out_file; /* 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 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 *)); @@ -144,9 +135,6 @@ init_c_lex (filename) /* Start it at 0. */ lineno = 0; - if (filename == NULL || !strcmp (filename, "-")) - filename = ""; - return cpp_read_main_file (parse_in, filename, ident_hash); } @@ -155,13 +143,21 @@ init_c_lex (filename) Also, make sure the start_source_file debug hook gets called for the primary source file. */ -int -yyparse() +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); - return yyparse_1(); + yyparse (); + free_parser_stacks (); } struct c_fileinfo * @@ -227,9 +223,6 @@ dump_time_statistics () 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; @@ -276,7 +269,6 @@ cb_file_change (pfile, new_map) 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) @@ -299,16 +291,6 @@ cb_file_change (pfile, new_map) --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); @@ -682,88 +664,7 @@ utf8_extend_token (c) 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; @@ -785,9 +686,6 @@ c_lex (value) *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)) @@ -801,7 +699,28 @@ c_lex (value) break; case CPP_NUMBER: - *value = lex_number ((const char *)tok->val.str.text, tok->val.str.len); + { + 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: @@ -827,476 +746,203 @@ c_lex (value) 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; +/* 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; { - 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); - } + enum integer_type_kind itk; - 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--; - } + 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; - /* 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'; + /* 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; - /* 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; + for (; itk < itk_none; itk += 2 /* skip unsigned types */) + if (int_fits_type_p (value, integer_types[itk])) + return itk; - 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"); + return itk_none; +} - lflag = 1; - break; +/* 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; - 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; + 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; - default: - ERROR ("invalid suffix on floating constant"); - } + /* 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; - /* Setup input for parse_float() */ - args.str = copy; - args.fflag = fflag; - args.lflag = lflag; - args.base = base; + for (; itk < itk_none; itk += 2 /* skip signed types */) + if (int_fits_type_p (value, integer_types[itk])) + return itk; - /* 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 + return itk_none; +} - /* 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); - } +/* 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 { - 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) + /* 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 { - c = *p++; - switch (c) + /* 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) { - 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 (!flag_isoc99) { - 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; + if (itk_u < itk_unsigned_long) + itk_u = itk_unsigned_long; + itk = itk_u; + warning ("this decimal constant is unsigned only in ISO C90"); } - 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"); + else if (warn_traditional) + warning ("this decimal constant would be unsigned in ISO C90"); } } + } - /* 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; + 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]; - /* 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 (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"); - 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"))); - } + TREE_TYPE (value) = type; - if (base == 10 && ! spec_unsigned && TREE_UNSIGNED (type)) - warning ("decimal constant is so large that it is unsigned"); + /* Convert imaginary to a complex type. */ + if (flags & CPP_N_IMAGINARY) + value = build_complex (NULL_TREE, convert (type, integer_zero_node), value); - 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; + return value; +} - /* If it's still an integer (not a complex), and it doesn't - fit in the type we choose for it, then pedwarn. */ +/* 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; - 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"); + /* 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"; } - if (p < str + len) - error ("missing white space after number '%.*s'", (int) (p - str), str); + /* 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; - - syntax_error: - return integer_zero_node; } static tree @@ -1309,9 +955,7 @@ lex_string (str, len, wide) 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); + cppchar_t c; #ifdef MULTIBYTE_CHARS /* Reset multibyte conversion state. */ @@ -1341,19 +985,10 @@ lex_string (str, len, wide) #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); - } + c = cpp_parse_escape (parse_in, &p, limit, wide); - /* Add this single character into the buffer either as a wchar_t - or as a single byte. */ + /* 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); @@ -1374,6 +1009,16 @@ lex_string (str, len, wide) } 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; @@ -1407,45 +1052,30 @@ static tree lex_charconst (token) const cpp_token *token; { - HOST_WIDE_INT result; + cppchar_t 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; - } + int unsignedp; - /* 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. + result = cpp_interpret_charconst (parse_in, token, + &chars_seen, &unsignedp); - FIXME: cpplib's assessment of overflow may not be accurate on a - platform where the final type can change at (compiler's) runtime. */ + /* 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); - TREE_TYPE (value) = widest_integer_literal_type_node; - value = convert (type, value); - TREE_OVERFLOW (value) = 0; + 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 --git a/contrib/gcc/c-objc-common.c b/contrib/gcc/c-objc-common.c index d2bc5c1..9f3847c 100644 --- a/contrib/gcc/c-objc-common.c +++ b/contrib/gcc/c-objc-common.c @@ -33,14 +33,16 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include "tree-inline.h" #include "varray.h" #include "ggc.h" +#include "langhooks.h" +#include "target.h" -static int c_tree_printer PARAMS ((output_buffer *)); +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 varray_type deferred_fns; +static GTY(()) varray_type deferred_fns; int c_missing_noreturn_ok_p (decl) @@ -90,7 +92,7 @@ inline_forbidden_p (nodep, walk_subtrees, fn) { /* We cannot inline functions that take a variable number of arguments. */ - case BUILT_IN_VARARGS_START: + case BUILT_IN_VA_START: case BUILT_IN_STDARG_START: #if 0 /* Functions that need information about the address of the @@ -119,7 +121,7 @@ inline_forbidden_p (nodep, walk_subtrees, fn) /* 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. */ + instantiations, which causes unexpected behavior. */ if (TREE_CODE (t) != LABEL_DECL) return node; @@ -167,17 +169,11 @@ c_cannot_inline_tree_fn (fnp) /* 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 (!DECL_DECLARED_INLINE_P (fn) && !(*targetm.binds_local_p) (fn)) + goto cannot_inline; if (! function_attribute_inlinable_p (fn)) - { - DECL_UNINLINABLE (fn) = 1; - return 1; - } + goto cannot_inline; /* If a function has pending sizes, we must not defer its compilation, and we can't inline it as a tree. */ @@ -187,10 +183,7 @@ c_cannot_inline_tree_fn (fnp) put_pending_sizes (t); if (t) - { - DECL_UNINLINABLE (fn) = 1; - return 1; - } + goto cannot_inline; } if (DECL_CONTEXT (fn)) @@ -198,10 +191,7 @@ c_cannot_inline_tree_fn (fnp) /* 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; - } + goto cannot_inline; } else { @@ -223,13 +213,29 @@ c_cannot_inline_tree_fn (fnp) return 0; } - if (walk_tree (&DECL_SAVED_TREE (fn), inline_forbidden_p, fn, NULL)) - { - DECL_UNINLINABLE (fn) = 1; - return 1; - } + 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. */ @@ -240,13 +246,9 @@ c_objc_common_init (filename) c_init_decl_processing (); filename = c_common_init (filename); + if (filename == NULL) + return NULL; - 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 @@ -266,7 +268,6 @@ c_objc_common_init (filename) } VARRAY_TREE_INIT (deferred_fns, 32, "deferred_fns"); - ggc_add_tree_varray_root (&deferred_fns, 1); return filename; } @@ -304,7 +305,7 @@ expand_deferred_fns () } } - VARRAY_FREE (deferred_fns); + deferred_fns = 0; } static tree @@ -403,26 +404,29 @@ c_objc_common_finish_file () by the C++ front-end. Please notice when called, the `%' part was already skipped by the diagnostic machinery. */ -static int -c_tree_printer (buffer) +static bool +c_tree_printer (buffer, text) output_buffer *buffer; + text_info *text; { - tree t = va_arg (output_buffer_format_args (buffer), tree); + tree t = va_arg (*text->args_ptr, tree); - switch (*output_buffer_text_cursor (buffer)) + switch (*text->format_spec) { case 'D': case 'F': case 'T': { const char *n = DECL_NAME (t) - ? (*decl_printable_name) (t, 2) + ? (*lang_hooks.decl_printable_name) (t, 2) : "({anonymous})"; output_add_string (buffer, n); } - return 1; + return true; default: - return 0; + return false; } } + +#include "gt-c-objc-common.h" diff --git a/contrib/gcc/c-opts.c b/contrib/gcc/c-opts.c new file mode 100644 index 0000000..77a468a --- /dev/null +++ b/contrib/gcc/c-opts.c @@ -0,0 +1,1799 @@ +/* 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, int)); +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, on); + 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, on) + size_t opt_index; + int on; +{ + 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 ("\"-%c%s%s\" is valid for %s but not for %s", + cl_options[opt_index].opt_text[0], on ? "" : "no-", + cl_options[opt_index].opt_text + 1, 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 --git a/contrib/gcc/c-parse.in b/contrib/gcc/c-parse.in index 0b4bde3..59e399b 100644 --- a/contrib/gcc/c-parse.in +++ b/contrib/gcc/c-parse.in @@ -1,6 +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. + 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of GCC. @@ -40,14 +40,13 @@ end ifc #include "cpplib.h" #include "intl.h" #include "timevar.h" -#include "c-lex.h" +#include "c-pragma.h" /* For YYDEBUG definition, and parse_in. */ #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 @@ -59,11 +58,48 @@ end ifobjc /* 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 +/* 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 @@ -82,7 +118,8 @@ end ifobjc /* Reserved words that specify storage class. yylval contains an IDENTIFIER_NODE which indicates which one. */ -%token SCSPEC +%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. */ @@ -148,7 +185,7 @@ end ifobjc %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 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 @@ -164,7 +201,7 @@ end ifobjc %type typespec_reserved_nonattr typespec_reserved_attr %type typespec_nonreserved_nonattr -%type SCSPEC TYPESPEC TYPE_QUAL maybe_type_qual +%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 @@ -215,28 +252,28 @@ ifobjc end ifobjc %{ -/* Number of statements (loosely speaking) and compound statements +/* 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; +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 tree all_prefix_attributes = NULL_TREE; +static GTY(()) tree all_prefix_attributes; /* Stack of saved values of current_declspecs, prefix_attributes and all_prefix_attributes. */ -static tree declspec_stack; +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. */ @@ -258,17 +295,19 @@ static tree declspec_stack; /* For __extension__, save/restore the warning flags which are controlled by __extension__. */ -#define SAVE_WARN_FLAGS() \ +#define SAVE_EXT_FLAGS() \ size_int (pedantic \ | (warn_pointer_arith << 1) \ - | (warn_traditional << 2)) + | (warn_traditional << 2) \ + | (flag_iso << 3)) -#define RESTORE_WARN_FLAGS(tval) \ +#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 @@ -278,8 +317,8 @@ static enum tree_code objc_inherit_code; 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 + 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 @@ -289,6 +328,8 @@ ifc #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) @@ -296,20 +337,16 @@ end ifc 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)); -/* Add GC roots for variables local to this file. */ + /* Initialisation routine for 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); } %} @@ -326,9 +363,10 @@ program: /* empty */ get us back to the global binding level. */ while (! global_bindings_p ()) poplevel (0, 0, 0); -ifc + /* __FUNCTION__ is defined at file scope (""). This + call may not be necessary as my tests indicate it + still works without it. */ finish_fname_decls (); -end ifc finish_file (); } ; @@ -343,6 +381,11 @@ extdefs: ; extdef: + extdef_1 + { parsing_iso_function_signature = false; } /* Reset after any external definition. */ + ; + +extdef_1: fndef | datadef ifobjc @@ -357,15 +400,15 @@ end ifobjc else error ("argument of `asm' is not a constant string"); } | extension extdef - { RESTORE_WARN_FLAGS ($1); } + { RESTORE_EXT_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"); + else + warning ("data definition has no type or storage class"); POP_DECLSPEC_STACK; } | declspecs_nots setspecs notype_initdecls ';' @@ -392,7 +435,7 @@ fndef: 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); + finish_function (0, 1); POP_DECLSPEC_STACK; } | declspecs_ts setspecs declarator error { POP_DECLSPEC_STACK; } @@ -406,7 +449,7 @@ fndef: 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); + finish_function (0, 1); POP_DECLSPEC_STACK; } | declspecs_nots setspecs notype_declarator error { POP_DECLSPEC_STACK; } @@ -420,7 +463,7 @@ fndef: 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); + finish_function (0, 1); POP_DECLSPEC_STACK; } | setspecs notype_declarator error { POP_DECLSPEC_STACK; } @@ -480,28 +523,13 @@ unary_expr: /* __extension__ turns off -pedantic for following primary. */ | extension cast_expr %prec UNARY { $$ = $2; - RESTORE_WARN_FLAGS ($1); } + 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); } -/* 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 @@ -568,19 +596,22 @@ expr_no_commas: | expr_no_commas '^' expr_no_commas { $$ = parser_build_binary_op ($2, $1, $3); } | expr_no_commas ANDAND - { $1 = truthvalue_conversion (default_conversion ($1)); + { $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 = truthvalue_conversion (default_conversion ($1)); + { $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 = truthvalue_conversion (default_conversion ($1)); + { $1 = c_common_truthvalue_conversion + (default_conversion ($1)); skip_evaluation += $1 == boolean_false_node; } expr ':' { skip_evaluation += (($1 == boolean_true_node) @@ -593,7 +624,8 @@ expr_no_commas: 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)); + $1 = c_common_truthvalue_conversion + (default_conversion ($2)); skip_evaluation += $1 == boolean_true_node; } ':' expr_no_commas { skip_evaluation -= $1 == boolean_true_node; @@ -608,7 +640,8 @@ expr_no_commas: | expr_no_commas ASSIGN expr_no_commas { char class; $$ = build_modify_expr ($1, $2, $3); - /* This inhibits warnings in truthvalue_conversion. */ + /* 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); @@ -623,11 +656,11 @@ primary: $$ = build_external_ref ($1, yychar == '('); } | CONSTANT - | string - { $$ = combine_strings ($1); } + | STRING + { $$ = fix_string_type ($$); } | VAR_FUNC_NAME { $$ = fname_decl (C_RID_CODE ($$), $$); } - | '(' typename ')' '{' + | '(' typename ')' '{' { start_init (NULL_TREE, NULL, 0); $2 = groktypename ($2); really_start_incremental_init ($2); } @@ -735,29 +768,6 @@ ifobjc 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. */ @@ -770,13 +780,21 @@ objc_string: 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 - | 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 @@ -850,12 +868,12 @@ decl: | declspecs ';' { shadow_tag ($1); } | extension decl - { RESTORE_WARN_FLAGS ($1); } + { RESTORE_EXT_FLAGS ($1); } ; /* A list of declaration specifiers. These are: - - Storage class specifiers (SCSPEC), which for GCC currently include + - Storage class specifiers (scspec), which for GCC currently includes function specifiers ("inline"). - Type specifiers (typespec_*). @@ -1026,7 +1044,7 @@ declspecs_nosc_ts_sa_ea: ; declspecs_sc_nots_nosa_noea: - SCSPEC + scspec { $$ = tree_cons (NULL_TREE, $1, NULL_TREE); TREE_STATIC ($$) = 0; } | declspecs_sc_nots_nosa_noea TYPE_QUAL @@ -1035,25 +1053,25 @@ declspecs_sc_nots_nosa_noea: | declspecs_sc_nots_nosa_ea TYPE_QUAL { $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = 1; } - | declspecs_nosc_nots_nosa_noea SCSPEC + | 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 + | 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 + | 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 + | declspecs_sc_nots_nosa_ea scspec { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); @@ -1074,25 +1092,25 @@ declspecs_sc_nots_sa_noea: | declspecs_sc_nots_sa_ea TYPE_QUAL { $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = 1; } - | declspecs_nosc_nots_sa_noea SCSPEC + | 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 + | 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 + | 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 + | declspecs_sc_nots_sa_ea scspec { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); @@ -1125,25 +1143,25 @@ declspecs_sc_ts_nosa_noea: | declspecs_sc_nots_nosa_ea typespec_nonattr { $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = 1; } - | declspecs_nosc_ts_nosa_noea SCSPEC + | 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 + | 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 + | 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 + | declspecs_sc_ts_nosa_ea scspec { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); @@ -1188,25 +1206,25 @@ declspecs_sc_ts_sa_noea: | declspecs_sc_nots_sa_ea typespec_nonattr { $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = 1; } - | declspecs_nosc_ts_sa_noea SCSPEC + | 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 + | 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 + | 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 + | declspecs_sc_ts_sa_ea scspec { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); @@ -1398,10 +1416,8 @@ notype_initdecls: maybeasm: /* empty */ { $$ = NULL_TREE; } - | ASM_KEYWORD '(' string ')' - { if (TREE_CHAIN ($3)) $3 = combine_strings ($3); - $$ = $3; - } + | ASM_KEYWORD '(' STRING ')' + { $$ = $3; } ; initdcl: @@ -1416,7 +1432,7 @@ initdcl: | declarator maybeasm maybe_attribute { tree d = start_decl ($1, current_declspecs, 0, chainon ($3, all_prefix_attributes)); - finish_decl (d, NULL_TREE, $2); + finish_decl (d, NULL_TREE, $2); } ; @@ -1442,7 +1458,7 @@ maybe_attribute: | attributes { $$ = $1; } ; - + attributes: attribute { $$ = $1; } @@ -1461,7 +1477,7 @@ attribute_list: | attribute_list ',' attrib { $$ = chainon ($1, $3); } ; - + attrib: /* empty */ { $$ = NULL_TREE; } @@ -1480,10 +1496,15 @@ attrib: any_word: identifier - | SCSPEC + | scspec | TYPESPEC | TYPE_QUAL ; + +scspec: + STATIC + | SCSPEC + ; /* Initializers. `init' is the entry point. */ @@ -1546,17 +1567,12 @@ designator_list: 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: @@ -1571,6 +1587,7 @@ nested_function: pop_function_context (); YYERROR1; } + parsing_iso_function_signature = false; /* Don't warn about nested functions. */ } old_style_parm_decls { store_parm_decls (); } @@ -1585,7 +1602,7 @@ nested_function: DECL_SOURCE_FILE (decl) = $5; DECL_SOURCE_LINE (decl) = $6; finish_function (1, 1); - pop_function_context (); + pop_function_context (); add_decl_stmt (decl); } ; @@ -1601,6 +1618,7 @@ notype_nested_function: pop_function_context (); YYERROR1; } + parsing_iso_function_signature = false; /* Don't warn about nested functions. */ } old_style_parm_decls { store_parm_decls (); } @@ -1615,7 +1633,7 @@ notype_nested_function: DECL_SOURCE_FILE (decl) = $5; DECL_SOURCE_LINE (decl) = $6; finish_function (1, 1); - pop_function_context (); + pop_function_context (); add_decl_stmt (decl); } ; @@ -1736,7 +1754,7 @@ structsp_attr: { $$ = start_struct (RECORD_TYPE, $2); /* Start scope of tag before parsing components. */ } - component_decl_list '}' maybe_attribute + 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), @@ -1826,8 +1844,8 @@ component_decl: 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 + /* 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"); @@ -1846,7 +1864,7 @@ component_decl: { $$ = NULL_TREE; } | extension component_decl { $$ = $2; - RESTORE_WARN_FLAGS ($1); } + RESTORE_EXT_FLAGS ($1); } ; components: @@ -1974,30 +1992,17 @@ direct_absdcl1: /* The [...] part of a declarator for an array type. */ array_declarator: - '[' expr ']' - { $$ = build_array_declarator ($2, NULL_TREE, 0, 0); } - | '[' declspecs_nosc expr ']' + '[' maybe_type_quals_attrs expr ']' { $$ = build_array_declarator ($3, $2, 0, 0); } - | '[' ']' - { $$ = build_array_declarator (NULL_TREE, NULL_TREE, 0, 0); } - | '[' declspecs_nosc ']' + | '[' maybe_type_quals_attrs ']' { $$ = build_array_declarator (NULL_TREE, $2, 0, 0); } - | '[' '*' ']' - { $$ = build_array_declarator (NULL_TREE, NULL_TREE, 0, 1); } - | '[' declspecs_nosc '*' ']' + | '[' maybe_type_quals_attrs '*' ']' { $$ = 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); } + | '[' 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 @@ -2096,8 +2101,8 @@ c99_block_end: /* empty */ { 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)) + $$ = poplevel (kept_level_p (), 0, 0); + SCOPE_STMT_BLOCK (TREE_PURPOSE (scope_stmt)) = SCOPE_STMT_BLOCK (TREE_VALUE (scope_stmt)) = $$; } @@ -2146,8 +2151,8 @@ compstmt_start: '{' { compstmt_count++; 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)) + { $$ = poplevel (kept_level_p (), 1, 0); + SCOPE_STMT_BLOCK (TREE_PURPOSE ($5)) = SCOPE_STMT_BLOCK (TREE_VALUE ($5)) = $$; } ; @@ -2176,7 +2181,7 @@ compstmt_primary_start: ; compstmt: compstmt_start compstmt_nostart - { RECHAIN_STMTS ($1, COMPOUND_BODY ($1)); + { RECHAIN_STMTS ($1, COMPOUND_BODY ($1)); last_expr_type = NULL_TREE; $$ = $1; } ; @@ -2203,7 +2208,7 @@ if_prefix: IF { $$ = c_begin_if_stmt (); } '(' expr ')' - { c_expand_start_cond (truthvalue_conversion ($4), + { c_expand_start_cond (c_common_truthvalue_conversion ($4), compstmt_count,$2); $$ = stmt_count; if_stmt_file = $-2; @@ -2217,7 +2222,7 @@ do_stmt_start: DO { stmt_count++; compstmt_count++; - $$ + $$ = add_stmt (build_stmt (DO_STMT, NULL_TREE, NULL_TREE)); /* In the event that a parse error prevents @@ -2312,30 +2317,31 @@ select_or_iter_stmt: we later pass to c_finish_while_stmt_cond to fill in the condition and other tidbits. */ | WHILE - { stmt_count++; + { stmt_count++; $$ = c_begin_while_stmt (); } '(' expr ')' - { $4 = truthvalue_conversion ($4); - c_finish_while_stmt_cond (truthvalue_conversion ($4), - $2); + { $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) = truthvalue_conversion ($3); } + { 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 ($$); } + add_stmt ($$); } '(' for_init_stmt { stmt_count++; RECHAIN_STMTS ($2, FOR_INIT_STMT ($2)); } xexpr ';' - { if ($6) - FOR_COND ($2) = truthvalue_conversion ($6); } + { if ($6) + FOR_COND ($2) + = c_common_truthvalue_conversion ($6); } xexpr ')' { FOR_EXPR ($2) = $9; } c99_block_lineno_labeled_stmt @@ -2349,7 +2355,7 @@ select_or_iter_stmt: for_init_stmt: xexpr ';' - { add_stmt (build_stmt (EXPR_STMT, $1)); } + { add_stmt (build_stmt (EXPR_STMT, $1)); } | decl { check_for_loop_decls (); } ; @@ -2475,14 +2481,16 @@ asm_operand: STRING '(' expr ')' { $$ = build_tree_list (build_tree_list (NULL_TREE, $1), $3); } | '[' identifier ']' STRING '(' expr ')' - { $$ = build_tree_list (build_tree_list ($2, $4), $6); } + { $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, combine_strings ($1), NULL_TREE); } - | asm_clobbers ',' string - { $$ = tree_cons (NULL_TREE, combine_strings ($3), $1); } + 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. @@ -2535,7 +2543,9 @@ parmlist_2: /* empty */ error ("ISO C requires a named argument before `...'"); } | parms - { $$ = get_parm_info (1); } + { $$ = get_parm_info (1); + parsing_iso_function_signature = true; + } | parms ',' ELLIPSIS { $$ = get_parm_info (0); } ; @@ -2558,7 +2568,7 @@ parm: | declspecs_ts setspecs notype_declarator maybe_attribute { $$ = build_tree_list (build_tree_list (current_declspecs, $3), - chainon ($4, all_prefix_attributes)); + chainon ($4, all_prefix_attributes)); POP_DECLSPEC_STACK; } | declspecs_ts setspecs absdcl_maybe_attribute { $$ = $3; @@ -2585,7 +2595,7 @@ firstparm: | declspecs_ts_nosa setspecs_fp notype_declarator maybe_attribute { $$ = build_tree_list (build_tree_list (current_declspecs, $3), - chainon ($4, all_prefix_attributes)); + chainon ($4, all_prefix_attributes)); POP_DECLSPEC_STACK; } | declspecs_ts_nosa setspecs_fp absdcl_maybe_attribute { $$ = $3; @@ -2657,10 +2667,11 @@ identifiers_or_typenames: extension: EXTENSION - { $$ = SAVE_WARN_FLAGS(); + { $$ = SAVE_EXT_FLAGS(); pedantic = 0; warn_pointer_arith = 0; - warn_traditional = 0; } + warn_traditional = 0; + flag_iso = 0; } ; ifobjc @@ -3212,14 +3223,8 @@ receiver: ; objcmessageexpr: - '[' - { objc_receiver_context = 1; } - receiver - { objc_receiver_context = 0; } - messageargs ']' - { - $$ = build_tree_list ($3, $5); - } + '[' receiver messageargs ']' + { $$ = build_tree_list ($2, $3); } ; selectorarg: @@ -3287,11 +3292,10 @@ struct resword /* 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 */ +#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[] = { @@ -3333,6 +3337,7 @@ static const struct resword reswords[] = { "__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 }, @@ -3344,7 +3349,7 @@ static const struct resword reswords[] = { "break", RID_BREAK, 0 }, { "case", RID_CASE, 0 }, { "char", RID_CHAR, 0 }, - { "const", RID_CONST, D_TRAD }, + { "const", RID_CONST, 0 }, { "continue", RID_CONTINUE, 0 }, { "default", RID_DEFAULT, 0 }, { "do", RID_DO, 0 }, @@ -3356,24 +3361,24 @@ static const struct resword reswords[] = { "for", RID_FOR, 0 }, { "goto", RID_GOTO, 0 }, { "if", RID_IF, 0 }, - { "inline", RID_INLINE, D_TRAD|D_EXT89 }, + { "inline", RID_INLINE, D_EXT89 }, { "int", RID_INT, 0 }, { "long", RID_LONG, 0 }, { "register", RID_REGISTER, 0 }, - { "restrict", RID_RESTRICT, D_TRAD|D_C89 }, + { "restrict", RID_RESTRICT, D_C89 }, { "return", RID_RETURN, 0 }, { "short", RID_SHORT, 0 }, - { "signed", RID_SIGNED, D_TRAD }, + { "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_TRAD|D_EXT }, + { "typeof", RID_TYPEOF, D_EXT }, { "union", RID_UNION, 0 }, { "unsigned", RID_UNSIGNED, 0 }, { "void", RID_VOID, 0 }, - { "volatile", RID_VOLATILE, D_TRAD }, + { "volatile", RID_VOLATILE, 0 }, { "while", RID_WHILE, 0 }, ifobjc { "id", RID_ID, D_OBJC }, @@ -3410,7 +3415,7 @@ end ifobjc three languages. */ static const short rid_to_yy[RID_MAX] = { - /* RID_STATIC */ SCSPEC, + /* RID_STATIC */ STATIC, /* RID_UNSIGNED */ TYPESPEC, /* RID_LONG */ TYPESPEC, /* RID_CONST */ TYPE_QUAL, @@ -3428,6 +3433,7 @@ static const short rid_to_yy[RID_MAX] = /* RID_BOUNDED */ TYPE_QUAL, /* RID_UNBOUNDED */ TYPE_QUAL, /* RID_COMPLEX */ TYPESPEC, + /* RID_THREAD */ SCSPEC, /* C++ */ /* RID_FRIEND */ 0, @@ -3443,7 +3449,7 @@ static const short rid_to_yy[RID_MAX] = /* RID_BYCOPY */ TYPE_QUAL, /* RID_BYREF */ TYPE_QUAL, /* RID_ONEWAY */ TYPE_QUAL, - + /* C */ /* RID_INT */ TYPESPEC, /* RID_CHAR */ TYPESPEC, @@ -3517,19 +3523,6 @@ static const short rid_to_yy[RID_MAX] = /* 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, @@ -3552,10 +3545,9 @@ init_reswords () 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) + if (!flag_objc) mask |= D_OBJC; /* It is not necessary to register ridpointers as a GC root, because @@ -3610,12 +3602,12 @@ static int 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); @@ -3640,13 +3632,13 @@ end ifobjc /* __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; @@ -3665,8 +3657,8 @@ ifobjc 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 () + if (objc_interface_decl + && (global_bindings_p () || (!objc_force_identifier && !decl))) { yylval.ttype = objc_interface_decl; @@ -3678,6 +3670,57 @@ end ifobjc 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 () @@ -3744,7 +3787,13 @@ _yylex () return 0; case CPP_NAME: - return yylexname (); + { + int ret = yylexname (); + if (ret == STRING) + return yylexstring (); + else + return ret; + } case CPP_NUMBER: case CPP_CHAR: @@ -3753,8 +3802,8 @@ _yylex () case CPP_STRING: case CPP_WSTRING: - return STRING; - + return yylexstring (); + /* This token is Objective-C specific. It gives the next token special significance. */ case CPP_ATSIGN: @@ -3809,21 +3858,6 @@ yylex() 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 @@ -3835,7 +3869,7 @@ yyprint (file, yychar, yyl) tree t = yyl.ttype; fprintf (file, " [%s]", NAME(last_token)); - + switch (yychar) { case IDENTIFIER: @@ -3844,6 +3878,7 @@ yyprint (file, yychar, yyl) case TYPESPEC: case TYPE_QUAL: case SCSPEC: + case STATIC: if (IDENTIFIER_POINTER (t)) fprintf (file, " `%s'", IDENTIFIER_POINTER (t)); break; @@ -3877,23 +3912,16 @@ yyprint (file, yychar, yyl) /* 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. +/* Free malloced parser stacks if necessary. */ - 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; +void +free_parser_stacks () { - 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); + if (malloced_yyss) + { + free (malloced_yyss); + free (malloced_yyvs); + } } + +#include "gt-c-parse.h" diff --git a/contrib/gcc/c-pragma.c b/contrib/gcc/c-pragma.c index a0a99fd..73c7d5f 100644 --- a/contrib/gcc/c-pragma.c +++ b/contrib/gcc/c-pragma.c @@ -29,7 +29,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include "flags.h" #include "toplev.h" #include "ggc.h" -#include "c-lex.h" #include "c-common.h" #include "output.h" #include "tm_p.h" @@ -37,11 +36,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #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 +typedef struct align_stack GTY(()) { int alignment; unsigned int num_pushes; @@ -49,8 +44,12 @@ typedef struct align_stack struct align_stack * prev; } align_stack; -static struct align_stack * alignment_stack = NULL; +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() @@ -62,7 +61,6 @@ static int default_alignment; 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 @@ -76,7 +74,7 @@ push_alignment (alignment, id) { align_stack * entry; - entry = (align_stack *) xmalloc (sizeof (* entry)); + entry = (align_stack *) ggc_alloc (sizeof (* entry)); entry->alignment = alignment; entry->num_pushes = 1; @@ -138,24 +136,9 @@ pop_alignment (id) 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) \ @@ -273,12 +256,12 @@ handle_pragma_pack (dummy) } #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 tree pending_weaks; - static void apply_pragma_weak (decl, value) tree decl, value; @@ -364,11 +347,11 @@ maybe_apply_pragma_weak (decl) } #endif /* HANDLE_PRAGMA_WEAK */ +static GTY(()) tree pending_redefine_extname; + #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) @@ -400,16 +383,23 @@ handle_pragma_redefine_extname (dummy) SET_DECL_ASSEMBLER_NAME (decl, newname); } else - pending_redefine_extname - = tree_cons (oldname, newname, pending_redefine_extname); + 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 *)); -static tree pragma_extern_prefix; - /* #pragma extern_prefix "prefix" */ static void handle_pragma_extern_prefix (dummy) @@ -457,11 +447,10 @@ maybe_apply_renaming_pragma (decl, asmname) { const char *oldasmname = IDENTIFIER_POINTER (oldname) + 1; if (asmname && strcmp (TREE_STRING_POINTER (asmname), oldasmname) != 0) - warning ("asm declaration conficts with previous rename"); + warning ("asm declaration conflicts with previous rename"); asmname = build_string (strlen (oldasmname), oldasmname); } -#ifdef HANDLE_PRAGMA_REDEFINE_EXTNAME { tree *p, t; @@ -477,7 +466,6 @@ maybe_apply_renaming_pragma (decl, asmname) return build_string (strlen (newname), newname); } } -#endif #ifdef HANDLE_PRAGMA_EXTERN_PREFIX if (pragma_extern_prefix && !asmname) @@ -501,25 +489,19 @@ init_pragma () #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 } + +#include "gt-c-pragma.h" diff --git a/contrib/gcc/c-pragma.h b/contrib/gcc/c-pragma.h index 22e4f7a..7911c5a 100644 --- a/contrib/gcc/c-pragma.h +++ b/contrib/gcc/c-pragma.h @@ -22,6 +22,13 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #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)) @@ -55,5 +62,8 @@ extern void cpp_register_pragma PARAMS ((cpp_reader *, 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 --git a/contrib/gcc/c-pretty-print.c b/contrib/gcc/c-pretty-print.c new file mode 100644 index 0000000..377018e --- /dev/null +++ b/contrib/gcc/c-pretty-print.c @@ -0,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 --git a/contrib/gcc/c-pretty-print.h b/contrib/gcc/c-pretty-print.h new file mode 100644 index 0000000..0ab702e --- /dev/null +++ b/contrib/gcc/c-pretty-print.h @@ -0,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 --git a/contrib/gcc/c-semantics.c b/contrib/gcc/c-semantics.c index eaa4452..8559fa1 100644 --- a/contrib/gcc/c-semantics.c +++ b/contrib/gcc/c-semantics.c @@ -36,6 +36,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #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. */ @@ -334,7 +335,7 @@ genrtl_expr_stmt (expr) 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 + MAYBE_LAST is nonzero if this EXPR_STMT might be the last statement in expression statement. */ void @@ -446,8 +447,9 @@ genrtl_do_stmt (t) /* 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)) + 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)); @@ -486,7 +488,7 @@ genrtl_return_stmt (stmt) { tree expr; - expr = RETURN_EXPR (stmt); + expr = RETURN_STMT_EXPR (stmt); emit_line_note (input_filename, lineno); if (!expr) @@ -673,8 +675,7 @@ genrtl_case_label (case_label) if (cleanup) { static int explained = 0; - warning_with_decl (TREE_PURPOSE (cleanup), - "destructor needed for `%#D'"); + warning ("destructor needed for `%#D'", (TREE_PURPOSE (cleanup))); warning ("where case label appears here"); if (!explained) { @@ -835,6 +836,15 @@ expand_stmt (t) 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 --git a/contrib/gcc/c-tree.h b/contrib/gcc/c-tree.h index 54208db..159c235 100644 --- a/contrib/gcc/c-tree.h +++ b/contrib/gcc/c-tree.h @@ -34,16 +34,32 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA lang_identifier nodes, because some keywords are only special in a particular context. */ -struct lang_identifier +struct lang_identifier GTY(()) { - struct c_common_identifier ignore; - tree global_value, local_value, label_value, implicit_decl; - tree error_locus, limbo_value; + 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 +struct lang_decl GTY(()) { struct c_lang_decl base; /* The return types and parameter types may have variable size. @@ -107,10 +123,10 @@ struct lang_decl (DECL_LANG_SPECIFIC (NODE)->base.declared_inline) /* In a RECORD_TYPE, a sorted array of the fields of the type. */ -struct lang_type +struct lang_type GTY(()) { int len; - tree elts[1]; + tree GTY((length ("%h.len"))) elts[1]; }; /* Record whether a type or decl was written with nonconstant size. @@ -150,29 +166,36 @@ struct lang_type /* 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 tree objc_is_id PARAMS ((tree)); +extern void 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 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)); -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 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 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)); @@ -191,14 +214,12 @@ extern tree implicitly_declare PARAMS ((tree)); 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 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)); @@ -218,7 +239,7 @@ extern tree xref_tag PARAMS ((enum tree_code, tree)); 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)); @@ -227,23 +248,28 @@ extern const char *c_objc_common_init PARAMS ((const char *)); 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_sizeof_nowarn PARAMS ((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)); @@ -287,94 +313,14 @@ extern int current_function_returns_null; 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 void c_finish_incomplete_decl PARAMS ((tree)); -extern tree static_ctors; -extern tree static_dtors; +extern GTY(()) tree static_ctors; +extern GTY(()) tree static_dtors; #endif /* ! GCC_C_TREE_H */ diff --git a/contrib/gcc/c-typeck.c b/contrib/gcc/c-typeck.c index 17e3144..21cc510 100644 --- a/contrib/gcc/c-typeck.c +++ b/contrib/gcc/c-typeck.c @@ -51,7 +51,7 @@ static int missing_braces_mentioned; static int undeclared_variable_notice; static tree qualify_type PARAMS ((tree, tree)); -static int comp_target_types 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)); @@ -73,7 +73,7 @@ static void push_array_bounds PARAMS ((int)); 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 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)); @@ -99,7 +99,7 @@ require_complete_type (value) if (COMPLETE_TYPE_P (type)) return value; - incomplete_type_error (value, type); + c_incomplete_type_error (value, type); return error_mark_node; } @@ -108,7 +108,7 @@ require_complete_type (value) and TYPE is the type that was invalid. */ void -incomplete_type_error (value, type) +c_incomplete_type_error (value, type) tree value; tree type; { @@ -173,6 +173,28 @@ incomplete_type_error (value, type) } } +/* 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. */ @@ -216,9 +238,9 @@ common_type (t1, t2) /* 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); + t1 = c_common_type_for_size (TYPE_PRECISION (t1), 1); if (TREE_CODE (t2) == ENUMERAL_TYPE) - t2 = type_for_size (TYPE_PRECISION (t2), 1); + t2 = c_common_type_for_size (TYPE_PRECISION (t2), 1); code1 = TREE_CODE (t1); code2 = TREE_CODE (t2); @@ -465,9 +487,9 @@ comptypes (type1, type2) signedness. */ if (TREE_CODE (t1) == ENUMERAL_TYPE) - t1 = type_for_size (TYPE_PRECISION (t1), TREE_UNSIGNED (t1)); + t1 = c_common_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)); + t2 = c_common_type_for_size (TYPE_PRECISION (t2), TREE_UNSIGNED (t2)); if (t1 == t2) return 1; @@ -546,7 +568,7 @@ comptypes (type1, type2) } case RECORD_TYPE: - if (maybe_objc_comptypes (t1, t2, 0) == 1) + if (flag_objc && objc_comptypes (t1, t2, 0) == 1) val = 1; break; @@ -557,16 +579,21 @@ comptypes (type1, type2) } /* Return 1 if TTL and TTR are pointers to types that are equivalent, - ignoring their qualifiers. */ + 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) +comp_target_types (ttl, ttr, reflexive) tree ttl, ttr; + int reflexive; { int val; - /* Give maybe_objc_comptypes a crack at letting these types through. */ - if ((val = maybe_objc_comptypes (ttl, ttr, 1)) >= 0) + /* 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)), @@ -658,12 +685,12 @@ type_lists_compatible_p (args1, args2) So match anything that self-promotes. */ if (TREE_VALUE (args1) == 0) { - if (simple_type_promotes_to (TREE_VALUE (args2)) != NULL_TREE) + if (c_type_promotes_to (TREE_VALUE (args2)) != TREE_VALUE (args2)) return 0; } else if (TREE_VALUE (args2) == 0) { - if (simple_type_promotes_to (TREE_VALUE (args1)) != NULL_TREE) + if (c_type_promotes_to (TREE_VALUE (args1)) != TREE_VALUE (args1)) return 0; } else if (! (newval = comptypes (TYPE_MAIN_VARIANT (TREE_VALUE (args1)), @@ -714,71 +741,6 @@ type_lists_compatible_p (args1, args2) } } -/* 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 @@ -932,7 +894,7 @@ default_function_array_conversion (exp) 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) + 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. */ @@ -994,12 +956,11 @@ default_conversion (exp) 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))); + 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); } @@ -1010,26 +971,18 @@ default_conversion (exp) 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); + return convert (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. */ + /* Preserve unsignedness if not really getting any wider. */ if (TREE_UNSIGNED (type) - && (flag_traditional - || TYPE_PRECISION (type) == TYPE_PRECISION (integer_type_node))) + && 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"); @@ -1172,7 +1125,7 @@ build_component_ref (datum, component) { if (!COMPLETE_TYPE_P (type)) { - incomplete_type_error (NULL_TREE, type); + c_incomplete_type_error (NULL_TREE, type); return error_mark_node; } @@ -1191,7 +1144,7 @@ build_component_ref (datum, component) 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)) + do { tree subdatum = TREE_VALUE (field); @@ -1208,7 +1161,10 @@ build_component_ref (datum, component) warn_deprecated_use (subdatum); datum = ref; + + field = TREE_CHAIN (field); } + while (field); return ref; } @@ -1326,7 +1282,7 @@ build_array_ref (array, index) || (COMPLETE_TYPE_P (TREE_TYPE (TREE_TYPE (array))) && TREE_CODE (TYPE_SIZE (TREE_TYPE (TREE_TYPE (array)))) != INTEGER_CST)) { - if (mark_addressable (array) == 0) + if (!c_mark_addressable (array)) return error_mark_node; } /* An array that is indexed by a constant value which is not within @@ -1337,7 +1293,7 @@ build_array_ref (array, index) && TYPE_VALUES (TREE_TYPE (array)) && ! int_fits_type_p (index, TYPE_VALUES (TREE_TYPE (array)))) { - if (mark_addressable (array) == 0) + if (!c_mark_addressable (array)) return error_mark_node; } @@ -1349,7 +1305,7 @@ build_array_ref (array, index) 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"); + pedwarn ("ISO C90 forbids subscripting non-lvalue array"); } type = TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (array))); @@ -1502,6 +1458,17 @@ build_external_ref (id, fun) 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; } @@ -1564,10 +1531,9 @@ build_function_call (function, params) coerced_params = convert_arguments (TYPE_ARG_TYPES (fntype), params, name, fundecl); - /* Check for errors in format strings. */ + /* Check that the arguments to the function are valid. */ - if (warn_format) - check_function_format (NULL, TYPE_ATTRIBUTES (fntype), coerced_params); + 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 @@ -2011,7 +1977,7 @@ build_binary_op (code, orig_op0, orig_op1, convert_p) /* 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)) + && 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) @@ -2035,9 +2001,9 @@ build_binary_op (code, orig_op0, orig_op1, convert_p) warning ("division by zero"); if ((code0 == INTEGER_TYPE || code0 == REAL_TYPE - || code0 == COMPLEX_TYPE) + || code0 == COMPLEX_TYPE || code0 == VECTOR_TYPE) && (code1 == INTEGER_TYPE || code1 == REAL_TYPE - || code1 == COMPLEX_TYPE)) + || code1 == COMPLEX_TYPE || code1 == VECTOR_TYPE)) { if (!(code0 == INTEGER_TYPE && code1 == INTEGER_TYPE)) resultcode = RDIV_EXPR; @@ -2060,6 +2026,8 @@ build_binary_op (code, orig_op0, orig_op1, convert_p) 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: @@ -2094,8 +2062,8 @@ build_binary_op (code, orig_op0, orig_op1, convert_p) 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); + op0 = c_common_truthvalue_conversion (op0); + op1 = c_common_truthvalue_conversion (op1); converted = 1; } break; @@ -2121,18 +2089,14 @@ build_binary_op (code, orig_op0, orig_op1, convert_p) } } - /* Use the type of the value to be shifted. - This is what most traditional C compilers do. */ + /* Use the type of the value to be shifted. */ 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; - } + /* 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; @@ -2148,18 +2112,14 @@ build_binary_op (code, orig_op0, orig_op1, convert_p) warning ("left shift count >= width of type"); } - /* Use the type of the value to be shifted. - This is what most traditional C compilers do. */ + /* Use the type of the value to be shifted. */ 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; - } + /* 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; @@ -2175,18 +2135,14 @@ build_binary_op (code, orig_op0, orig_op1, convert_p) warning ("shift count >= width of type"); } - /* Use the type of the value to be shifted. - This is what most traditional C compilers do. */ + /* Use the type of the value to be shifted. */ 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; - } + /* 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; @@ -2198,9 +2154,11 @@ build_binary_op (code, orig_op0, orig_op1, convert_p) but don't convert the args to int! */ build_type = integer_type_node; if ((code0 == INTEGER_TYPE || code0 == REAL_TYPE - || code0 == COMPLEX_TYPE) + || code0 == COMPLEX_TYPE + || code0 == VECTOR_TYPE) && (code1 == INTEGER_TYPE || code1 == REAL_TYPE - || code1 == COMPLEX_TYPE)) + || code1 == COMPLEX_TYPE + || code1 == VECTOR_TYPE)) short_compare = 1; else if (code0 == POINTER_TYPE && code1 == POINTER_TYPE) { @@ -2209,7 +2167,7 @@ build_binary_op (code, orig_op0, orig_op1, convert_p) /* 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)) + if (comp_target_types (type0, type1, 1)) result_type = common_type (type0, type1); else if (VOID_TYPE_P (tt0)) { @@ -2240,14 +2198,12 @@ build_binary_op (code, orig_op0, orig_op1, convert_p) else if (code0 == POINTER_TYPE && code1 == INTEGER_TYPE) { result_type = type0; - if (! flag_traditional) - pedwarn ("comparison between pointer and integer"); + 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"); + pedwarn ("comparison between pointer and integer"); } break; @@ -2258,7 +2214,7 @@ build_binary_op (code, orig_op0, orig_op1, convert_p) shorten = 1; else if (code0 == POINTER_TYPE && code1 == POINTER_TYPE) { - if (comp_target_types (type0, type1)) + if (comp_target_types (type0, type1, 1)) { result_type = common_type (type0, type1); if (pedantic @@ -2283,7 +2239,7 @@ build_binary_op (code, orig_op0, orig_op1, convert_p) short_compare = 1; else if (code0 == POINTER_TYPE && code1 == POINTER_TYPE) { - if (comp_target_types (type0, type1)) + if (comp_target_types (type0, type1, 1)) { result_type = common_type (type0, type1); if (!COMPLETE_TYPE_P (TREE_TYPE (type0)) @@ -2316,14 +2272,12 @@ build_binary_op (code, orig_op0, orig_op1, convert_p) else if (code0 == POINTER_TYPE && code1 == INTEGER_TYPE) { result_type = type0; - if (! flag_traditional) - pedwarn ("comparison between pointer and integer"); + 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"); + pedwarn ("comparison between pointer and integer"); } break; @@ -2347,9 +2301,11 @@ build_binary_op (code, orig_op0, orig_op1, convert_p) break; } - if ((code0 == INTEGER_TYPE || code0 == REAL_TYPE || code0 == COMPLEX_TYPE) + if ((code0 == INTEGER_TYPE || code0 == REAL_TYPE || code0 == COMPLEX_TYPE + || code0 == VECTOR_TYPE) && - (code1 == INTEGER_TYPE || code1 == REAL_TYPE || code1 == COMPLEX_TYPE)) + (code1 == INTEGER_TYPE || code1 == REAL_TYPE || code1 == COMPLEX_TYPE + || code1 == VECTOR_TYPE)) { int none_complex = (code0 != COMPLEX_TYPE && code1 != COMPLEX_TYPE); @@ -2411,22 +2367,24 @@ build_binary_op (code, orig_op0, orig_op1, convert_p) && unsigned0 == unsigned1 && (unsigned0 || !uns)) result_type - = signed_or_unsigned_type (unsigned0, - common_type (TREE_TYPE (arg0), TREE_TYPE (arg1))); + = 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 = signed_or_unsigned_type (unsigned1, - TREE_TYPE (arg1)), + && (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 = signed_or_unsigned_type (unsigned0, - TREE_TYPE (arg0)), + && (type + = c_common_signed_or_unsigned_type (unsigned0, + TREE_TYPE (arg0)), int_fits_type_p (arg1, type))) result_type = type; } @@ -2452,7 +2410,8 @@ build_binary_op (code, orig_op0, orig_op1, convert_p) { /* Do an unsigned shift if the operand was zero-extended. */ result_type - = signed_or_unsigned_type (unsigned_arg, TREE_TYPE (arg0)); + = 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); @@ -2523,22 +2482,24 @@ build_binary_op (code, orig_op0, orig_op1, convert_p) constant expression involving such literals or a conditional expression involving such literals) and it is non-negative. */ - if (tree_expr_nonnegative_p (sop)) + 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, signed_type (result_type))) + && 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)), - signed_type (result_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"); @@ -2637,6 +2598,27 @@ build_binary_op (code, orig_op0, orig_op1, convert_p) } } + +/* 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. */ @@ -2758,11 +2740,13 @@ build_unary_op (code, xarg, flag) } 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 == COMPLEX_TYPE + || typecode == VECTOR_TYPE)) { error ("wrong type argument to unary minus"); return error_mark_node; @@ -2772,7 +2756,12 @@ build_unary_op (code, xarg, flag) break; case BIT_NOT_EXPR: - if (typecode == COMPLEX_TYPE) + if (typecode == INTEGER_TYPE || typecode == VECTOR_TYPE) + { + if (!noconvert) + arg = default_conversion (arg); + } + else if (typecode == COMPLEX_TYPE) { code = CONJ_EXPR; if (pedantic) @@ -2780,13 +2769,11 @@ build_unary_op (code, xarg, flag) if (!noconvert) arg = default_conversion (arg); } - else if (typecode != INTEGER_TYPE) + else { error ("wrong type argument to bit-complement"); return error_mark_node; } - else if (!noconvert) - arg = default_conversion (arg); break; case ABS_EXPR: @@ -2822,7 +2809,7 @@ build_unary_op (code, xarg, flag) error ("wrong type argument to unary exclamation mark"); return error_mark_node; } - arg = truthvalue_conversion (arg); + arg = c_common_truthvalue_conversion (arg); return invert_truthvalue (arg); case NOP_EXPR: @@ -2888,6 +2875,9 @@ build_unary_op (code, xarg, flag) tree inc; tree result_type = TREE_TYPE (arg); + arg = get_unwidened (arg, 0); + argtype = TREE_TYPE (arg); + /* Compute the increment. */ if (typecode == POINTER_TYPE) @@ -2916,9 +2906,6 @@ build_unary_op (code, xarg, flag) else inc = integer_one_node; - arg = get_unwidened (arg, 0); - argtype = TREE_TYPE (arg); - inc = convert (argtype, inc); /* Handle incrementing a cast-expression. */ @@ -3012,7 +2999,7 @@ build_unary_op (code, xarg, flag) /* For &x[y], return x+y */ if (TREE_CODE (arg) == ARRAY_REF) { - if (mark_addressable (TREE_OPERAND (arg, 0)) == 0) + 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); @@ -3067,7 +3054,7 @@ build_unary_op (code, xarg, flag) argtype = build_pointer_type (argtype); - if (mark_addressable (arg) == 0) + if (!c_mark_addressable (arg)) return error_mark_node; { @@ -3286,13 +3273,14 @@ readonly_warning (arg, msgid) /* 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. */ + Returns true if successful. */ -int -mark_addressable (exp) +bool +c_mark_addressable (exp) tree exp; { tree x = exp; + while (1) switch (TREE_CODE (x)) { @@ -3301,7 +3289,7 @@ mark_addressable (exp) { error ("cannot take address of bit-field `%s'", IDENTIFIER_POINTER (DECL_NAME (TREE_OPERAND (x, 1)))); - return 0; + return false; } /* ... fall through ... */ @@ -3316,7 +3304,7 @@ mark_addressable (exp) case COMPOUND_LITERAL_EXPR: case CONSTRUCTOR: TREE_ADDRESSABLE (x) = 1; - return 1; + return true; case VAR_DECL: case CONST_DECL: @@ -3329,7 +3317,7 @@ mark_addressable (exp) { error ("global register variable `%s' used in nested function", IDENTIFIER_POINTER (DECL_NAME (x))); - return 0; + return false; } pedwarn ("register variable `%s' used in nested function", IDENTIFIER_POINTER (DECL_NAME (x))); @@ -3340,7 +3328,7 @@ mark_addressable (exp) { error ("address of global register variable `%s' requested", IDENTIFIER_POINTER (DECL_NAME (x))); - return 0; + return false; } /* If we are making this addressable due to its having @@ -3351,13 +3339,13 @@ mark_addressable (exp) else if (C_TYPE_FIELDS_VOLATILE (TREE_TYPE (x))) { error ("cannot put object with volatile field into register"); - return 0; + return false; } pedwarn ("address of register variable `%s' requested", IDENTIFIER_POINTER (DECL_NAME (x))); } - put_var_into_stack (x); + put_var_into_stack (x, /*rescan=*/true); /* drops in */ case FUNCTION_DECL: @@ -3368,7 +3356,7 @@ mark_addressable (exp) #endif default: - return 1; + return true; } } @@ -3385,7 +3373,7 @@ build_conditional_expr (ifexp, op1, op2) tree result_type = NULL; tree orig_op1 = op1, orig_op2 = op2; - ifexp = truthvalue_conversion (default_conversion (ifexp)); + 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 @@ -3458,8 +3446,8 @@ build_conditional_expr (ifexp, op1, op2) /* 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))) + 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"); @@ -3474,7 +3462,7 @@ build_conditional_expr (ifexp, op1, op2) } else if (code1 == POINTER_TYPE && code2 == POINTER_TYPE) { - if (comp_target_types (type1, type2)) + 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) @@ -3629,7 +3617,12 @@ build_c_cast (type, expr) if (type == error_mark_node || expr == error_mark_node) return error_mark_node; - type = TYPE_MAIN_VARIANT (type); + + /* 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. */ @@ -3685,8 +3678,7 @@ build_c_cast (type, expr) else name = ""; t = digest_init (type, build (CONSTRUCTOR, type, NULL_TREE, - build_tree_list (field, value)), - 0, 0); + build_tree_list (field, value)), 0); TREE_CONSTANT (t) = TREE_CONSTANT (value); return t; } @@ -3781,6 +3773,23 @@ build_c_cast (type, expr) && !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); @@ -4037,9 +4046,11 @@ convert_for_assignment (type, rhs, errtype, fundecl, funname, parmnum) 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); + /* 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; } @@ -4054,7 +4065,12 @@ convert_for_assignment (type, rhs, errtype, fundecl, funname, parmnum) if (codel == REFERENCE_TYPE && comptypes (TREE_TYPE (type), TREE_TYPE (rhs)) == 1) { - if (mark_addressable (rhs) == 0) + 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); @@ -4073,7 +4089,7 @@ convert_for_assignment (type, rhs, errtype, fundecl, funname, parmnum) else if ((codel == INTEGER_TYPE || codel == REAL_TYPE || codel == ENUMERAL_TYPE || codel == COMPLEX_TYPE || codel == BOOLEAN_TYPE) - && (coder == INTEGER_TYPE || coder == REAL_TYPE + && (coder == INTEGER_TYPE || coder == REAL_TYPE || coder == ENUMERAL_TYPE || coder == COMPLEX_TYPE || coder == BOOLEAN_TYPE)) return convert_and_check (type, rhs); @@ -4107,7 +4123,7 @@ convert_for_assignment (type, rhs, errtype, fundecl, funname, parmnum) 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)) + || comp_target_types (memb_type, rhstype, 0)) { /* If this type won't generate any warnings, use it. */ if (TYPE_QUALS (ttl) == TYPE_QUALS (ttr) @@ -4173,7 +4189,7 @@ convert_for_assignment (type, rhs, errtype, fundecl, funname, parmnum) /* Conversions among pointers */ else if ((codel == POINTER_TYPE || codel == REFERENCE_TYPE) - && (coder == POINTER_TYPE || coder == REFERENCE_TYPE)) + && (coder == codel)) { tree ttl = TREE_TYPE (type); tree ttr = TREE_TYPE (rhstype); @@ -4182,9 +4198,9 @@ convert_for_assignment (type, rhs, errtype, fundecl, funname, parmnum) 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)))) + || 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) @@ -4207,7 +4223,7 @@ convert_for_assignment (type, rhs, errtype, fundecl, funname, parmnum) /* 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)) + || comp_target_types (type, rhstype, 0)) ; /* If there is a mismatch, do warn. */ else if (pedantic) @@ -4262,7 +4278,7 @@ convert_for_assignment (type, rhs, errtype, fundecl, funname, parmnum) { if (funname) { - tree selector = maybe_building_objc_message_expr (); + tree selector = objc_message_selector (); if (selector && parmnum > 2) error ("incompatible type for argument %d of `%s'", @@ -4307,7 +4323,8 @@ c_convert_parm_for_inlining (parm, value, fn) /* 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'". + 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. */ @@ -4320,7 +4337,7 @@ warn_for_assignment (msgid, opname, function, argnum) { if (opname == 0) { - tree selector = maybe_building_objc_message_expr (); + tree selector = objc_message_selector (); char * new_opname; if (selector && argnum > 2) @@ -4328,7 +4345,27 @@ warn_for_assignment (msgid, opname, function, argnum) function = selector; argnum -= 2; } - if (function) + 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'"); @@ -4395,8 +4432,7 @@ store_init_value (decl, init) /* Digest the specified initializer into an expression. */ - value = digest_init (type, init, TREE_STATIC (decl), - TREE_STATIC (decl) || (pedantic && !flag_isoc99)); + value = digest_init (type, init, TREE_STATIC (decl)); /* Store the expression if valid; else report error. */ @@ -4496,15 +4532,6 @@ static int spelling_size; /* Size of the spelling stack. */ #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. */ @@ -4657,14 +4684,13 @@ warning_init (msgid) /* 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. */ + REQUIRE_CONSTANT requests an error if non-constant initializers or + elements are seen. */ static tree -digest_init (type, init, require_constant, constructor_constant) +digest_init (type, init, require_constant) tree type, init; - int require_constant, constructor_constant; + int require_constant; { enum tree_code code = TREE_CODE (type); tree inside_init = init; @@ -4843,44 +4869,6 @@ digest_init (type, init, require_constant, constructor_constant) 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; } @@ -5240,7 +5228,7 @@ really_start_incremental_init (type) 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 + 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) @@ -5260,7 +5248,7 @@ really_start_incremental_init (type) /* 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_index = convert (bitsizetype, bitsize_zero_node); constructor_unfilled_index = constructor_index; } else @@ -5292,6 +5280,7 @@ push_init_level (implicit) && constructor_fields == 0) process_init_element (pop_init_level (1)); else if (TREE_CODE (constructor_type) == ARRAY_TYPE + && constructor_max_index && tree_int_cst_lt (constructor_max_index, constructor_index)) process_init_element (pop_init_level (1)); else @@ -5430,7 +5419,7 @@ push_init_level (implicit) 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 + 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) @@ -5619,7 +5608,7 @@ pop_init_level (implicit) } /* Common handling for both array range and field name designators. - ARRAY argument is non-zero for array ranges. Returns zero for success. */ + ARRAY argument is nonzero for array ranges. Returns zero for success. */ static int set_designator (array) @@ -6277,8 +6266,7 @@ output_init_element (value, type, field, pending) || TREE_CHAIN (field))))) return; - value = digest_init (type, value, require_constant_value, - require_constant_elements); + value = digest_init (type, value, require_constant_value); if (value == error_mark_node) { constructor_erroneous = 1; @@ -6889,12 +6877,9 @@ simple_asm_stmt (expr) { 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)); + expr, NULL_TREE, NULL_TREE, NULL_TREE)); ASM_INPUT_P (stmt) = 1; return stmt; } @@ -6916,8 +6901,6 @@ build_asm_stmt (cv_qualifier, string, outputs, inputs, clobbers) { tree tail; - if (TREE_CHAIN (string)) - string = combine_strings (string); if (TREE_CODE (string) != STRING_CST) { error ("asm template is not a string constant"); @@ -6994,7 +6977,11 @@ c_expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, line) /* 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); + { + 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 --git a/contrib/gcc/caller-save.c b/contrib/gcc/caller-save.c index 87a13dc..b7e3cea 100644 --- a/contrib/gcc/caller-save.c +++ b/contrib/gcc/caller-save.c @@ -115,6 +115,9 @@ init_caller_save () 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, @@ -179,22 +182,35 @@ init_caller_save () 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. */ + see if such an insn is recognized and meets its constraints. - start_sequence (); + 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)) { - 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; + /* 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); @@ -221,6 +237,7 @@ init_caller_save () 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) @@ -232,8 +249,6 @@ init_caller_save () SET_HARD_REG_BIT (call_fixed_reg_set, i); } } - - end_sequence (); } /* Initialize save areas by showing that we haven't allocated any yet. */ diff --git a/contrib/gcc/calls.c b/contrib/gcc/calls.c index 9a059a0..b5a5123 100644 --- a/contrib/gcc/calls.c +++ b/contrib/gcc/calls.c @@ -1,6 +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. + 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. This file is part of GCC. @@ -33,6 +33,9 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #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 @@ -91,7 +94,7 @@ struct arg_data /* 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. + /* 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. */ @@ -126,7 +129,7 @@ struct arg_data struct args_size alignment_pad; }; -/* A vector of one char per byte of stack space. A byte if non-zero if +/* 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. */ @@ -225,6 +228,7 @@ static int check_sibcall_argument_overlap PARAMS ((rtx, struct arg_data *)); 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 *)); @@ -614,6 +618,8 @@ emit_call_1 (funexp, fndecl, funtype, stack_size, rounded_stack_size, 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, @@ -799,6 +805,21 @@ setjmp_call_p (fndecl) 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 @@ -876,6 +897,12 @@ precompute_register_parameters (num_actuals, args, reg_parm_seen) 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. */ @@ -967,11 +994,8 @@ save_fixed_argument_area (reg_parm_stack_space, argblock, 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); + emit_block_move (validize_mem (save_area), stack_area, + GEN_INT (num_to_save), BLOCK_OP_CALL_PARM); } else { @@ -1008,11 +1032,9 @@ restore_fixed_argument_area (save_area, argblock, high_to_save, low_to_save) 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); + 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 */ @@ -1053,7 +1075,6 @@ store_unaligned_arguments_into_pseudos (args, num_actuals) 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)); @@ -1539,8 +1560,8 @@ precompute_arguments (flags, num_actuals, args) 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; + SUBREG_PROMOTED_UNSIGNED_SET (args[i].initial_value, + args[i].unsignedp); } #endif } @@ -1645,6 +1666,7 @@ compute_argument_addresses (args, argblock, num_actuals) 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); @@ -1655,6 +1677,7 @@ compute_argument_addresses (args, argblock, num_actuals) 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); @@ -1674,12 +1697,12 @@ compute_argument_addresses (args, argblock, num_actuals) 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. */ + ADDR is the operand 0 of CALL_EXPR for this call. */ static rtx -rtx_for_function_call (fndecl, exp) +rtx_for_function_call (fndecl, addr) tree fndecl; - tree exp; + tree addr; { rtx funexp; @@ -1703,7 +1726,7 @@ rtx_for_function_call (fndecl, exp) rtx funaddr; push_temp_slots (); funaddr = funexp - = expand_expr (TREE_OPERAND (exp, 0), NULL_RTX, VOIDmode, 0); + = expand_expr (addr, NULL_RTX, VOIDmode, 0); pop_temp_slots (); /* FUNEXP can't be BLKmode. */ emit_queue (); } @@ -1881,7 +1904,7 @@ try_to_integrate (fndecl, actparms, target, ignore, type, structure_value_addr) NULL_RTX, BITS_PER_UNIT); seq = get_insns (); end_sequence (); - emit_insns_before (seq, first_insn); + emit_insn_before (seq, first_insn); emit_stack_restore (SAVE_BLOCK, old_stack_level, NULL_RTX); } } @@ -1904,7 +1927,7 @@ try_to_integrate (fndecl, actparms, target, ignore, type, structure_value_addr) warning_with_decl (fndecl, "inlining failed in call to `%s'"); warning ("called from here"); } - mark_addressable (fndecl); + (*lang_hooks.mark_addressable) (fndecl); return (rtx) (size_t) - 1; } @@ -1970,7 +1993,7 @@ combine_pending_stack_adjustment_and_call (unadjusted_args_size, /* 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, + Return nonzero if X expression dereferences such argument slots, zero otherwise. */ static int @@ -2033,7 +2056,7 @@ check_sibcall_argument_overlap_1 (x) /* 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, + Return nonzero if sequence after INSN dereferences such argument slots, zero otherwise. */ static int @@ -2204,6 +2227,7 @@ expand_call (exp, target, ignore) 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; @@ -2239,7 +2263,7 @@ expand_call (exp, target, ignore) warning_with_decl (fndecl, "can't inline call to `%s'"); warning ("called from here"); } - mark_addressable (fndecl); + (*lang_hooks.mark_addressable) (fndecl); } flags |= flags_from_decl_or_type (fndecl); @@ -2285,7 +2309,7 @@ expand_call (exp, target, ignore) /* In case this is a static function, note that it has been used. */ if (! TREE_ADDRESSABLE (fndecl)) - mark_addressable (fndecl); + (*lang_hooks.mark_addressable) (fndecl); is_integrable = 0; } } @@ -2325,7 +2349,7 @@ expand_call (exp, target, ignore) 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)); + funtype = TREE_TYPE (addr); if (! POINTER_TYPE_P (funtype)) abort (); funtype = TREE_TYPE (funtype); @@ -2462,8 +2486,8 @@ expand_call (exp, target, ignore) /* 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) + || 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. */ @@ -2487,19 +2511,19 @@ expand_call (exp, target, ignore) 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) + || (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. */ || args_size.constant > current_function_args_size /* If the callee pops its own arguments, then it must pop exactly the same number of arguments as the current function. */ - || RETURN_POPS_ARGS (fndecl, funtype, args_size.constant) - != RETURN_POPS_ARGS (current_function_decl, - TREE_TYPE (current_function_decl), - current_function_args_size)) - try_tail_call = 0; + || (RETURN_POPS_ARGS (fndecl, funtype, args_size.constant) + != RETURN_POPS_ARGS (current_function_decl, + TREE_TYPE (current_function_decl), + current_function_args_size)) + || !(*lang_hooks.decls.ok_for_sibcall) (fndecl)) + try_tail_call = 0; if (try_tail_call || try_tail_recursion) { @@ -2544,7 +2568,7 @@ expand_call (exp, target, ignore) } /* 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)); + 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)) @@ -2938,7 +2962,7 @@ expand_call (exp, target, ignore) be deferred during the evaluation of the arguments. */ NO_DEFER_POP; - funexp = rtx_for_function_call (fndecl, exp); + funexp = rtx_for_function_call (fndecl, addr); /* Figure out the register where the value, if any, will come back. */ valreg = 0; @@ -3089,7 +3113,7 @@ expand_call (exp, target, ignore) { insns = get_insns (); end_sequence (); - emit_insns (insns); + emit_insn (insns); } else { @@ -3143,7 +3167,7 @@ expand_call (exp, target, ignore) /* Write out the sequence. */ insns = get_insns (); end_sequence (); - emit_insns (insns); + emit_insn (insns); valreg = temp; } @@ -3288,7 +3312,7 @@ expand_call (exp, target, ignore) } target = gen_rtx_SUBREG (TYPE_MODE (type), target, offset); SUBREG_PROMOTED_VAR_P (target) = 1; - SUBREG_PROMOTED_UNSIGNED_P (target) = unsignedp; + SUBREG_PROMOTED_UNSIGNED_SET (target, unsignedp); } #endif @@ -3327,9 +3351,9 @@ expand_call (exp, target, ignore) 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)); + 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; @@ -3430,7 +3454,7 @@ expand_call (exp, target, ignore) tail_recursion_label)); } else - emit_insns (normal_call_insns); + emit_insn (normal_call_insns); currently_expanding_call--; @@ -3494,6 +3518,7 @@ emit_library_call_value_1 (retval, orgfun, value, fn_type, outmode, nargs, p) 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 @@ -3555,27 +3580,31 @@ emit_library_call_value_1 (retval, orgfun, value, fn_type, outmode, nargs, p) /* 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))) + 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 (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); + 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 (type_for_mode (outmode, 0), 0, 1, 1); + 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); + /* 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. */ @@ -3684,6 +3713,16 @@ emit_library_call_value_1 (retval, orgfun, value, fn_type, outmode, nargs, p) #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) @@ -3696,12 +3735,13 @@ emit_library_call_value_1 (retval, orgfun, value, fn_type, outmode, nargs, p) slot = val; else if (must_copy) { - slot = assign_temp (type_for_mode (mode, 0), 0, 1, 1); + slot = assign_temp ((*lang_hooks.types.type_for_mode) (mode, 0), + 0, 1, 1); emit_move_insn (slot, val); } else { - tree type = type_for_mode (mode, 0); + tree type = (*lang_hooks.types.type_for_mode) (mode, 0); slot = gen_rtx_MEM (mode, expand_expr (build1 (ADDR_EXPR, @@ -3911,8 +3951,8 @@ emit_library_call_value_1 (retval, orgfun, value, fn_type, outmode, nargs, p) { 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)); + emit_block_move (save_area, stack_area, GEN_INT (num_to_save), + BLOCK_OP_CALL_PARM); } else { @@ -3980,8 +4020,9 @@ emit_library_call_value_1 (retval, orgfun, value, fn_type, outmode, nargs, p) } } - emit_push_insn (val, mode, NULL_TREE, NULL_RTX, 0, partial, reg, 0, - argblock, GEN_INT (argvec[argnum].offset.constant), + 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. */ @@ -4068,8 +4109,7 @@ emit_library_call_value_1 (retval, orgfun, value, fn_type, outmode, nargs, p) emit_call_1 (fun, get_identifier (XSTR (orgfun, 0)), - build_function_type (outmode == VOIDmode ? void_type_node - : type_for_mode (outmode, 0), NULL_TREE), + 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), @@ -4109,18 +4149,27 @@ emit_library_call_value_1 (retval, orgfun, value, fn_type, outmode, nargs, p) { rtx insns; - if (valreg == 0 || GET_CODE (valreg) == PARALLEL) + if (valreg == 0) { insns = get_insns (); end_sequence (); - emit_insns (insns); + emit_insn (insns); } else { rtx note = 0; - rtx temp = gen_reg_rtx (GET_MODE (valreg)); + 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++) @@ -4154,10 +4203,16 @@ emit_library_call_value_1 (retval, orgfun, value, fn_type, outmode, nargs, p) 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, hard_libcall_value (outmode)); + emit_move_insn (value, valreg); else - value = hard_libcall_value (outmode); + value = valreg; } if (ACCUMULATE_OUTGOING_ARGS) @@ -4183,8 +4238,9 @@ emit_library_call_value_1 (retval, orgfun, value, fn_type, outmode, nargs, p) 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)); + emit_block_move (stack_area, save_area, + GEN_INT (high_to_save - low_to_save + 1), + BLOCK_OP_CALL_PARM); } #endif @@ -4286,7 +4342,7 @@ emit_library_call_value VPARAMS((rtx orgfun, rtx value, FNDECL is the declaration of the function we are calling. - Return non-zero if this arg should cause sibcall failure, + Return nonzero if this arg should cause sibcall failure, zero otherwise. */ static int @@ -4294,7 +4350,7 @@ store_one_arg (arg, argblock, flags, variable_size, reg_parm_stack_space) struct arg_data *arg; rtx argblock; int flags; - int variable_size; + int variable_size ATTRIBUTE_UNUSED; int reg_parm_stack_space; { tree pval = arg->tree_value; @@ -4361,7 +4417,8 @@ store_one_arg (arg, argblock, flags, variable_size, reg_parm_stack_space) 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)); + expr_size (arg->tree_value), + BLOCK_OP_CALL_PARM); } else { @@ -4369,21 +4426,6 @@ store_one_arg (arg, argblock, flags, variable_size, reg_parm_stack_space) 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; - } } } @@ -4437,7 +4479,7 @@ store_one_arg (arg, argblock, flags, variable_size, reg_parm_stack_space) (partial || TYPE_MODE (TREE_TYPE (pval)) != arg->mode) ? NULL_RTX : arg->stack, - VOIDmode, 0); + VOIDmode, EXPAND_STACK_PARM); /* If we are promoting object (or for any other reason) the mode doesn't agree, convert the mode. */ @@ -4490,8 +4532,8 @@ store_one_arg (arg, argblock, flags, variable_size, reg_parm_stack_space) /* 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, + 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)); @@ -4504,6 +4546,7 @@ store_one_arg (arg, argblock, flags, variable_size, reg_parm_stack_space) { /* BLKmode, at least partly to be pushed. */ + unsigned int parm_align; int excess; rtx size_rtx; @@ -4529,6 +4572,23 @@ store_one_arg (arg, argblock, flags, variable_size, reg_parm_stack_space) 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 @@ -4562,42 +4622,9 @@ store_one_arg (arg, argblock, flags, variable_size, reg_parm_stack_space) } } - /* 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, + 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 @@ -4612,6 +4639,7 @@ store_one_arg (arg, argblock, flags, variable_size, reg_parm_stack_space) 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 --git a/contrib/gcc/cfg.c b/contrib/gcc/cfg.c index 73689c3..2d11580 100644 --- a/contrib/gcc/cfg.c +++ b/contrib/gcc/cfg.c @@ -38,6 +38,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA 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" @@ -64,6 +65,10 @@ static char *flow_firstobj; int n_basic_blocks; +/* First free basic block number. */ + +int last_basic_block; + /* Number of edges in the current function. */ int n_edges; @@ -92,7 +97,10 @@ struct basic_block_def entry_exit_blocks[2] 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 */ @@ -110,7 +118,10 @@ struct basic_block_def entry_exit_blocks[2] 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 */ @@ -162,12 +173,11 @@ free_edge (e) void clear_edges () { - int i; + basic_block bb; edge e; - for (i = 0; i < n_basic_blocks; ++i) + FOR_EACH_BB (bb) { - basic_block bb = BASIC_BLOCK (i); edge e = bb->succ; while (e) @@ -219,38 +229,99 @@ alloc_block () return bb; } -/* Remove block B from the basic block array and compact behind it. */ +/* 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_nocompact (b) +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. */ -void -expunge_block (b) - basic_block b; +edge +unchecked_make_edge (src, dst, flags) + basic_block src, dst; + int flags; { - int i, n = n_basic_blocks; + edge e; - for (i = b->index; i + 1 < n; ++i) + if (first_deleted_edge) + { + e = first_deleted_edge; + first_deleted_edge = e->succ_next; + } + else { - basic_block x = BASIC_BLOCK (i + 1); - BASIC_BLOCK (i) = x; - x->index = i; + e = (edge) obstack_alloc (&flow_obstack, sizeof *e); + memset (e, 0, sizeof *e); } + n_edges++; - n_basic_blocks--; - basic_block_info->num_elements--; + e->succ_next = src->succ; + e->pred_next = dst->pred; + e->src = src; + e->dest = dst; + e->flags = flags; - expunge_block_nocompact (b); + 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. */ @@ -291,26 +362,7 @@ cached_make_edge (edge_cache, src, dst, flags) 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; + e = unchecked_make_edge (src, dst, flags); if (use_edge_cache) SET_BIT (edge_cache[src->index], dst->index); @@ -418,6 +470,8 @@ redirect_edge_succ_nodup (e, new_succ) { 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; @@ -448,12 +502,23 @@ redirect_edge_pred (e, new_pred) 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); @@ -469,7 +534,7 @@ dump_flow_info (file) 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])) + 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)); @@ -477,7 +542,8 @@ dump_flow_info (file) 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) + 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); @@ -494,22 +560,30 @@ dump_flow_info (file) reg_class_names[(int) altclass]); } - if (REG_POINTER (regno_reg_rtx[i])) + 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 (i = 0; i < n_basic_blocks; i++) + FOR_EACH_BB (bb) { - basic_block bb = BASIC_BLOCK (i); edge e; + int sum; + gcov_type lsum; fprintf (file, "\nBasic block %d: first insn %d, last %d, ", - i, INSN_UID (bb->head), INSN_UID (bb->end)); + 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.\n", bb->frequency); + 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) @@ -526,6 +600,37 @@ dump_flow_info (file) 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); @@ -564,7 +669,7 @@ dump_edge_info (file, e, do_succ) if (e->flags) { static const char * const bitnames[] - = {"fallthru", "ab", "abcall", "eh", "fake", "dfs_back"}; + = {"fallthru", "ab", "abcall", "eh", "fake", "dfs_back", "can_fallthru"}; int comma = 0; int i, flags = e->flags; @@ -594,7 +699,7 @@ static void *first_block_aux_obj = 0; 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 +/* Allocate a memory block of SIZE as BB->aux. The obstack must be first initialized by alloc_aux_for_blocks. */ inline void @@ -630,13 +735,10 @@ alloc_aux_for_blocks (size) 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); + basic_block bb; - alloc_aux_for_block (ENTRY_BLOCK_PTR, size); - alloc_aux_for_block (EXIT_BLOCK_PTR, size); + FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR, NULL, next_bb) + alloc_aux_for_block (bb, size); } } @@ -645,13 +747,10 @@ alloc_aux_for_blocks (size) void clear_aux_for_blocks () { - int i; - - for (i = 0; i < n_basic_blocks; i++) - BASIC_BLOCK (i)->aux = NULL; + basic_block bb; - ENTRY_BLOCK_PTR->aux = NULL; - EXIT_BLOCK_PTR->aux = NULL; + FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR, NULL, next_bb) + bb->aux = NULL; } /* Free data allocated in block_aux_obstack and clear AUX pointers @@ -668,7 +767,7 @@ free_aux_for_blocks () clear_aux_for_blocks (); } -/* Allocate an memory edge of SIZE as BB->aux. The obstack must +/* Allocate a memory edge of SIZE as BB->aux. The obstack must be first initialized by alloc_aux_for_edges. */ inline void @@ -705,17 +804,12 @@ alloc_aux_for_edges (size) 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; + + FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR, next_bb) { - 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); } @@ -727,18 +821,11 @@ alloc_aux_for_edges (size) void clear_aux_for_edges () { - int i; + basic_block bb; + edge e; - for (i = -1; i < n_basic_blocks; i++) + FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR, next_bb) { - 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; } diff --git a/contrib/gcc/cfganal.c b/contrib/gcc/cfganal.c index f0ca224..3831c5f 100644 --- a/contrib/gcc/cfganal.c +++ b/contrib/gcc/cfganal.c @@ -28,7 +28,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #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. */ @@ -55,7 +54,6 @@ static void flow_dfs_compute_reverse_finish 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 @@ -69,7 +67,7 @@ flow_active_insn_p (insn) return true; /* A clobber of the function return value exists for buggy - programs that fail to return a value. It's effect is to + 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. */ @@ -112,7 +110,10 @@ can_fallthru (src, target) rtx insn = src->end; rtx insn2 = target->head; - if (src->index + 1 == target->index && !active_insn_p (insn2)) + 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. */ @@ -120,7 +121,7 @@ can_fallthru (src, target) } /* Mark the back edges in DFS traversal. - Return non-zero if a loop (natural or otherwise) is present. + Return nonzero if a loop (natural or otherwise) is present. Inspired by Depth_First_Search_PP described in: Advanced Compiler Design and Implementation @@ -142,15 +143,15 @@ mark_dfs_back_edges () 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)); + 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 (n_basic_blocks); + visited = sbitmap_alloc (last_basic_block); /* None of the nodes in the CFG have been visited yet. */ sbitmap_zero (visited); @@ -211,6 +212,40 @@ mark_dfs_back_edges () 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. */ @@ -236,32 +271,6 @@ need_fake_edge_p (insn) || 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 @@ -276,29 +285,16 @@ flow_call_edges_add (blocks) { int i; int blocks_split = 0; - int bb_num = 0; - basic_block *bbs; + int last_bb = last_basic_block; 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 (n_basic_blocks == 0) + return 0; if (! blocks) - { - for (i = 0; i < n_basic_blocks; i++) - bbs[bb_num++] = BASIC_BLOCK (i); - - check_last_block = true; - } + 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; - }); + 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 @@ -314,7 +310,7 @@ flow_call_edges_add (blocks) 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); + 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. */ @@ -340,12 +336,18 @@ flow_call_edges_add (blocks) calls since there is no way that we can determine if they will return or not... */ - for (i = 0; i < bb_num; i++) + for (i = 0; i < last_bb; i++) { - basic_block bb = bbs[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); @@ -375,9 +377,12 @@ flow_call_edges_add (blocks) /* 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++; + 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); } @@ -390,28 +395,26 @@ flow_call_edges_add (blocks) 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 + the reachable bit in block->flags. A nonzero value indicates the block is reachable. */ void find_unreachable_blocks () { edge e; - int i, n; - basic_block *tos, *worklist; + basic_block *tos, *worklist, bb; - n = n_basic_blocks; - tos = worklist = (basic_block *) xmalloc (sizeof (basic_block) * n); + tos = worklist = + (basic_block *) xmalloc (sizeof (basic_block) * n_basic_blocks); /* Clear all the reachability flags. */ - for (i = 0; i < n; ++i) - BASIC_BLOCK (i)->flags &= ~BB_REACHABLE; + 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 @@ -461,8 +464,8 @@ create_edge_list () struct edge_list *elist; edge e; int num_edges; - int x; int block_count; + basic_block bb; block_count = n_basic_blocks + 2; /* Include the entry and exit blocks. */ @@ -470,18 +473,12 @@ create_edge_list () /* 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++) + FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR, next_bb) { - 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; @@ -489,18 +486,10 @@ create_edge_list () 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; - } + /* 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; } @@ -554,13 +543,12 @@ verify_edge_list (f, elist) FILE *f; struct edge_list *elist; { - int x, pred, succ, index; + int pred, succ, index; edge e; + basic_block bb, p, s; - for (x = 0; x < n_basic_blocks; x++) + FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR, next_bb) { - basic_block bb = BASIC_BLOCK (x); - for (e = bb->succ; e; e = e->succ_next) { pred = e->src->index; @@ -581,33 +569,12 @@ verify_edge_list (f, elist) } } - 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 + /* We've verified that all the edges are in the list, now 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++) + FOR_BB_BETWEEN (p, ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR, next_bb) + FOR_BB_BETWEEN (s, ENTRY_BLOCK_PTR->next_bb, NULL, next_bb) { - 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) @@ -624,78 +591,15 @@ verify_edge_list (f, elist) break; } - if (EDGE_INDEX (elist, BASIC_BLOCK (pred), BASIC_BLOCK (succ)) + 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", - pred, succ); - if (EDGE_INDEX (elist, BASIC_BLOCK (pred), BASIC_BLOCK (succ)) + 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", - pred, succ, EDGE_INDEX (elist, BASIC_BLOCK (pred), - BASIC_BLOCK (succ))); + p->index, s->index, EDGE_INDEX (elist, p, s)); } - - 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 @@ -784,13 +688,10 @@ remove_fake_successors (bb) void remove_fake_edges () { - int x; - - for (x = 0; x < n_basic_blocks; x++) - remove_fake_successors (BASIC_BLOCK (x)); + basic_block bb; - /* We've handled all successors except the entry block's. */ - remove_fake_successors (ENTRY_BLOCK_PTR); + 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 @@ -800,11 +701,11 @@ remove_fake_edges () void add_noreturn_fake_exit_edges () { - int x; + basic_block bb; - 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); + 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 @@ -860,7 +761,7 @@ flow_reverse_top_sort_order_compute (rts_order) sp = 0; /* Allocate bitmap to track nodes that have been visited. */ - visited = sbitmap_alloc (n_basic_blocks); + visited = sbitmap_alloc (last_basic_block); /* None of the nodes in the CFG have been visited yet. */ sbitmap_zero (visited); @@ -909,8 +810,8 @@ flow_reverse_top_sort_order_compute (rts_order) } /* 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 + 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. */ @@ -931,7 +832,7 @@ flow_depth_first_order_compute (dfs_order, rc_order) sp = 0; /* Allocate bitmap to track nodes that have been visited. */ - visited = sbitmap_alloc (n_basic_blocks); + visited = sbitmap_alloc (last_basic_block); /* None of the nodes in the CFG have been visited yet. */ sbitmap_zero (visited); @@ -1030,22 +931,23 @@ flow_preorder_transversal_compute (pot_order) 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 (n_basic_blocks, + dfst = (struct dfst_node *) xcalloc (last_basic_block, sizeof (struct dfst_node)); - for (i = 0; i < n_basic_blocks; i++) + FOR_EACH_BB (bb) { max_successors = 0; - for (e = BASIC_BLOCK (i)->succ; e; e = e->succ_next) + for (e = bb->succ; e; e = e->succ_next) max_successors++; - dfst[i].node + dfst[bb->index].node = (max_successors ? (struct dfst_node **) xcalloc (max_successors, sizeof (struct dfst_node *)) @@ -1053,7 +955,7 @@ flow_preorder_transversal_compute (pot_order) } /* Allocate bitmap to track nodes that have been visited. */ - visited = sbitmap_alloc (n_basic_blocks); + visited = sbitmap_alloc (last_basic_block); /* None of the nodes in the CFG have been visited yet. */ sbitmap_zero (visited); @@ -1104,7 +1006,7 @@ flow_preorder_transversal_compute (pot_order) walking the tree from right to left. */ i = 0; - node = &dfst[0]; + node = &dfst[ENTRY_BLOCK_PTR->next_bb->index]; pot_order[i++] = 0; while (node) @@ -1120,7 +1022,7 @@ flow_preorder_transversal_compute (pot_order) /* Free the tree. */ - for (i = 0; i < n_basic_blocks; i++) + for (i = 0; i < last_basic_block; i++) if (dfst[i].node) free (dfst[i].node); @@ -1154,7 +1056,7 @@ flow_preorder_transversal_compute (pot_order) /* 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 + search context. If INITIALIZE_STACK is nonzero, there is an element on the stack. */ static void @@ -1167,7 +1069,7 @@ flow_dfs_compute_reverse_init (data) data->sp = 0; /* Allocate bitmap to track nodes that have been visited. */ - data->visited_blocks = sbitmap_alloc (n_basic_blocks - (INVALID_BLOCK + 1)); + 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); @@ -1199,7 +1101,6 @@ flow_dfs_compute_reverse_execute (data) { basic_block bb; edge e; - int i; while (data->sp > 0) { @@ -1213,9 +1114,9 @@ flow_dfs_compute_reverse_execute (data) } /* 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)); + 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; } @@ -1230,3 +1131,54 @@ flow_dfs_compute_reverse_finish (data) 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 --git a/contrib/gcc/cfgbuild.c b/contrib/gcc/cfgbuild.c index 3a5af2d..795ae17 100644 --- a/contrib/gcc/cfgbuild.c +++ b/contrib/gcc/cfgbuild.c @@ -1,6 +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. + 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. This file is part of GCC. @@ -45,12 +45,12 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #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_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)); @@ -102,35 +102,35 @@ control_flow_insn_p (insn) 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 (); + 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 (); } } @@ -205,9 +205,9 @@ find_label_refs (f, lvl) 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)) + && GET_CODE (next) == JUMP_INSN + && (GET_CODE (PATTERN (next)) == ADDR_VEC + || GET_CODE (PATTERN (next)) == ADDR_DIFF_VEC)) ; else if (GET_CODE (lab) == NOTE) ; @@ -279,9 +279,10 @@ make_eh_edge (edge_cache, src, insn) static void make_edges (label_value_list, min, max, update_p) rtx label_value_list; - int min, max, update_p; + basic_block min, max; + int update_p; { - int i; + basic_block bb; sbitmap *edge_cache = NULL; /* Assume no computed jump; revise as we create edges. */ @@ -290,35 +291,35 @@ make_edges (label_value_list, min, max, update_p) /* 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) + if (forced_labels || label_value_list || cfun->max_jumptable_ents > 100) { - edge_cache = sbitmap_vector_alloc (n_basic_blocks, n_basic_blocks); - sbitmap_vector_zero (edge_cache, n_basic_blocks); + edge_cache = sbitmap_vector_alloc (last_basic_block, last_basic_block); + sbitmap_vector_zero (edge_cache, last_basic_block); if (update_p) - for (i = min; i <= max; ++i) + FOR_BB_BETWEEN (bb, min, max->next_bb, next_bb) { edge e; - for (e = BASIC_BLOCK (i)->succ; e ; e = e->succ_next) + for (e = bb->succ; e ; e = e->succ_next) if (e->dest != EXIT_BLOCK_PTR) - SET_BIT (edge_cache[i], e->dest->index); + SET_BIT (edge_cache[bb->index], 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), + /* 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 (i = min; i <= max; ++i) + FOR_BB_BETWEEN (bb, min, max->next_bb, next_bb) { - 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)) + 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 @@ -442,16 +443,15 @@ make_edges (label_value_list, min, max, update_p) /* 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)) + if (!insn || (bb->next_bb == EXIT_BLOCK_PTR && force_fallthru)) cached_make_edge (edge_cache, bb, EXIT_BLOCK_PTR, EDGE_FALLTHRU); - else if (i + 1 < n_basic_blocks) + else if (bb->next_bb != EXIT_BLOCK_PTR) { - rtx tmp = BLOCK_HEAD (i + 1); + 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, BASIC_BLOCK (i + 1), - EDGE_FALLTHRU); + cached_make_edge (edge_cache, bb, bb->next_bb, EDGE_FALLTHRU); } } @@ -469,12 +469,12 @@ find_basic_blocks_1 (f) 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; + 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 @@ -491,7 +491,7 @@ find_basic_blocks_1 (f) if ((GET_CODE (insn) == CODE_LABEL || GET_CODE (insn) == BARRIER) && head) { - create_basic_block_structure (i++, head, end, bb_note); + prev = create_basic_block_structure (head, end, bb_note, prev); head = end = NULL_RTX; bb_note = NULL_RTX; } @@ -505,7 +505,7 @@ find_basic_blocks_1 (f) if (head && control_flow_insn_p (insn)) { - create_basic_block_structure (i++, head, end, bb_note); + prev = create_basic_block_structure (head, end, bb_note, prev); head = end = NULL_RTX; bb_note = NULL_RTX; } @@ -587,15 +587,16 @@ find_basic_blocks_1 (f) } if (head != NULL_RTX) - create_basic_block_structure (i++, head, end, bb_note); + create_basic_block_structure (head, end, bb_note, prev); else if (bb_note) delete_insn (bb_note); - if (i != n_basic_blocks) + if (last_basic_block != n_basic_blocks) abort (); label_value_list = lvl; tail_recursion_label_list = trll; + clear_aux_for_blocks (); } @@ -609,28 +610,28 @@ find_basic_blocks (f, nregs, file) int nregs ATTRIBUTE_UNUSED; FILE *file ATTRIBUTE_UNUSED; { - int max_uid; - timevar_push (TV_CFG); + basic_block bb; - basic_block_for_insn = 0; + timevar_push (TV_CFG); /* 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; + 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 @@ -644,22 +645,8 @@ find_basic_blocks (f, nregs, file) 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); + 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. */ @@ -710,7 +697,7 @@ find_bb_boundaries (bb) bb = fallthru->dest; remove_edge (fallthru); flow_transfer_insn = NULL_RTX; - if (LABEL_ALTERNATE_NAME (insn)) + if (LABEL_ALT_ENTRY_P (insn)) make_edge (ENTRY_BLOCK_PTR, bb, 0); } @@ -788,25 +775,24 @@ void find_many_sub_basic_blocks (blocks) sbitmap blocks; { - int i; - int min, max; + basic_block bb, 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_EACH_BB (bb) + SET_STATE (bb, + TEST_BIT (blocks, bb->index) ? 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_EACH_BB (bb) + if (STATE (bb) == BLOCK_TO_SPLIT) + find_bb_boundaries (bb); - for (i = 0; i < n_basic_blocks; i++) - if (STATE (BASIC_BLOCK (i)) != BLOCK_ORIGINAL) + FOR_EACH_BB (bb) + if (STATE (bb) != BLOCK_ORIGINAL) break; - min = max = i; - for (; i < n_basic_blocks; i++) - if (STATE (BASIC_BLOCK (i)) != BLOCK_ORIGINAL) - max = i; + 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. */ @@ -814,45 +800,42 @@ find_many_sub_basic_blocks (blocks) /* Update branch probabilities. Expect only (un)conditional jumps to be created with only the forward edges. */ - for (i = min; i <= max; i++) + FOR_BB_BETWEEN (bb, min, max->next_bb, next_bb) { edge e; - basic_block b = BASIC_BLOCK (i); - if (STATE (b) == BLOCK_ORIGINAL) + if (STATE (bb) == BLOCK_ORIGINAL) continue; - if (STATE (b) == BLOCK_NEW) + if (STATE (bb) == BLOCK_NEW) { - b->count = 0; - b->frequency = 0; - for (e = b->pred; e; e=e->pred_next) + bb->count = 0; + bb->frequency = 0; + for (e = bb->pred; e; e=e->pred_next) { - b->count += e->count; - b->frequency += EDGE_FREQUENCY (e); + bb->count += e->count; + bb->frequency += EDGE_FREQUENCY (e); } } - compute_outgoing_frequencies (b); + compute_outgoing_frequencies (bb); } - for (i = 0; i < n_basic_blocks; i++) - SET_STATE (BASIC_BLOCK (i), 0); + 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 bb; { - int i; - int min, max; - basic_block next = (bb->index == n_basic_blocks - 1 - ? NULL : BASIC_BLOCK (bb->index + 1)); + basic_block min, max, b; + basic_block next = bb->next_bb; - min = bb->index; + min = bb; find_bb_boundaries (bb); - max = (next ? next->index : n_basic_blocks) - 1; + 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. */ @@ -860,12 +843,11 @@ find_sub_basic_blocks (bb) /* Update branch probabilities. Expect only (un)conditional jumps to be created with only the forward edges. */ - for (i = min; i <= max; i++) + FOR_BB_BETWEEN (b, min, max->next_bb, next_bb) { edge e; - basic_block b = BASIC_BLOCK (i); - if (i != min) + if (b != min) { b->count = 0; b->frequency = 0; diff --git a/contrib/gcc/cfgcleanup.c b/contrib/gcc/cfgcleanup.c index 9589d1f..008c8da 100644 --- a/contrib/gcc/cfgcleanup.c +++ b/contrib/gcc/cfgcleanup.c @@ -43,20 +43,18 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include "recog.h" #include "toplev.h" #include "cselib.h" +#include "params.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 + BB_FORWARDER_BLOCK = 1, + BB_NONTHREADABLE_BLOCK = 2 }; #define BB_FLAGS(BB) (enum bb_flags) (BB)->aux @@ -75,7 +73,6 @@ static int flow_find_cross_jump PARAMS ((int, basic_block, basic_block, 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, @@ -91,6 +88,7 @@ static edge thread_jump PARAMS ((int, edge, basic_block)); 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. */ @@ -101,7 +99,6 @@ notice_new_block (bb) if (!bb) return; - BB_SET_FLAG (bb, BB_UPDATE_LIFE); if (forwarder_block_p (bb)) BB_SET_FLAG (bb, BB_FORWARDER_BLOCK); } @@ -149,7 +146,7 @@ try_simplify_condjump (cbranch_block) unconditional jump. */ jump_block = cbranch_fallthru_edge->dest; if (jump_block->pred->pred_next - || jump_block->index == n_basic_blocks - 1 + || jump_block->next_bb == EXIT_BLOCK_PTR || !FORWARDER_BLOCK_P (jump_block)) return false; jump_dest_block = jump_block->succ->dest; @@ -192,8 +189,8 @@ try_simplify_condjump (cbranch_block) static bool mark_effect (exp, nonequal) - rtx exp; - regset nonequal; + rtx exp; + regset nonequal; { int regno; rtx dest; @@ -201,43 +198,69 @@ mark_effect (exp, nonequal) { /* 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 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); - } + case SET: + if (rtx_equal_for_cselib_p (SET_DEST (exp), SET_SRC (exp))) return false; - - default: + 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. */ @@ -255,18 +278,29 @@ thread_jump (mode, e, b) 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) - return NULL; + { + 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) || !any_condjump_p (b->end) - || !onlyjump_p (b->end)) + 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) @@ -300,7 +334,10 @@ thread_jump (mode, e, b) 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; + { + BB_SET_FLAG (b, BB_NONTHREADABLE_BLOCK); + return NULL; + } cselib_init (); @@ -319,26 +356,34 @@ thread_jump (mode, e, b) 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); - } + { + 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); - } + 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 @@ -455,10 +500,10 @@ try_forward_edges (mode, b) 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) + if ((mode & CLEANUP_PRE_LOOP) && optimize) { rtx insn = (target->succ->flags & EDGE_FALLTHRU - ? target->head : prev_nonnote_insn (target->end)); + ? target->head : prev_nonnote_insn (target->end)); if (GET_CODE (insn) != NOTE) insn = NEXT_INSN (insn); @@ -469,14 +514,23 @@ try_forward_edges (mode, b) && NOTE_LINE_NUMBER (insn) == NOTE_INSN_LOOP_BEG) break; - if (insn && GET_CODE (insn) == NOTE) + 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) { @@ -499,7 +553,7 @@ try_forward_edges (mode, b) { notice_new_block (redirect_edge_and_branch_force (e, target)); if (rtl_dump_file) - fprintf (rtl_dump_file, "Conditionals threaded.\n"); + fprintf (rtl_dump_file, "Conditionals threaded.\n"); } else if (!redirect_edge_and_branch (e, target)) { @@ -519,7 +573,6 @@ try_forward_edges (mode, b) if (!FORWARDER_BLOCK_P (b) && forwarder_block_p (b)) BB_SET_FLAG (b, BB_FORWARDER_BLOCK); - BB_SET_FLAG (b, BB_UPDATE_LIFE); do { @@ -569,7 +622,7 @@ try_forward_edges (mode, b) && first == threaded_edges [n]->src) n++; t = first->succ; - } + } t->count -= edge_count; if (t->count < 0) @@ -643,7 +696,6 @@ merge_blocks_move_predecessor_nojumps (a, b) basic_block a, b; { rtx barrier; - int index; barrier = next_nonnote_insn (a->end); if (GET_CODE (barrier) != BARRIER) @@ -663,20 +715,16 @@ merge_blocks_move_predecessor_nojumps (a, b) /* 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); + 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. 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; + /* 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); @@ -729,13 +777,12 @@ merge_blocks_move_successor_nojumps (a, b) /* 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); + + /* Now blocks A and B are contiguous. Merge them. */ + merge_blocks_nomove (a, b); } /* Attempt to merge basic blocks that are potentially non-adjacent. @@ -760,18 +807,12 @@ merge_blocks (e, b, c, mode) 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); + b_index, c_index); return true; } @@ -831,8 +872,6 @@ merge_blocks (e, b, c, mode) 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); @@ -847,8 +886,8 @@ merge_blocks (e, b, c, mode) static bool insns_match_p (mode, i1, i2) - int mode ATTRIBUTE_UNUSED; - rtx i1, i2; + int mode ATTRIBUTE_UNUSED; + rtx i1, i2; { rtx p1, p2; @@ -873,8 +912,9 @@ insns_match_p (mode, i1, i2) equal, they were constructed identically. */ if (GET_CODE (i1) == CALL_INSN - && !rtx_equal_p (CALL_INSN_FUNCTION_USAGE (i1), - CALL_INSN_FUNCTION_USAGE (i2))) + && (!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 @@ -988,10 +1028,10 @@ flow_find_cross_jump (mode, bb1, bb2, f1, f2) while (true) { /* Ignore notes. */ - while (!active_insn_p (i1) && i1 != bb1->head) + while (!INSN_P (i1) && i1 != bb1->head) i1 = PREV_INSN (i1); - while (!active_insn_p (i2) && i2 != bb2->head) + while (!INSN_P (i2) && i2 != bb2->head) i2 = PREV_INSN (i2); if (i1 == bb1->head || i2 == bb2->head) @@ -1000,8 +1040,8 @@ flow_find_cross_jump (mode, bb1, bb2, f1, f2) if (!insns_match_p (mode, i1, i2)) break; - /* Don't begin a cross-jump with a USE or CLOBBER insn. */ - if (active_insn_p (i1)) + /* Don't begin a cross-jump with a NOTE insn. */ + if (INSN_P (i1)) { /* If the merged insns have different REG_EQUAL notes, then remove them. */ @@ -1018,10 +1058,10 @@ flow_find_cross_jump (mode, bb1, bb2, f1, f2) remove_note (i1, equiv1); remove_note (i2, equiv2); } - + afterlast1 = last1, afterlast2 = last2; last1 = i1, last2 = i2; - ninsns++; + ninsns++; } i1 = PREV_INSN (i1); @@ -1040,13 +1080,13 @@ flow_find_cross_jump (mode, bb1, bb2, f1, f2) Two, it keeps line number notes as matched as may be. */ if (ninsns) { - while (last1 != bb1->head && !active_insn_p (PREV_INSN (last1))) + while (last1 != bb1->head && !INSN_P (PREV_INSN (last1))) last1 = PREV_INSN (last1); if (last1 != bb1->head && GET_CODE (PREV_INSN (last1)) == CODE_LABEL) last1 = PREV_INSN (last1); - while (last2 != bb2->head && !active_insn_p (PREV_INSN (last2))) + while (last2 != bb2->head && !INSN_P (PREV_INSN (last2))) last2 = PREV_INSN (last2); if (last2 != bb2->head && GET_CODE (PREV_INSN (last2)) == CODE_LABEL) @@ -1078,9 +1118,11 @@ outgoing_edges_match (mode, bb1, bb2) /* If BB1 has only one successor, we may be looking at either an unconditional jump, or a fake edge to exit. */ if (bb1->succ && !bb1->succ->succ_next - && !(bb1->succ->flags & (EDGE_COMPLEX | EDGE_FAKE))) + && (bb1->succ->flags & (EDGE_COMPLEX | EDGE_FAKE)) == 0 + && (GET_CODE (bb1->end) != JUMP_INSN || simplejump_p (bb1->end))) return (bb2->succ && !bb2->succ->succ_next - && (bb2->succ->flags & (EDGE_COMPLEX | EDGE_FAKE)) == 0); + && (bb2->succ->flags & (EDGE_COMPLEX | EDGE_FAKE)) == 0 + && (GET_CODE (bb2->end) != JUMP_INSN || simplejump_p (bb2->end))); /* Match conditional jumps - this may get tricky when fallthru and branch edges are crossed. */ @@ -1096,7 +1138,7 @@ outgoing_edges_match (mode, bb1, bb2) enum rtx_code code1, code2; if (!bb2->succ - || !bb2->succ->succ_next + || !bb2->succ->succ_next || bb2->succ->succ_next->succ_next || !any_condjump_p (bb2->end) || !onlyjump_p (bb2->end)) @@ -1175,8 +1217,8 @@ outgoing_edges_match (mode, bb1, bb2) roughly similar. */ if (match && !optimize_size - && bb1->frequency > BB_FREQ_MAX / 1000 - && bb2->frequency > BB_FREQ_MAX / 1000) + && maybe_hot_bb_p (bb1) + && maybe_hot_bb_p (bb2)) { int prob2; @@ -1207,7 +1249,7 @@ outgoing_edges_match (mode, bb1, bb2) return match; } - /* Generic case - we are seeing an computed jump, table jump or trapping + /* Generic case - we are seeing a computed jump, table jump or trapping instruction. */ /* First ensure that the instructions match. There may be many outgoing @@ -1245,9 +1287,9 @@ outgoing_edges_match (mode, bb1, bb2) if (fallthru1) { basic_block d1 = (forwarder_block_p (fallthru1->dest) - ? fallthru1->dest->succ->dest: fallthru1->dest); + ? fallthru1->dest->succ->dest: fallthru1->dest); basic_block d2 = (forwarder_block_p (fallthru2->dest) - ? fallthru2->dest->succ->dest: fallthru2->dest); + ? fallthru2->dest->succ->dest: fallthru2->dest); if (d1 != d2) return false; @@ -1279,21 +1321,21 @@ try_crossjump_to_edge (mode, e1, e2) { int nmatch; basic_block src1 = e1->src, src2 = e2->src; - basic_block redirect_to; + basic_block redirect_to, redirect_from, to_remove; 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 + && !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; @@ -1344,6 +1386,8 @@ try_crossjump_to_edge (mode, e1, e2) 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) @@ -1407,29 +1451,14 @@ try_crossjump_to_edge (mode, e1, e2) 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)++; + redirect_from = split_block (src1, PREV_INSN (newpos1))->src; + to_remove = redirect_from->succ->dest; - /* Delete the now unreachable instructions. */ - delete_insn_chain (newpos1, last); + redirect_edge_and_branch_force (redirect_from->succ, redirect_to); + flow_delete_block (to_remove); - /* 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); + update_forwarder_flag (redirect_from); return true; } @@ -1445,6 +1474,7 @@ try_crossjump_bb (mode, bb) { 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) @@ -1453,9 +1483,15 @@ try_crossjump_bb (mode, bb) /* 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; + 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) @@ -1530,17 +1566,19 @@ static bool try_optimize_cfg (mode) int mode; { - int i; bool changed_overall = false; bool changed; int iterations = 0; - sbitmap blocks; + basic_block bb, b; if (mode & CLEANUP_CROSSJUMP) add_noreturn_fake_exit_edges (); - for (i = 0; i < n_basic_blocks; i++) - update_forwarder_flag (BASIC_BLOCK (i)); + FOR_EACH_BB (bb) + update_forwarder_flag (bb); + + if (mode & CLEANUP_UPDATE_LIFE) + clear_bb_flags (); if (! (* targetm.cannot_modify_jumps_p) ()) { @@ -1557,16 +1595,16 @@ try_optimize_cfg (mode) "\n\ntry_optimize_cfg iteration %i\n\n", iterations); - for (i = 0; i < n_basic_blocks;) + for (b = ENTRY_BLOCK_PTR->next_bb; b != EXIT_BLOCK_PTR;) { - basic_block c, b = BASIC_BLOCK (i); + basic_block c; edge s; bool changed_here = false; /* Delete trivially dead basic blocks. */ while (b->pred == NULL) { - c = BASIC_BLOCK (b->index - 1); + c = b->prev_bb; if (rtl_dump_file) fprintf (rtl_dump_file, "Deleting block %i.\n", b->index); @@ -1620,7 +1658,7 @@ try_optimize_cfg (mode) "Deleting fallthru block %i.\n", b->index); - c = BASIC_BLOCK (b->index ? b->index - 1 : 1); + 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; @@ -1638,17 +1676,15 @@ try_optimize_cfg (mode) /* If the jump insn has side effects, we can't kill the edge. */ && (GET_CODE (b->end) != JUMP_INSN - || (onlyjump_p (b->end) - && !tablejump_p (b->end))) + || (flow2_completed + ? simplejump_p (b->end) + : onlyjump_p (b->end))) && merge_blocks (s, b, c, mode)) changed_here = true; /* Simplify branch over branch. */ if ((mode & CLEANUP_EXPENSIVE) && try_simplify_condjump (b)) - { - BB_SET_FLAG (b, BB_UPDATE_LIFE); - changed_here = true; - } + changed_here = true; /* If B has a single outgoing edge, but uses a non-trivial jump instruction without side-effects, we @@ -1661,7 +1697,6 @@ try_optimize_cfg (mode) && 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; } @@ -1678,7 +1713,7 @@ try_optimize_cfg (mode) /* Don't get confused by the index shift caused by deleting blocks. */ if (!changed_here) - i = b->index + 1; + b = b->next_bb; else changed = true; } @@ -1700,64 +1735,33 @@ try_optimize_cfg (mode) 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; + clear_aux_for_blocks (); return changed_overall; } /* Delete all unreachable basic blocks. */ -static bool +bool delete_unreachable_blocks () { - int i, j; bool changed = false; + basic_block b, next_bb; 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. */ + /* Delete all unreachable basic blocks. */ - for (i = j = 0; i < n_basic_blocks; ++i) + for (b = ENTRY_BLOCK_PTR->next_bb; b != EXIT_BLOCK_PTR; b = next_bb) { - basic_block b = BASIC_BLOCK (i); + next_bb = b->next_bb; if (!(b->flags & BB_REACHABLE)) { - flow_delete_block_noexpunge (b); - expunge_block_nocompact (b); + flow_delete_block (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 (); @@ -1773,13 +1777,48 @@ cleanup_cfg (mode) bool changed = false; timevar_push (TV_CLEANUP_CFG); - changed = delete_unreachable_blocks (); - if (try_optimize_cfg (mode)) - delete_unreachable_blocks (), changed = true; + 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); - free_EXPR_LIST_list (&tail_recursion_label_list); timevar_pop (TV_CLEANUP_CFG); return changed; diff --git a/contrib/gcc/cfglayout.c b/contrib/gcc/cfglayout.c index 329e9f8..ca5f475 100644 --- a/contrib/gcc/cfglayout.c +++ b/contrib/gcc/cfglayout.c @@ -35,7 +35,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA extern struct obstack flow_obstack; /* Holds the interesting trailing notes for the function. */ -static rtx function_tail_eff_head; +static rtx function_footer; static rtx skip_insns_after_block PARAMS ((basic_block)); static void record_effective_endpoints PARAMS ((void)); @@ -46,10 +46,31 @@ static void set_block_levels PARAMS ((tree, int)); 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)); - -/* Map insn uid to lexical block. */ -static varray_type insn_scopes; +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, @@ -62,8 +83,8 @@ skip_insns_after_block (bb) 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; + if (bb->next_bb != EXIT_BLOCK_PTR) + next_head = bb->next_bb->head; for (last_insn = insn = bb->end; (insn = NEXT_INSN (insn)) != 0; ) { @@ -103,7 +124,7 @@ skip_insns_after_block (bb) last_insn = insn; continue; } - break; + break; default: break; @@ -113,7 +134,7 @@ skip_insns_after_block (bb) } /* It is possible to hit contradictory sequence. For instance: - + jump_insn NOTE_INSN_LOOP_BEG barrier @@ -128,14 +149,14 @@ skip_insns_after_block (bb) 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: + case NOTE_INSN_LOOP_END: + case NOTE_INSN_BLOCK_END: + case NOTE_INSN_DELETED: + case NOTE_INSN_DELETED_LABEL: continue; - default: + default: reorder_insns (insn, insn, last_insn); - } + } } return last_insn; @@ -155,8 +176,6 @@ label_for_bb (bb) 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; @@ -169,20 +188,24 @@ static void record_effective_endpoints () { rtx next_insn = get_insns (); - int i; - - for (i = 0; i < n_basic_blocks; i++) + basic_block bb; + + FOR_EACH_BB (bb) { - basic_block bb = BASIC_BLOCK (i); rtx end; - RBI (bb)->eff_head = next_insn; + 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); - RBI (bb)->eff_end = end; - next_insn = NEXT_INSN (end); + 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_tail_eff_head = next_insn; + 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. */ @@ -193,8 +216,6 @@ scope_to_insns_initialize () 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); @@ -202,7 +223,7 @@ scope_to_insns_initialize () 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; + INSN_SCOPE (insn) = block; else if (GET_CODE (insn) == NOTE) { switch (NOTE_LINE_NUMBER (insn)) @@ -220,6 +241,10 @@ scope_to_insns_initialize () } } } + + /* 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 @@ -237,7 +262,21 @@ set_block_levels (block, level) 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 @@ -294,17 +333,26 @@ scope_to_insns_finalize () 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)) + insn = get_insns (); + if (!active_insn_p (insn)) + insn = next_active_insn (insn); + for (; insn; insn = next_active_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)); + 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; @@ -315,8 +363,6 @@ scope_to_insns_finalize () } } - 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)); @@ -330,32 +376,49 @@ scope_to_insns_finalize () static void fixup_reorder_chain () { - basic_block bb, last_bb; + basic_block bb, prev_bb; int index; - rtx insn; - int old_n_basic_blocks = n_basic_blocks; + rtx insn = NULL; /* 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; + for (bb = ENTRY_BLOCK_PTR->next_bb, index = 0; bb != 0; - last_bb = bb, bb = RBI (bb)->next, index++) + 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 (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 (); - 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; + NEXT_INSN (insn) = function_footer; + if (function_footer) + PREV_INSN (function_footer) = insn; while (NEXT_INSN (insn)) insn = NEXT_INSN (insn); @@ -368,7 +431,7 @@ fixup_reorder_chain () /* Now add jumps and labels as needed to match the blocks new outgoing edges. */ - for (bb = BASIC_BLOCK (0); bb ; bb = RBI (bb)->next) + for (bb = ENTRY_BLOCK_PTR->next_bb; bb ; bb = RBI (bb)->next) { edge e_fall, e_taken, e; rtx bb_end_insn; @@ -397,11 +460,44 @@ fixup_reorder_chain () && 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. */ - if (RBI (bb)->next != e_taken->dest) + else if (RBI (bb)->next != e_taken->dest) { rtx note = find_reg_note (bb_end_insn, REG_BR_PROB, 0); @@ -417,7 +513,7 @@ fixup_reorder_chain () } } - /* Otherwise we can try to invert the jump. This will + /* 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)) @@ -470,8 +566,6 @@ fixup_reorder_chain () 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; @@ -481,23 +575,38 @@ fixup_reorder_chain () } /* 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); + 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. @@ -530,10 +639,70 @@ verify_insn_chain () 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); -/* The block falling through to exit must be the last one in the reordered - chain. Ensure it is. */ + 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 () { @@ -546,7 +715,7 @@ fixup_fallthru_exit_predecessor () if (bb && RBI (bb)->next) { - basic_block c = BASIC_BLOCK (0); + basic_block c = ENTRY_BLOCK_PTR->next_bb; while (RBI (c)->next != bb) c = RBI (c)->next; @@ -560,15 +729,279 @@ fixup_fallthru_exit_predecessor () } } -/* Main entry point to this module: initialize the datastructures for CFG - layout changes. */ +/* 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)); - scope_to_insns_initialize (); + cleanup_unconditional_jumps (); record_effective_endpoints (); } @@ -586,8 +1019,6 @@ cfg_layout_finalize () verify_insn_chain (); #endif - scope_to_insns_finalize (); - free_aux_for_blocks (); #ifdef ENABLE_CHECKING diff --git a/contrib/gcc/cfglayout.h b/contrib/gcc/cfglayout.h index 3b12e50..e4e27d0 100644 --- a/contrib/gcc/cfglayout.h +++ b/contrib/gcc/cfglayout.h @@ -21,9 +21,12 @@ /* Structure to hold information about the blocks during reordering. */ typedef struct reorder_block_def { - rtx eff_head; - rtx eff_end; + rtx header; + rtx footer; basic_block next; + basic_block original; + + /* These fields are used by bb-reorder pass. */ int visited; } *reorder_block_def; @@ -31,6 +34,8 @@ typedef struct reorder_block_def 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 --git a/contrib/gcc/cfgloop.c b/contrib/gcc/cfgloop.c index 2bd0d4c..0a2829f 100644 --- a/contrib/gcc/cfgloop.c +++ b/contrib/gcc/cfgloop.c @@ -23,24 +23,28 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #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 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_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, - 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)); + 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. */ @@ -50,18 +54,19 @@ flow_loops_cfg_dump (loops, file) FILE *file; { int i; + basic_block bb; if (! loops->num || ! file || ! loops->cfg.dom) return; - for (i = 0; i < n_basic_blocks; i++) + FOR_EACH_BB (bb) { edge succ; - fprintf (file, ";; %d succs { ", i); - for (succ = BASIC_BLOCK (i)->succ; succ; succ = succ->succ_next) + fprintf (file, ";; %d succs { ", bb->index); + for (succ = bb->succ; succ; succ = succ->succ_next) fprintf (file, "%d ", succ->dest->index); - flow_nodes_print ("} dom", loops->cfg.dom[i], file); + fprintf (file, "}\n"); } /* Dump the DFS node order. */ @@ -85,14 +90,15 @@ flow_loops_cfg_dump (loops, file) } } -/* Return non-zero if the nodes of LOOP are a subset of OUTER. */ +/* Return nonzero if the nodes of LOOP are a subset of OUTER. */ -static int +bool flow_loop_nested_p (outer, loop) - struct loop *outer; - struct loop *loop; + const struct loop *outer; + const struct loop *loop; { - return sbitmap_a_subset_b_p (loop->nodes, outer->nodes); + return loop->depth > outer->depth + && loop->pred[outer->depth] == outer; } /* Dump the loop information specified by LOOP to the stream FILE @@ -105,22 +111,18 @@ flow_loop_dump (loop, file, loop_dump_aux, verbose) void (*loop_dump_aux) PARAMS((const struct loop *, FILE *, int)); int verbose; { + basic_block *bbs; + int i; + 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, ";;\n;; Loop %d:%s\n", loop->num, + loop->invalid ? " invalid" : ""); - fprintf (file, ";; header %d, latch %d, pre-header %d, first %d, last %d\n", + fprintf (file, ";; header %d, latch %d, pre-header %d\n", loop->header->index, loop->latch->index, - loop->pre_header ? loop->pre_header->index : -1, - loop->first->index, loop->last->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)); @@ -131,14 +133,15 @@ flow_loop_dump (loop, file, loop_dump_aux, verbose) 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); + 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->exits_doms) - flow_nodes_print (";; exit doms", loop->exits_doms, file); - if (loop_dump_aux) loop_dump_aux (loop, file, verbose); } @@ -153,55 +156,53 @@ flow_loops_dump (loops, file, loop_dump_aux, verbose) void (*loop_dump_aux) PARAMS((const struct loop *, FILE *, int)); int verbose; { - int i, j; + 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); + 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]; + struct loop *loop = loops->parray[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) + continue; - 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"); - } - } + 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->array) + if (loops->parray) { int i; @@ -211,180 +212,163 @@ flow_loops_free (loops) /* 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); + struct loop *loop = loops->parray[i]; + + if (!loop) + continue; + + flow_loop_free (loop); } - free (loops->array); - loops->array = NULL; + free (loops->parray); + loops->parray = NULL; if (loops->cfg.dom) - sbitmap_vector_free (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); - 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. */ +/* Find the entry edges into the LOOP. */ -static int -flow_loop_entry_edges_find (header, nodes, entry_edges) - basic_block header; - const sbitmap nodes; - edge **entry_edges; +static void +flow_loop_entry_edges_find (loop) + struct loop *loop; { edge e; int num_entries; - *entry_edges = NULL; - num_entries = 0; - for (e = header->pred; e; e = e->pred_next) + for (e = loop->header->pred; e; e = e->pred_next) { - basic_block src = e->src; - - if (src == ENTRY_BLOCK_PTR || ! TEST_BIT (nodes, src->index)) + if (flow_loop_outside_edge_p (loop, e)) num_entries++; } if (! num_entries) abort (); - *entry_edges = (edge *) xmalloc (num_entries * sizeof (edge)); + loop->entry_edges = (edge *) xmalloc (num_entries * sizeof (edge *)); num_entries = 0; - for (e = header->pred; e; e = e->pred_next) + for (e = loop->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; + if (flow_loop_outside_edge_p (loop, e)) + loop->entry_edges[num_entries++] = e; } - return num_entries; + loop->num_entries = 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. */ +/* Find the exit edges from the LOOP. */ -static int -flow_loop_exit_edges_find (nodes, exit_edges) - const sbitmap nodes; - edge **exit_edges; +static void +flow_loop_exit_edges_find (loop) + struct loop *loop; { edge e; - int node; - int num_exits; + basic_block node, *bbs; + int num_exits, i; - *exit_edges = NULL; + 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 ????? A node can have one jumping edge and one fallthru - edge so only one of these can exit the loop. */ + exiting edges. */ 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; + 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 (dest == EXIT_BLOCK_PTR || ! TEST_BIT (nodes, dest->index)) + if (!flow_bb_inside_loop_p (loop, dest)) num_exits++; - } - }); + } + } if (! num_exits) - return 0; + { + free (bbs); + return; + } - *exit_edges = (edge *) xmalloc (num_exits * sizeof (edge)); + loop->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; + 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 (dest == EXIT_BLOCK_PTR || ! TEST_BIT (nodes, dest->index)) - (*exit_edges)[num_exits++] = e; + if (!flow_bb_inside_loop_p (loop, dest)) + loop->exit_edges[num_exits++] = e; } - }); - - return num_exits; + } + free (bbs); + loop->num_exits = 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. */ +/* 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, latch, nodes) +flow_loop_nodes_find (header, loop) basic_block header; - basic_block latch; - sbitmap nodes; + struct loop *loop; { basic_block *stack; int sp; - int num_nodes = 0; + int num_nodes = 1; + int findex, lindex; - stack = (basic_block *) xmalloc (n_basic_blocks * sizeof (basic_block)); - sp = 0; + header->loop_father = loop; + header->loop_depth = loop->depth; + findex = lindex = header->index; - /* 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)) + if (loop->latch->loop_father != loop) { - SET_BIT (nodes, latch->index); - latch->loop_depth++; + stack = (basic_block *) xmalloc (n_basic_blocks * sizeof (basic_block)); + sp = 0; num_nodes++; - stack[sp++] = latch; - } - - while (sp) - { - basic_block node; - edge e; - - node = stack[--sp]; - for (e = node->pred; e; e = e->pred_next) + stack[sp++] = loop->latch; + loop->latch->loop_father = loop; + loop->latch->loop_depth = loop->depth; + + while (sp) { - basic_block ancestor = e->src; + basic_block node; + edge e; - /* 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)) + node = stack[--sp]; + + for (e = node->pred; e; e = e->pred_next) { - SET_BIT (nodes, ancestor->index); - ancestor->loop_depth++; - num_nodes++; - stack[sp++] = ancestor; + 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); } - free (stack); return num_nodes; } @@ -431,7 +415,7 @@ flow_loop_pre_header_scan (loop) static basic_block flow_loop_pre_header_find (header, dom) basic_block header; - const sbitmap *dom; + dominance_info dom; { basic_block pre_header; edge e; @@ -444,7 +428,7 @@ flow_loop_pre_header_find (header, dom) basic_block node = e->src; if (node != ENTRY_BLOCK_PTR - && ! TEST_BIT (dom[node->index], header->index)) + && ! dominated_by_p (dom, node, header)) { if (pre_header == NULL) pre_header = node; @@ -461,68 +445,55 @@ flow_loop_pre_header_find (header, dom) 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. */ +/* Add LOOP to the loop hierarchy tree where FATHER is father of the + added loop. */ -static void -flow_loop_tree_node_add (prevloop, loop) - struct loop *prevloop; +void +flow_loop_tree_node_add (father, loop) + struct loop *father; 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; + 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; } -/* Build the loop hierarchy tree for LOOPS. */ +/* Remove LOOP from the loop hierarchy tree. */ -static void -flow_loops_tree_build (loops) - struct loops *loops; +void +flow_loop_tree_node_remove (loop) + struct loop *loop; { - int i; - int num_loops; + struct loop *prev, *father; - num_loops = loops->num; - if (! num_loops) - return; + father = loop->outer; + loop->outer = NULL; - /* 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; + /* 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; + } - /* 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]); + 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 at the loop depth DEPTH. - Returns the loop level. */ + for the natural loop specified by LOOP. Returns the loop level. */ static int -flow_loop_level_compute (loop, depth) +flow_loop_level_compute (loop) struct loop *loop; - int depth; { struct loop *inner; int level = 1; @@ -537,13 +508,13 @@ flow_loop_level_compute (loop, depth) itself). */ for (inner = loop->inner; inner; inner = inner->next) { - int ilevel = flow_loop_level_compute (inner, depth + 1) + 1; + int ilevel = flow_loop_level_compute (inner) + 1; - level = MAX (ilevel, level); + if (ilevel > level) + level = ilevel; } loop->level = level; - loop->depth = depth; return level; } @@ -555,18 +526,7 @@ static int 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; + return flow_loop_level_compute (loops->tree_root); } /* Scan a single natural loop specified by LOOP collecting information @@ -578,37 +538,18 @@ flow_loop_scan (loops, loop, flags) 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); + { + /* 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. */ - 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 (); + /* Find edges which exit the loop. */ + flow_loop_exit_edges_find (loop); } if (flags & LOOP_PRE_HEADER) @@ -625,6 +566,189 @@ flow_loop_scan (loops, loop, flags) 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 @@ -640,9 +764,11 @@ flow_loops_find (loops, flags) int num_loops; edge e; sbitmap headers; - sbitmap *dom; + 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 @@ -660,38 +786,79 @@ flow_loops_find (loops, flags) dfs_order = NULL; rc_order = NULL; + /* Join loops with shared headers. */ + canonicalize_loop_headers (); + /* Compute the dominators. */ - dom = sbitmap_vector_alloc (n_basic_blocks, n_basic_blocks); - calculate_dominance_info (NULL, dom, CDI_DOMINATORS); + dom = loops->cfg.dom = calculate_dominance_info (CDI_DOMINATORS); - /* Count the number of loop edges (back edges). This should be the + /* 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 (b = 0; b < n_basic_blocks; b++) + FOR_EACH_BB (header) { - basic_block header; - - header = BASIC_BLOCK (b); + 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. 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++; + 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 @@ -705,104 +872,65 @@ flow_loops_find (loops, flags) 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)); + num_loops = 1; - 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--) + for (b = 0; b < n_basic_blocks; b++) { - basic_block latch; + struct loop *loop; /* Search the nodes of the CFG in reverse completion order so that we can find outer loops first. */ - latch = BASIC_BLOCK (rc_order[b]); + if (!TEST_BIT (headers, rc_order[b])) + continue; - /* 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; + header = BASIC_BLOCK (rc_order[b]); + + loop = loops->parray[num_loops] = xcalloc (1, sizeof (struct loop)); - loop = loops->array + num_loops; + loop->header = header; + loop->num = num_loops; + num_loops++; - loop->header = header; - loop->latch = latch; - loop->num = num_loops; + /* Look for the latch for this header block. */ + for (e = header->pred; e; e = e->pred_next) + { + basic_block latch = e->src; - num_loops++; + if (latch != ENTRY_BLOCK_PTR + && dominated_by_p (dom, latch, header)) + { + loop->latch = latch; + break; } } - } - 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); + flow_loop_tree_node_add (header->loop_father, loop); + loop->num_nodes = flow_loop_nodes_find (loop->header, loop); } - /* 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; + /* Assign the loop nesting depth and enclosed loop level for each + loop. */ + loops->levels = flow_loops_level_compute (loops); - /* Build the loop hierarchy tree. */ - flow_loops_tree_build (loops); + /* Scan the loops. */ + for (i = 1; i < num_loops; i++) + flow_loop_scan (loops, loops->parray[i], flags); - /* Assign the loop nesting depth and enclosed loop level for each - loop. */ - loops->levels = flow_loops_level_compute (loops); + 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 num_loops; + return loops->num; } /* Update the information regarding the loops in the CFG @@ -815,22 +943,259 @@ flow_loops_update (loops, flags) { /* 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) + if (loops->parray) flow_loops_free (loops); return flow_loops_find (loops, flags); } -/* Return non-zero if edge E enters header of LOOP from outside of LOOP. */ +/* 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; -int + 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); +} - return (e->src == ENTRY_BLOCK_PTR) - || ! TEST_BIT (loop->nodes, e->src->index); +/* 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 --git a/contrib/gcc/cfgrtl.c b/contrib/gcc/cfgrtl.c index e2cb773..7780ca5 100644 --- a/contrib/gcc/cfgrtl.c +++ b/contrib/gcc/cfgrtl.c @@ -56,6 +56,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #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 @@ -63,9 +64,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #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. */ @@ -74,7 +72,7 @@ rtx tail_recursion_label_list; 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 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)); @@ -88,7 +86,8 @@ can_delete_note_p (note) rtx note; { return (NOTE_LINE_NUMBER (note) == NOTE_INSN_DELETED - || NOTE_LINE_NUMBER (note) == NOTE_INSN_BASIC_BLOCK); + || NOTE_LINE_NUMBER (note) == NOTE_INSN_BASIC_BLOCK + || NOTE_LINE_NUMBER (note) == NOTE_INSN_PREDICTION); } /* True if a given label can be deleted. */ @@ -117,7 +116,7 @@ delete_insn (insn) 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. + might be references via variables, constant pool etc. Convert them to the special NOTE_INSN_DELETED_LABEL note. */ if (! can_delete_label_p (insn)) { @@ -177,6 +176,24 @@ delete_insn (insn) 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. */ @@ -202,18 +219,35 @@ delete_insn_chain (start, finish) 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. */ + 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 (index, head, end, bb_note) - int index; +create_basic_block_structure (head, end, bb_note, after) rtx head, end, bb_note; + basic_block after; { basic_block bb; @@ -235,7 +269,7 @@ create_basic_block_structure (index, head, end, bb_note) } if (after != bb_note && NEXT_INSN (after) != bb_note) - reorder_insns (bb_note, bb_note, after); + reorder_insns_nobb (bb_note, bb_note, after); } else { @@ -269,10 +303,11 @@ create_basic_block_structure (index, head, end, bb_note) bb->head = head; bb->end = end; - bb->index = index; - BASIC_BLOCK (index) = bb; - if (basic_block_for_insn) - update_bb_for_insn (bb); + 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. */ @@ -282,33 +317,23 @@ create_basic_block_structure (index, head, end, bb_note) } /* 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 + 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 (index, head, end) - int index; +create_basic_block (head, end, after) rtx head, end; + basic_block after; { basic_block bb; - int i; - /* Place the new block just after the block being split. */ - VARRAY_GROW (basic_block_info, ++n_basic_blocks); + /* Place the new block just after the end. */ + VARRAY_GROW (basic_block_info, last_basic_block+1); - /* 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; - } + n_basic_blocks++; - bb = create_basic_block_structure (index, head, end, NULL); + bb = create_basic_block_structure (head, end, NULL, after); bb->aux = NULL; return bb; } @@ -335,6 +360,18 @@ flow_delete_block_noexpunge (b) 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); @@ -379,38 +416,28 @@ flow_delete_block (b) basic_block b; { int deleted_handler = flow_delete_block_noexpunge (b); - - /* Remove the basic block from the array, and compact behind it. */ + + /* Remove the basic block from the array. */ 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. */ +/* Records the basic block struct in BLOCK_FOR_INSN for every insn. */ void -compute_bb_for_insn (max) - int max; +compute_bb_for_insn () { - 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"); + basic_block bb; - for (i = 0; i < n_basic_blocks; ++i) + FOR_EACH_BB (bb) { - 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; - + BLOCK_FOR_INSN (insn) = bb; if (insn == end) break; } @@ -422,10 +449,10 @@ compute_bb_for_insn (max) void free_bb_for_insn () { - if (basic_block_for_insn) - VARRAY_FREE (basic_block_for_insn); - - basic_block_for_insn = 0; + 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. */ @@ -436,9 +463,6 @@ update_bb_for_insn (bb) { rtx insn; - if (! basic_block_for_insn) - return; - for (insn = bb->head; ; insn = NEXT_INSN (insn)) { set_block_for_insn (insn, bb); @@ -446,26 +470,6 @@ update_bb_for_insn (bb) 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, @@ -486,7 +490,7 @@ split_block (bb, insn) return 0; /* Create the new basic block. */ - new_bb = create_basic_block (bb->index + 1, NEXT_INSN (insn), bb->end); + 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; @@ -515,6 +519,15 @@ split_block (bb, insn) 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; @@ -600,6 +613,7 @@ merge_blocks_nomove (a, b) 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; @@ -614,15 +628,12 @@ merge_blocks_nomove (a, b) /* Reassociate the insns of B with A. */ if (!b_empty) { - if (basic_block_for_insn) - { - rtx x; + rtx x; - for (x = a_end; x != b_end; x = NEXT_INSN (x)) - set_block_for_insn (x, a); + for (x = a_end; x != b_end; x = NEXT_INSN (x)) + set_block_for_insn (x, a); - set_block_for_insn (b_end, a); - } + set_block_for_insn (b_end, a); a_end = b_end; } @@ -643,8 +654,6 @@ block_label (block) 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; @@ -663,9 +672,8 @@ try_redirect_by_replacing_jump (e, target) basic_block src = e->src; rtx insn = src->end, kill_from; edge tmp; - rtx set; + rtx set, table; int fallthru = 0; - rtx table; /* Verify that all targets will be TARGET. */ for (tmp = src->succ; tmp; tmp = tmp->succ_next) @@ -674,8 +682,7 @@ try_redirect_by_replacing_jump (e, target) if (tmp || !onlyjump_p (insn)) return false; - - if (reload_completed && JUMP_LABEL (insn) + 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 @@ -786,7 +793,7 @@ try_redirect_by_replacing_jump (e, target) /* 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 + 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. */ @@ -926,12 +933,54 @@ force_nonfallthru_and_redirect (e, target) edge e; basic_block target; { - basic_block jump_block, new_bb = NULL; + 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) - abort (); + { + /* 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) @@ -939,14 +988,11 @@ force_nonfallthru_and_redirect (e, target) /* 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); + 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; - 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) { @@ -958,7 +1004,7 @@ force_nonfallthru_and_redirect (e, target) make_single_succ_edge (ENTRY_BLOCK_PTR, bb, EDGE_FALLTHRU); } - if (e->src->succ->succ_next) + if (e->src->succ->succ_next || abnormal_edge_flags) { /* Create the new structures. */ @@ -975,7 +1021,7 @@ force_nonfallthru_and_redirect (e, target) || 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 = 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; @@ -1025,6 +1071,9 @@ force_nonfallthru_and_redirect (e, target) 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; } @@ -1077,8 +1126,9 @@ tidy_fallthru_edge (e, b, c) 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; + 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 @@ -1119,14 +1169,17 @@ tidy_fallthru_edge (e, b, c) void tidy_fallthru_edges () { - int i; + basic_block b, c; - for (i = 1; i < n_basic_blocks; i++) + 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) { - basic_block b = BASIC_BLOCK (i - 1); - basic_block c = BASIC_BLOCK (i); edge s; + c = b->next_bb; + /* We care about simple conditional or unconditional jumps with a single successor. @@ -1159,12 +1212,19 @@ back_edge_of_syntactic_loop_p (bb1, bb2) { rtx insn; int count = 0; + basic_block bb; - if (bb1->index > bb2->index) - return false; - else if (bb1->index == bb2->index) + 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) @@ -1241,11 +1301,9 @@ split_edge (edge_in) else before = NULL_RTX; - bb = create_basic_block (edge_in->dest == EXIT_BLOCK_PTR ? n_basic_blocks - : edge_in->dest->index, before, NULL); + bb = create_basic_block (before, NULL, edge_in->dest->prev_bb); 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,94 +1359,115 @@ insert_insn_on_edge (pattern, e) /* Update the CFG for the instructions queued on edge E. */ static void -commit_one_edge_insertion (e) +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; + basic_block bb = NULL; /* 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) + /* 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) { - bb = e->dest; + rtx next = next_nonnote_insn (e->src->end); - /* 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); + 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 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) + if (!before && !after) { - 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 + /* 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) { - /* We'd better be fallthru, or we've lost track of what's what. */ - if ((e->flags & EDGE_FALLTHRU) == 0) - abort (); + 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; } } - /* 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); + emit_insn_before (insns, before); last = prev_nonnote_insn (before); } else - last = emit_insns_after (insns, after); + 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. */ + 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) + || e->succ_next != NULL || (e->flags & EDGE_FALLTHRU) == 0) abort (); e->flags &= ~EDGE_FALLTHRU; @@ -1400,7 +1479,8 @@ commit_one_edge_insertion (e) else if (GET_CODE (last) == JUMP_INSN) abort (); - find_sub_basic_blocks (bb); + /* Mark the basic block for find_sub_basic_blocks. */ + bb->aux = &bb->aux; } /* Update the CFG for all queued instructions. */ @@ -1408,16 +1488,15 @@ commit_one_edge_insertion (e) void commit_edge_insertions () { - int i; basic_block bb; + sbitmap blocks; + bool changed = false; #ifdef ENABLE_CHECKING verify_flow_info (); #endif - i = -1; - bb = ENTRY_BLOCK_PTR; - while (1) + FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR, next_bb) { edge e, next; @@ -1425,13 +1504,70 @@ commit_edge_insertions () { next = e->succ_next; if (e->insns) - commit_one_edge_insertion (e); + { + changed = true; + commit_one_edge_insertion (e, false); + } } + } - if (++i >= n_basic_blocks) - break; - bb = BASIC_BLOCK (i); + 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. */ @@ -1501,7 +1637,6 @@ print_rtl_with_bb (outf, rtx_first) 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 @@ -1511,9 +1646,10 @@ print_rtl_with_bb (outf, rtx_first) 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; + + FOR_EACH_BB_REVERSE (bb) { - basic_block bb = BASIC_BLOCK (i); rtx x; start[INSN_UID (bb->head)] = bb; @@ -1534,7 +1670,6 @@ print_rtl_with_bb (outf, rtx_first) 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) { @@ -1621,16 +1756,37 @@ verify_flow_info () basic_block *bb_info, *last_visited; size_t *edge_checksum; rtx x; - int i, last_bb_num_seen, num_bb_notes, err = 0; + 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 (n_basic_blocks + 2, + last_visited = (basic_block *) xcalloc (last_basic_block + 2, sizeof (basic_block)); - edge_checksum = (size_t *) xcalloc (n_basic_blocks + 2, sizeof (size_t)); + edge_checksum = (size_t *) xcalloc (last_basic_block + 2, sizeof (size_t)); - for (i = n_basic_blocks - 1; i >= 0; i--) + /* 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) { - basic_block bb = BASIC_BLOCK (i); rtx head = bb->head; rtx end = bb->end; @@ -1676,12 +1832,36 @@ verify_flow_info () } /* Now check the basic blocks (boundaries etc.) */ - for (i = n_basic_blocks - 1; i >= 0; i--) + FOR_EACH_BB_REVERSE (bb) { - basic_block bb = BASIC_BLOCK (i); - int has_fallthru = 0; + 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) @@ -1690,11 +1870,34 @@ verify_flow_info () 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) - has_fallthru = 1; + 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 @@ -1702,7 +1905,7 @@ verify_flow_info () { rtx insn; - if (e->src->index + 1 != e->dest->index) + if (e->src->next_bb != e->dest) { error ("verify_flow_info: Incorrect blocks for fallthru %i->%i", @@ -1742,7 +1945,52 @@ verify_flow_info () edge_checksum[e->dest->index + 2] += (size_t) e; } - if (!has_fallthru) + 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; @@ -1775,7 +2023,7 @@ verify_flow_info () } for (x = bb->head; x != NEXT_INSN (bb->end); x = NEXT_INSN (x)) - if (basic_block_for_insn && BLOCK_FOR_INSN (x) != bb) + if (BLOCK_FOR_INSN (x) != bb) { debug_rtx (x); if (! BLOCK_FOR_INSN (x)) @@ -1850,26 +2098,27 @@ verify_flow_info () edge_checksum[e->dest->index + 2] -= (size_t) e; } - for (i = -2; i < n_basic_blocks; ++i) - if (edge_checksum[i + 2]) + FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR, NULL, next_bb) + if (edge_checksum[bb->index + 2]) { - error ("basic block %i edge lists are corrupted", i); + error ("basic block %i edge lists are corrupted", bb->index); err = 1; } - last_bb_num_seen = -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)) { - basic_block bb = NOTE_BASIC_BLOCK (x); + bb = NOTE_BASIC_BLOCK (x); num_bb_notes++; - if (bb->index != last_bb_num_seen + 1) + if (bb != last_bb_seen->next_bb) internal_error ("basic blocks not numbered consecutively"); - last_bb_num_seen = bb->index; + last_bb_seen = bb; } if (!bb_info[INSN_UID (x)]) @@ -1941,18 +2190,29 @@ purge_dead_edges (bb) 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; - } - } + /* 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) { @@ -1963,7 +2223,18 @@ purge_dead_edges (bb) if (!any_condjump_p (insn) && !returnjump_p (insn) && !simplejump_p (insn)) - return false; + 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) { @@ -1971,7 +2242,7 @@ purge_dead_edges (bb) /* Avoid abnormal flags to leak from computed jumps turned into simplejumps. */ - + e->flags &= ~EDGE_ABNORMAL; /* See if this edge is one we should keep. */ @@ -1994,12 +2265,13 @@ purge_dead_edges (bb) continue; /* We do not need this edge. */ + bb->flags |= BB_DIRTY; purged = true; remove_edge (e); } if (!bb->succ || !purged) - return false; + return purged; if (rtl_dump_file) fprintf (rtl_dump_file, "Purged edges from bb %i\n", bb->index); @@ -2012,7 +2284,7 @@ purge_dead_edges (bb) { bb->succ->probability = REG_BR_PROB_BASE; bb->succ->count = bb->count; - } + } else { note = find_reg_note (insn, REG_BR_PROB, NULL); @@ -2046,7 +2318,11 @@ purge_dead_edges (bb) { next = e->succ_next; if (!(e->flags & EDGE_FALLTHRU)) - remove_edge (e), purged = true; + { + bb->flags |= BB_DIRTY; + remove_edge (e); + purged = true; + } } if (!bb->succ || bb->succ->succ_next) @@ -2068,22 +2344,23 @@ bool purge_all_dead_edges (update_life_p) int update_life_p; { - int i, purged = false; + int purged = false; sbitmap blocks = 0; + basic_block bb; if (update_life_p) { - blocks = sbitmap_alloc (n_basic_blocks); + blocks = sbitmap_alloc (last_basic_block); sbitmap_zero (blocks); } - for (i = 0; i < n_basic_blocks; i++) + FOR_EACH_BB (bb) { - bool purged_here = purge_dead_edges (BASIC_BLOCK (i)); + bool purged_here = purge_dead_edges (bb); purged |= purged_here; if (purged_here && update_life_p) - SET_BIT (blocks, i); + SET_BIT (blocks, bb->index); } if (update_life_p && purged) diff --git a/contrib/gcc/collect2.c b/contrib/gcc/collect2.c index 933a277..81a2bf3 100644 --- a/contrib/gcc/collect2.c +++ b/contrib/gcc/collect2.c @@ -57,10 +57,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #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 @@ -144,11 +140,9 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA /* 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. */ + give the same symbol without quotes for an alternative entry point. */ #ifndef NAME__MAIN #define NAME__MAIN "__main" -#define SYMBOL__MAIN __main #endif /* This must match tree.h. */ @@ -237,19 +231,11 @@ static struct head exports; /* list of exported symbols */ 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. */ @@ -526,8 +512,8 @@ dump_file (name) if (*word == '.') ++word, putc ('.', stderr); p = word; - if (*p == '_' && prepends_underscore) - ++p; + if (!strncmp (p, USER_LABEL_PREFIX, strlen (USER_LABEL_PREFIX))) + p += strlen (USER_LABEL_PREFIX); if (no_demangle) result = 0; @@ -762,7 +748,7 @@ prefix_from_env (env, pprefix) struct path_prefix *pprefix; { const char *p; - GET_ENV_PATH_LIST (p, env); + GET_ENVIRONMENT (p, env); if (p) prefix_from_string (p, pprefix); @@ -926,7 +912,6 @@ main (argc, argv) #endif obstack_begin (&temporary_obstack, 0); - obstack_begin (&permanent_obstack, 0); temporary_firstobj = (char *) obstack_alloc (&temporary_obstack, 0); current_demangling_style = auto_demangling; @@ -1086,18 +1071,18 @@ main (argc, argv) { const char *q = extract_string (&p); if (*q == '-' && (q[1] == 'm' || q[1] == 'f')) - *c_ptr++ = obstack_copy0 (&permanent_obstack, q, strlen (q)); + *c_ptr++ = xstrdup (q); if (strcmp (q, "-EL") == 0 || strcmp (q, "-EB") == 0) - *c_ptr++ = obstack_copy0 (&permanent_obstack, q, strlen (q)); + *c_ptr++ = xstrdup (q); if (strcmp (q, "-shared") == 0) shared_obj = 1; if (*q == '-' && q[1] == 'B') { - *c_ptr++ = obstack_copy0 (&permanent_obstack, q, strlen (q)); + *c_ptr++ = xstrdup (q); if (q[2] == 0) { q = extract_string (&p); - *c_ptr++ = obstack_copy0 (&permanent_obstack, q, strlen (q)); + *c_ptr++ = xstrdup (q); } } } @@ -1506,7 +1491,7 @@ main (argc, argv) } -/* Wait for a process to finish, and exit if a non-zero status is found. */ +/* Wait for a process to finish, and exit if a nonzero status is found. */ int collect_wait (prog) @@ -1522,7 +1507,7 @@ collect_wait (prog) int sig = WTERMSIG (status); error ("%s terminated with signal %d [%s]%s", prog, sig, strsignal(sig), - status & 0200 ? "" : ", core dumped"); + WCOREDUMP(status) ? ", core dumped" : ""); collect_exit (FATAL_EXIT_CODE); } @@ -2144,7 +2129,7 @@ scan_prog_file (prog_name, which_pass) fatal_perror ("close %d", pipe_fd[1]); execv (nm_file_name, real_nm_argv); - fatal_perror ("execvp %s", nm_file_name); + fatal_perror ("execv %s", nm_file_name); } /* Parent context from here on. */ @@ -2870,7 +2855,7 @@ scan_prog_file (prog_name, which_pass) (void) ldclose(ldptr); #endif } - +#endif /* OBJECT_FORMAT_COFF */ #ifdef COLLECT_EXPORT_LIST /* Given a library name without "lib" prefix, this function @@ -2950,9 +2935,7 @@ ignore_library (name) if (! strcmp (name, *p)) return 1; return 0; } -#endif - -#endif /* OBJECT_FORMAT_COFF */ +#endif /* COLLECT_EXPORT_LIST */ /* diff --git a/contrib/gcc/collect2.h b/contrib/gcc/collect2.h index 2a65836..f678820 100644 --- a/contrib/gcc/collect2.h +++ b/contrib/gcc/collect2.h @@ -36,7 +36,6 @@ extern int file_exists PARAMS ((const char *)); 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; diff --git a/contrib/gcc/combine.c b/contrib/gcc/combine.c index 5e8ad1a..03d0dff 100644 --- a/contrib/gcc/combine.c +++ b/contrib/gcc/combine.c @@ -1,6 +1,6 @@ /* Optimize by combining instructions for GNU compiler. Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998, - 1999, 2000, 2001, 2002 Free Software Foundation, Inc. + 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. This file is part of GCC. @@ -137,6 +137,12 @@ static int max_uid_cuid; #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; @@ -192,8 +198,8 @@ static HARD_REG_SET newpat_used_regs; static rtx added_links_insn; -/* Basic block number of the block in which we are performing combines. */ -static int this_basic_block; +/* 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 @@ -202,7 +208,7 @@ static sbitmap refresh_blocks; 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 + 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. @@ -221,7 +227,7 @@ static int need_refresh; 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 + reg_last_set_invalid set to nonzero when it is not valid to use the value of this register in some register's value @@ -230,7 +236,7 @@ static int need_refresh; 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 + 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 @@ -242,7 +248,7 @@ static int need_refresh; 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 + 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. */ @@ -259,7 +265,7 @@ static int *reg_last_set_label; static int *reg_last_set_table_tick; -/* Set non-zero if references to register n in expressions should not be +/* Set nonzero if references to register n in expressions should not be used. */ static char *reg_last_set_invalid; @@ -314,8 +320,8 @@ struct undo { struct undo *next; int is_int; - union {rtx r; unsigned int i;} old_contents; - union {rtx *r; unsigned int *i;} where; + 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. @@ -339,8 +345,7 @@ static struct undobuf undobuf; static int n_occurrences; static void do_SUBST PARAMS ((rtx *, rtx)); -static void do_SUBST_INT PARAMS ((unsigned int *, - unsigned int)); +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 *)); @@ -376,8 +381,20 @@ static rtx make_field_assignment PARAMS ((rtx)); 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 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 *)); @@ -472,10 +489,10 @@ do_SUBST (into, newval) static void do_SUBST_INT (into, newval) - unsigned int *into, newval; + int *into, newval; { struct undo *buf; - unsigned int oldval = *into; + int oldval = *into; if (oldval == newval) return; @@ -498,7 +515,7 @@ do_SUBST_INT (into, newval) /* 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 + Return nonzero if the combiner has turned an indirect jump instruction into a direct jump. */ int combine_instructions (f, nregs) @@ -578,7 +595,7 @@ combine_instructions (f, nregs) setup_incoming_promotions (); - refresh_blocks = sbitmap_alloc (n_basic_blocks); + refresh_blocks = sbitmap_alloc (last_basic_block); sbitmap_zero (refresh_blocks); need_refresh = 0; @@ -610,143 +627,144 @@ combine_instructions (f, nregs) /* 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)) + FOR_EACH_BB (this_basic_block) { - 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)) + for (insn = this_basic_block->head; + insn != NEXT_INSN (this_basic_block->end); + insn = next ? next : NEXT_INSN (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. */ + next = 0; - 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; + if (GET_CODE (insn) == CODE_LABEL) + label_tick++; - /* Try each sequence of three linked insns ending with this one. */ - - for (links = LOG_LINKS (insn); links; links = XEXP (links, 1)) + else if (INSN_P (insn)) { - rtx link = XEXP (links, 0); + /* See if we know about function return values before this + insn based upon SUBREG flags. */ + check_promoted_subreg (insn, PATTERN (insn)); - /* 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; + /* Try this insn with each insn it links back to. */ - for (nextlinks = LOG_LINKS (link); - nextlinks; - nextlinks = XEXP (nextlinks, 1)) - if ((next = try_combine (insn, link, - XEXP (nextlinks, 0), - &new_direct_jump_p)) != 0) + 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; - } + /* 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; + /* 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; + } - for (nextlinks = LOG_LINKS (prev); nextlinks; - nextlinks = XEXP (nextlinks, 1)) - if ((next = try_combine (insn, prev, - XEXP (nextlinks, 0), - &new_direct_jump_p)) != 0) + /* 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; - } - - /* 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; + /* 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); + if (GET_CODE (insn) != NOTE) + record_dead_and_set_regs (insn); - retry: - ; + 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); - if (need_refresh) - { - update_life_info (refresh_blocks, UPDATE_LIFE_GLOBAL_RM_NOTES, - PROP_DEATH_NOTES); - } + 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); @@ -858,7 +876,7 @@ set_nonzero_bits_and_sign_copies (x, set, data) && 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)) + && ! 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) @@ -1285,13 +1303,13 @@ sets_function_arg_p (pat) 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 + 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 non-zero, it is a pointer to a location in which + 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. @@ -1497,7 +1515,7 @@ cant_combine_insn_p (insn) 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 + Set NEW_DIRECT_JUMP_P to a nonzero value if try_combine creates a new direct jump instruction. */ static rtx @@ -1754,6 +1772,7 @@ try_combine (i3, i2, i1, new_direct_jump_p) 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); @@ -2165,30 +2184,23 @@ try_combine (i3, i2, i1, new_direct_jump_p) } } - /* 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) + 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 && GET_CODE (m_split) == SEQUENCE - && XVECLEN (m_split, 0) == 2 + else if (m_split && NEXT_INSN (NEXT_INSN (m_split)) == NULL_RTX && (next_real_insn (i2) == i3 - || ! use_crosses_set_p (PATTERN (XVECEXP (m_split, 0, 0)), - INSN_CUID (i2)))) + || ! use_crosses_set_p (PATTERN (m_split), INSN_CUID (i2)))) { rtx i2set, i3set; - rtx newi3pat = PATTERN (XVECEXP (m_split, 0, 1)); - newi2pat = PATTERN (XVECEXP (m_split, 0, 0)); + rtx newi3pat = PATTERN (NEXT_INSN (m_split)); + newi2pat = PATTERN (m_split); - i3set = single_set (XVECEXP (m_split, 0, 1)); - i2set = single_set (XVECEXP (m_split, 0, 0)); + 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 @@ -2289,8 +2301,19 @@ try_combine (i3, i2, i1, new_direct_jump_p) /* 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))); + { +#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); @@ -2311,6 +2334,10 @@ try_combine (i3, i2, i1, new_direct_jump_p) 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. */ @@ -2320,6 +2347,8 @@ try_combine (i3, i2, i1, new_direct_jump_p) && 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)) @@ -2386,8 +2415,8 @@ try_combine (i3, i2, i1, new_direct_jump_p) 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 && (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))) @@ -2604,8 +2633,8 @@ try_combine (i3, i2, i1, new_direct_jump_p) && ! 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 && (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)) @@ -2818,7 +2847,7 @@ try_combine (i3, i2, i1, new_direct_jump_p) 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)) + if (returnjump_p (i3) || any_uncondjump_p (i3)) { *new_direct_jump_p = 1; @@ -2826,6 +2855,18 @@ try_combine (i3, i2, i1, new_direct_jump_p) || 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 @@ -2958,20 +2999,22 @@ find_split_point (loc, insn) 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 + 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 (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 + 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 (XVECEXP (seq, 0, 1))))) + SET_SRC (PATTERN (NEXT_INSN (seq))))) { - rtx src1 = SET_SRC (PATTERN (XVECEXP (seq, 0, 0))); - rtx src2 = SET_SRC (PATTERN (XVECEXP (seq, 0, 1))); + 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 @@ -3062,11 +3105,8 @@ find_split_point (loc, insn) 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_mode (~(mask << pos), + mode)), GEN_INT (src << pos))); SUBST (SET_DEST (x), dest); @@ -3085,7 +3125,7 @@ find_split_point (loc, insn) 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 + 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, @@ -3313,10 +3353,10 @@ find_split_point (loc, insn) `n_occurrences' is incremented each time FROM is replaced. - IN_DEST is non-zero if we are processing the SET_DEST of a SET. + IN_DEST is nonzero 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. */ + 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) @@ -3497,15 +3537,13 @@ subst (x, from, to, in_dest, unique_copy) ) return gen_rtx_CLOBBER (VOIDmode, const0_rtx); -#ifdef CLASS_CANNOT_CHANGE_MODE +#ifdef CANNOT_CHANGE_MODE_CLASS 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))) + && REG_CANNOT_CHANGE_MODE_P (REGNO (to), + GET_MODE (to), + GET_MODE (x))) return gen_rtx_CLOBBER (VOIDmode, const0_rtx); #endif @@ -3540,7 +3578,8 @@ subst (x, from, to, in_dest, unique_copy) if (GET_CODE (new) == CONST_INT && GET_CODE (x) == SUBREG) { enum machine_mode mode = GET_MODE (x); - x = simplify_subreg (mode, new, + + x = simplify_subreg (GET_MODE (x), new, GET_MODE (SUBREG_REG (x)), SUBREG_BYTE (x)); if (! x) @@ -3772,7 +3811,8 @@ combine_simplify_rtx (x, op0_mode, last, in_dest) if (temp == const0_rtx) temp = CONST0_RTX (mode); else - temp = immed_real_const_1 (FLOAT_STORE_FLAG_VALUE (mode), mode); + temp = CONST_DOUBLE_FROM_REAL_VALUE (FLOAT_STORE_FLAG_VALUE (mode), + mode); } #endif break; @@ -3864,7 +3904,12 @@ combine_simplify_rtx (x, op0_mode, last, in_dest) /* simplify_subreg can't use gen_lowpart_for_combine. */ if (CONSTANT_P (SUBREG_REG (x)) - && subreg_lowpart_offset (mode, op0_mode) == SUBREG_BYTE (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) @@ -3991,15 +4036,35 @@ combine_simplify_rtx (x, op0_mode, last, in_dest) 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). */ + /* (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 - && (! FLOAT_MODE_P (mode) - /* x-y != -(y-x) with IEEE floating point. */ - || TARGET_FLOAT_FORMAT != IEEE_FLOAT_FORMAT - || flag_unsafe_math_optimizations)) + && !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) @@ -4102,7 +4167,7 @@ combine_simplify_rtx (x, op0_mode, last, in_dest) 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 + >= (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)); @@ -4158,10 +4223,11 @@ combine_simplify_rtx (x, op0_mode, last, in_dest) 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) + /* 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; @@ -4187,6 +4253,19 @@ combine_simplify_rtx (x, op0_mode, last, in_dest) #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 @@ -4293,6 +4372,32 @@ combine_simplify_rtx (x, op0_mode, last, in_dest) 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)) @@ -4579,7 +4684,7 @@ combine_simplify_rtx (x, op0_mode, last, in_dest) #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), + force_to_mode (XEXP (x, 1), GET_MODE (XEXP (x, 1)), ((HOST_WIDE_INT) 1 << exact_log2 (GET_MODE_BITSIZE (GET_MODE (x)))) - 1, @@ -4761,12 +4866,12 @@ simplify_if_then_else (x) /* Convert a == b ? b : a to "a". */ if (true_code == EQ && ! side_effects_p (cond) - && (! FLOAT_MODE_P (mode) || flag_unsafe_math_optimizations) + && !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) - && (! FLOAT_MODE_P (mode) || flag_unsafe_math_optimizations) + && !HONOR_NANS (mode) && rtx_equal_p (XEXP (cond, 0), true_rtx) && rtx_equal_p (XEXP (cond, 1), false_rtx)) return true_rtx; @@ -4827,7 +4932,9 @@ simplify_if_then_else (x) 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)) + && 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); @@ -4862,7 +4969,8 @@ simplify_if_then_else (x) && 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) + > (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)); @@ -4877,7 +4985,8 @@ simplify_if_then_else (x) && 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) + > (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)); @@ -4977,7 +5086,8 @@ simplify_set (x) simplify the expression for the object knowing that we only need the low-order bits. */ - if (GET_MODE_CLASS (mode) == MODE_INT) + 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); @@ -4986,11 +5096,9 @@ simplify_set (x) /* 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 - ) + 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)) == '<' @@ -4998,15 +5106,44 @@ simplify_set (x) { enum rtx_code old_code = GET_CODE (*cc_use); enum rtx_code new_code; - rtx op0, op1; + 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); @@ -5136,13 +5273,11 @@ simplify_set (x) && (GET_MODE_SIZE (GET_MODE (src)) < GET_MODE_SIZE (GET_MODE (SUBREG_REG (src)))) #endif -#ifdef CLASS_CANNOT_CHANGE_MODE +#ifdef CANNOT_CHANGE_MODE_CLASS && ! (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)))) + && REG_CANNOT_CHANGE_MODE_P (REGNO (dest), + GET_MODE (SUBREG_REG (src)), + GET_MODE (src))) #endif && (GET_CODE (dest) == REG || (GET_CODE (dest) == SUBREG @@ -5156,6 +5291,30 @@ simplify_set (x) 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 @@ -5594,9 +5753,15 @@ expand_compound_operation (x) 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 a ASM_OPERANDS), we can't do anything since we don't + 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; @@ -5615,6 +5780,12 @@ expand_compound_operation (x) || 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)); @@ -5822,12 +5993,12 @@ expand_field_assignment (x) compute_mode = GET_MODE (inner); - /* Don't attempt bitwise arithmetic on non-integral modes. */ - if (! INTEGRAL_MODE_P (compute_mode)) + /* Don't attempt bitwise arithmetic on non scalar integer modes. */ + if (! SCALAR_INT_MODE_P (compute_mode)) { enum machine_mode imode; - /* Something is probably seriously wrong if this matches. */ + /* Don't do anything for vector or complex integral types. */ if (! FLOAT_MODE_P (compute_mode)) break; @@ -5881,15 +6052,15 @@ expand_field_assignment (x) 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 + UNSIGNEDP is nonzero 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, + 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 non-zero if we are in a COMPARE. This means that a + 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). @@ -5940,6 +6111,21 @@ make_extraction (mode, inner, pos, pos_rtx, len, 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); @@ -6017,7 +6203,7 @@ make_extraction (mode, inner, pos, pos_rtx, len, - GET_MODE_SIZE (tmode)) % UNITS_PER_WORD; /* Avoid creating invalid subregs, for example when - simplifying (x>>32)&255. */ + simplifying (x>>32)&255. */ if (final_word >= GET_MODE_SIZE (inner_mode)) return NULL_RTX; @@ -6046,7 +6232,7 @@ make_extraction (mode, inner, pos, pos_rtx, len, return new; if (GET_CODE (new) == CONST_INT) - return GEN_INT (trunc_int_for_mode (INTVAL (new), mode)); + 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 @@ -6362,7 +6548,7 @@ make_compound_operation (x, in_code) : in_code == COMPARE ? SET : in_code); /* Process depending on the code of this operation. If NEW is set - non-zero, it will be returned. */ + nonzero, it will be returned. */ switch (code) { @@ -6567,7 +6753,11 @@ make_compound_operation (x, in_code) 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)); + { + 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; @@ -6635,7 +6825,7 @@ get_pos_from_mask (m, plen) 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, + 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 @@ -6698,12 +6888,20 @@ force_to_mode (x, mode, mask, reg, just_select) /* If none of the bits in X are needed, return a zero. */ if (! just_select && (nonzero & mask) == 0) - return const0_rtx; + 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) - return gen_int_mode (INTVAL (x) & mask, mode); + { + 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. */ @@ -6776,7 +6974,7 @@ force_to_mode (x, mode, mask, reg, just_select) 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)) + == mask)) x = XEXP (x, 0); /* If it remains an AND, try making another AND with the bits @@ -7058,7 +7256,7 @@ force_to_mode (x, mode, mask, reg, just_select) } } - /* If MASK is 1, convert this to a LSHIFTRT. This can be done + /* 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)); @@ -7125,7 +7323,8 @@ force_to_mode (x, mode, mask, reg, just_select) < GET_MODE_BITSIZE (GET_MODE (x))) && INTVAL (XEXP (XEXP (x, 0), 1)) < HOST_BITS_PER_WIDE_INT) { - temp = GEN_INT (mask << INTVAL (XEXP (XEXP (x, 0), 1))); + temp = gen_int_mode (mask << INTVAL (XEXP (XEXP (x, 0), 1)), + GET_MODE (x)); temp = gen_binary (XOR, GET_MODE (x), XEXP (XEXP (x, 0), 0), temp); x = gen_binary (LSHIFTRT, GET_MODE (x), temp, XEXP (XEXP (x, 0), 1)); @@ -7245,7 +7444,7 @@ if_then_else_cond (x, ptrue, pfalse) } /* 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, + 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) @@ -7367,7 +7566,7 @@ if_then_else_cond (x, ptrue, pfalse) && 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; + *ptrue = gen_int_mode (nz, mode), *pfalse = const0_rtx; return x; } @@ -7866,7 +8065,7 @@ simplify_and_const_int (x, mode, varop, constop) 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. */ + 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); @@ -7942,23 +8141,76 @@ simplify_and_const_int (x, mode, varop, constop) 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 num_sign_bit_copies() +#define cached_num_sign_bit_copies() -/* Given an expression, X, compute which bits in X can be non-zero. +/* 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_bits (x, mode) +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; @@ -7996,7 +8248,7 @@ nonzero_bits (x, mode) && 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 &= nonzero_bits_with_known (x, GET_MODE (x)); nonzero |= GET_MODE_MASK (mode) & ~GET_MODE_MASK (GET_MODE (x)); return nonzero; } @@ -8049,7 +8301,7 @@ nonzero_bits (x, mode) && (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_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; @@ -8078,7 +8330,7 @@ nonzero_bits (x, mode) | ((HOST_WIDE_INT) (-1) << GET_MODE_BITSIZE (GET_MODE (x)))); #endif - return nonzero_bits (tem, mode) & nonzero; + return nonzero_bits_with_known (tem, mode) & nonzero; } else if (nonzero_sign_valid && reg_nonzero_bits[REGNO (x)]) { @@ -8153,11 +8405,12 @@ nonzero_bits (x, mode) break; case TRUNCATE: - nonzero &= (nonzero_bits (XEXP (x, 0), mode) & GET_MODE_MASK (mode)); + nonzero &= (nonzero_bits_with_known (XEXP (x, 0), mode) + & GET_MODE_MASK (mode)); break; case ZERO_EXTEND: - nonzero &= nonzero_bits (XEXP (x, 0), mode); + 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; @@ -8165,8 +8418,8 @@ nonzero_bits (x, mode) 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); + 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))); @@ -8181,19 +8434,21 @@ nonzero_bits (x, mode) break; case AND: - nonzero &= (nonzero_bits (XEXP (x, 0), mode) - & nonzero_bits (XEXP (x, 1), mode)); + 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 (XEXP (x, 0), mode); + 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 (XEXP (x, 1), mode)); + nonzero &= (nonzero0 + | nonzero_bits_with_known (XEXP (x, 1), mode)); } break; @@ -8203,11 +8458,13 @@ nonzero_bits (x, mode) 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) + 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 (XEXP (x, 0), mode); - unsigned HOST_WIDE_INT nz1 = nonzero_bits (XEXP (x, 1), mode); + 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); @@ -8289,9 +8546,9 @@ nonzero_bits (x, mode) 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)) + if (SUBREG_PROMOTED_VAR_P (x) && SUBREG_PROMOTED_UNSIGNED_P (x) > 0) nonzero = (GET_MODE_MASK (GET_MODE (x)) - & nonzero_bits (SUBREG_REG (x), 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 @@ -8300,17 +8557,18 @@ nonzero_bits (x, mode) && (GET_MODE_BITSIZE (GET_MODE (SUBREG_REG (x))) <= HOST_BITS_PER_WIDE_INT)) { - nonzero &= nonzero_bits (SUBREG_REG (x), mode); + 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) + 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 @@ -8342,7 +8600,8 @@ nonzero_bits (x, mode) 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 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; @@ -8377,8 +8636,8 @@ nonzero_bits (x, mode) break; case IF_THEN_ELSE: - nonzero &= (nonzero_bits (XEXP (x, 1), mode) - | nonzero_bits (XEXP (x, 2), mode)); + nonzero &= (nonzero_bits_with_known (XEXP (x, 1), mode) + | nonzero_bits_with_known (XEXP (x, 2), mode)); break; default: @@ -8389,17 +8648,74 @@ nonzero_bits (x, mode) } /* See the macro definition above. */ -#undef num_sign_bit_copies +#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_copies (x, mode) +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; @@ -8422,7 +8738,7 @@ num_sign_bit_copies (x, mode) /* 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)); + num0 = num_sign_bit_copies_with_known (x, GET_MODE (x)); return MAX (1, num0 - (int) (GET_MODE_BITSIZE (GET_MODE (x)) - bitwidth)); } @@ -8464,14 +8780,14 @@ num_sign_bit_copies (x, mode) && (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_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 (tem, mode); + 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) @@ -8504,7 +8820,7 @@ num_sign_bit_copies (x, mode) if (SUBREG_PROMOTED_VAR_P (x) && ! SUBREG_PROMOTED_UNSIGNED_P (x)) { - num0 = num_sign_bit_copies (SUBREG_REG (x), mode); + num0 = num_sign_bit_copies_with_known (SUBREG_REG (x), mode); return MAX ((int) bitwidth - (int) GET_MODE_BITSIZE (GET_MODE (x)) + 1, num0); @@ -8513,7 +8829,7 @@ num_sign_bit_copies (x, mode) /* 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); + 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))); @@ -8533,8 +8849,9 @@ num_sign_bit_copies (x, mode) 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); + && 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; @@ -8546,16 +8863,16 @@ num_sign_bit_copies (x, mode) case SIGN_EXTEND: return (bitwidth - GET_MODE_BITSIZE (GET_MODE (XEXP (x, 0))) - + num_sign_bit_copies (XEXP (x, 0), VOIDmode)); + + 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 (XEXP (x, 0), VOIDmode); + 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 (XEXP (x, 0), mode); + 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 @@ -8565,7 +8882,7 @@ num_sign_bit_copies (x, mode) && INTVAL (XEXP (x, 1)) >= 0 && INTVAL (XEXP (x, 1)) < (int) bitwidth) { - num0 = num_sign_bit_copies (XEXP (x, 0), mode); + 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)))); } @@ -8576,7 +8893,7 @@ num_sign_bit_copies (x, mode) 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); + num0 = num_sign_bit_copies_with_known (XEXP (x, 0), mode); if (bitwidth > HOST_BITS_PER_WIDE_INT) return num0 > 1 ? num0 - 1 : 1; @@ -8594,8 +8911,8 @@ num_sign_bit_copies (x, mode) 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); + 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: @@ -8613,8 +8930,8 @@ num_sign_bit_copies (x, mode) : bitwidth - floor_log2 (nonzero) - 1); } - num0 = num_sign_bit_copies (XEXP (x, 0), mode); - num1 = num_sign_bit_copies (XEXP (x, 1), mode); + 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 @@ -8636,8 +8953,8 @@ num_sign_bit_copies (x, mode) 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); + 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 @@ -8660,17 +8977,17 @@ num_sign_bit_copies (x, mode) & ((HOST_WIDE_INT) 1 << (bitwidth - 1))) != 0) return 1; else - return num_sign_bit_copies (XEXP (x, 0), mode); + 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 (XEXP (x, 1), mode); + 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 (XEXP (x, 0), mode); + 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) @@ -8680,7 +8997,7 @@ num_sign_bit_copies (x, mode) return result; case MOD: - result = num_sign_bit_copies (XEXP (x, 1), mode); + 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) @@ -8692,7 +9009,7 @@ num_sign_bit_copies (x, mode) 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); + 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))); @@ -8706,12 +9023,12 @@ num_sign_bit_copies (x, mode) || INTVAL (XEXP (x, 1)) >= (int) bitwidth) return 1; - num0 = num_sign_bit_copies (XEXP (x, 0), mode); + 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 (XEXP (x, 1), mode); - num1 = num_sign_bit_copies (XEXP (x, 2), mode); + 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: @@ -8767,8 +9084,8 @@ extended_count (x, mode, unsignedp) return (unsignedp ? (GET_MODE_BITSIZE (mode) <= HOST_BITS_PER_WIDE_INT - ? (GET_MODE_BITSIZE (mode) - 1 - - floor_log2 (nonzero_bits (x, mode))) + ? (unsigned int) (GET_MODE_BITSIZE (mode) - 1 + - floor_log2 (nonzero_bits (x, mode))) : 0) : num_sign_bit_copies (x, mode) - 1); } @@ -8911,7 +9228,7 @@ merge_outer_ops (pop0, pconst0, op1, const1, mode, pcomp_p) } /* 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 + 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 @@ -8978,7 +9295,14 @@ simplify_shift_const (x, code, result_mode, varop, orig_count) /* Convert ROTATERT to ROTATE. */ if (code == ROTATERT) - code = ROTATE, count = GET_MODE_BITSIZE (result_mode) - count; + { + 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 @@ -8998,7 +9322,7 @@ simplify_shift_const (x, code, result_mode, varop, orig_count) 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 (count > (unsigned int) (GET_MODE_BITSIZE (shift_mode) - 1)) { if (code == ASHIFTRT) count = GET_MODE_BITSIZE (shift_mode) - 1; @@ -9036,8 +9360,8 @@ simplify_shift_const (x, code, result_mode, varop, orig_count) /* 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. */ + `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) @@ -9114,9 +9438,9 @@ simplify_shift_const (x, code, result_mode, varop, orig_count) 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)) + && (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)) @@ -9157,7 +9481,8 @@ simplify_shift_const (x, code, result_mode, varop, orig_count) 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 + if (code == LSHIFTRT + && count == (unsigned int) (GET_MODE_BITSIZE (result_mode) - 1) && (GET_MODE_BITSIZE (result_mode) >= GET_MODE_BITSIZE (GET_MODE (varop)))) { @@ -9191,8 +9516,9 @@ simplify_shift_const (x, code, result_mode, varop, orig_count) (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) + && count == (unsigned int) + (GET_MODE_BITSIZE (result_mode) + - GET_MODE_BITSIZE (GET_MODE (varop)))) { /* C3 has the low-order C1 bits zero. */ @@ -9210,7 +9536,7 @@ simplify_shift_const (x, code, result_mode, varop, orig_count) /* 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 + 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. */ @@ -9348,7 +9674,8 @@ simplify_shift_const (x, code, result_mode, varop, orig_count) && 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 + && count == (unsigned int) + (GET_MODE_BITSIZE (GET_MODE (varop)) - 1) && rtx_equal_p (XEXP (XEXP (varop, 0), 0), XEXP (varop, 1))) { count = 0; @@ -9403,7 +9730,7 @@ simplify_shift_const (x, code, result_mode, varop, orig_count) if (code == LSHIFTRT && XEXP (varop, 1) == const0_rtx && GET_MODE (XEXP (varop, 0)) == result_mode - && count == GET_MODE_BITSIZE (result_mode) - 1 + && 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 @@ -9422,7 +9749,8 @@ simplify_shift_const (x, code, result_mode, varop, orig_count) 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 + if (code == LSHIFTRT + && count == (unsigned int) (GET_MODE_BITSIZE (result_mode) - 1) && nonzero_bits (XEXP (varop, 0), result_mode) == 1) { varop = XEXP (varop, 0); @@ -9446,7 +9774,8 @@ simplify_shift_const (x, code, result_mode, varop, orig_count) /* (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 + 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, @@ -9511,10 +9840,12 @@ simplify_shift_const (x, code, result_mode, varop, orig_count) if ((STORE_FLAG_VALUE == 1 || STORE_FLAG_VALUE == -1) && GET_CODE (XEXP (varop, 0)) == ASHIFTRT - && count == GET_MODE_BITSIZE (GET_MODE (varop)) - 1 + && count == (unsigned int) + (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 + && (unsigned HOST_WIDE_INT) INTVAL (XEXP (XEXP (varop, 0), 1)) + == count && rtx_equal_p (XEXP (XEXP (varop, 0), 0), XEXP (varop, 1))) { count = 0; @@ -9578,7 +9909,7 @@ simplify_shift_const (x, code, result_mode, varop, orig_count) if (x && GET_RTX_CLASS (GET_CODE (x)) == '2' && GET_CODE (XEXP (x, 1)) == CONST_INT - && INTVAL (XEXP (x, 1)) == count) + && (unsigned HOST_WIDE_INT) INTVAL (XEXP (x, 1)) == count) const_rtx = XEXP (x, 1); else const_rtx = GEN_INT (count); @@ -9610,7 +9941,7 @@ simplify_shift_const (x, code, result_mode, varop, orig_count) 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, + /* 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, @@ -9796,14 +10127,14 @@ gen_lowpart_for_combine (mode, x) } result = gen_lowpart_common (mode, x); -#ifdef CLASS_CANNOT_CHANGE_MODE +#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 - && CLASS_CANNOT_CHANGE_MODE_P (GET_MODE (result), - GET_MODE (SUBREG_REG (result)))) - REG_CHANGES_MODE (REGNO (SUBREG_REG (result))) = 1; + && 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) @@ -9851,15 +10182,15 @@ gen_lowpart_for_combine (mode, x) { int offset = 0; rtx res; + enum machine_mode sub_mode = GET_MODE (x); - /* 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); + 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); @@ -10118,7 +10449,9 @@ simplify_comparison (code, pop0, pop1) /* 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); + 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 @@ -10490,7 +10823,8 @@ simplify_comparison (code, pop0, pop1) & ~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))) + > (unsigned int) + (GET_MODE_BITSIZE (GET_MODE (SUBREG_REG (op0))) - GET_MODE_BITSIZE (mode))))) { op0 = SUBREG_REG (op0); @@ -10574,7 +10908,8 @@ simplify_comparison (code, pop0, pop1) 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 + && (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); @@ -10643,7 +10978,7 @@ simplify_comparison (code, pop0, pop1) break; case IOR: - /* The sign bit of (ior (plus X (const_int -1)) X) is non-zero + /* 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 @@ -10729,6 +11064,9 @@ simplify_comparison (code, pop0, pop1) 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 @@ -10809,7 +11147,7 @@ simplify_comparison (code, pop0, pop1) 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)); + op1 = gen_int_mode (temp, mode); op0 = XEXP (op0, 0); continue; } @@ -10832,7 +11170,8 @@ simplify_comparison (code, pop0, pop1) low-order bit. */ if (const_op == 0 && equality_comparison_p && GET_CODE (XEXP (op0, 1)) == CONST_INT - && INTVAL (XEXP (op0, 1)) == mode_width - 1) + && (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); @@ -10929,7 +11268,8 @@ simplify_comparison (code, pop0, pop1) 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) + && (unsigned HOST_WIDE_INT) INTVAL (XEXP (op0, 1)) + == mode_width - 1) { op0 = XEXP (op0, 0); code = (code == NE || code == GT ? LT : GE); @@ -11030,9 +11370,11 @@ simplify_comparison (code, pop0, pop1) if (zero_extended || ((num_sign_bit_copies (op0, tmode) - > GET_MODE_BITSIZE (tmode) - GET_MODE_BITSIZE (mode)) + > (unsigned int) (GET_MODE_BITSIZE (tmode) + - GET_MODE_BITSIZE (mode))) && (num_sign_bit_copies (op1, tmode) - > GET_MODE_BITSIZE (tmode) - GET_MODE_BITSIZE (mode)))) + > (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. */ @@ -11142,7 +11484,45 @@ update_table_tick (x) /* 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)); + { + /* 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 @@ -11390,7 +11770,7 @@ record_promoted_value (insn, subreg) if (reg_last_set[regno] == insn) { - if (SUBREG_PROMOTED_UNSIGNED_P (subreg)) + if (SUBREG_PROMOTED_UNSIGNED_P (subreg) > 0) reg_last_set_nonzero_bits[regno] &= GET_MODE_MASK (mode); } @@ -11440,7 +11820,7 @@ check_promoted_subreg (insn, x) 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 + 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 @@ -11473,7 +11853,7 @@ get_last_value_validate (loc, insn, tick, replace) || (! (regno >= FIRST_PSEUDO_REGISTER && REG_N_SETS (regno) == 1 && (! REGNO_REG_SET_P - (BASIC_BLOCK (0)->global_live_at_start, regno))) + (ENTRY_BLOCK_PTR->next_bb->global_live_at_start, regno))) && reg_last_set_label[j] > tick)) { if (replace) @@ -11495,11 +11875,52 @@ get_last_value_validate (loc, insn, tick, replace) } 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 (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; @@ -11547,7 +11968,7 @@ get_last_value (x) && (regno < FIRST_PSEUDO_REGISTER || REG_N_SETS (regno) != 1 || (REGNO_REG_SET_P - (BASIC_BLOCK (0)->global_live_at_start, regno))))) + (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, @@ -11653,7 +12074,7 @@ reg_dead_at_p_1 (dest, x, data) reg_dead_flag = (GET_CODE (x) == CLOBBER) ? 1 : -1; } -/* Return non-zero if REG is known to be dead at INSN. +/* 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 @@ -11666,7 +12087,7 @@ reg_dead_at_p (reg, insn) rtx reg; rtx insn; { - int block; + basic_block block; unsigned int i; /* Set variables for reg_dead_at_p_1. */ @@ -11699,21 +12120,21 @@ reg_dead_at_p (reg, insn) return 1; } - /* Get the basic block number that we were in. */ + /* Get the basic block that we were in. */ if (insn == 0) - block = 0; + block = ENTRY_BLOCK_PTR->next_bb; else { - for (block = 0; block < n_basic_blocks; block++) - if (insn == BLOCK_HEAD (block)) + FOR_EACH_BB (block) + if (insn == block->head) break; - if (block == n_basic_blocks) + if (block == EXIT_BLOCK_PTR) 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)) + if (REGNO_REG_SET_P (block->global_live_at_start, i)) return 0; return 1; @@ -11764,7 +12185,7 @@ mark_used_regs_combine (x) { unsigned int endregno, r; - /* None of this applies to the stack, frame or arg pointers */ + /* 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 @@ -11872,7 +12293,7 @@ move_deaths (x, maybe_kill_insn, from_cuid, to_insn, pnotes) 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 */ + /* 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; @@ -11920,7 +12341,7 @@ move_deaths (x, maybe_kill_insn, from_cuid, to_insn, pnotes) if (i < regno || i >= ourend) REG_NOTES (where_dead) = gen_rtx_EXPR_LIST (REG_DEAD, - gen_rtx_REG (reg_raw_mode[i], i), + regno_reg_rtx[i], REG_NOTES (where_dead)); } @@ -11947,7 +12368,7 @@ move_deaths (x, maybe_kill_insn, from_cuid, to_insn, pnotes) offset = 1; for (i = regno + offset; i < ourend; i++) - move_deaths (gen_rtx_REG (reg_raw_mode[i], i), + move_deaths (regno_reg_rtx[i], maybe_kill_insn, from_cuid, to_insn, &oldnotes); } @@ -12107,7 +12528,6 @@ distribute_notes (notes, from_insn, i3, i2, elim_i2, elim_i1) { 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. */ @@ -12327,7 +12747,7 @@ distribute_notes (notes, from_insn, i3, i2, elim_i2, elim_i1) 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. + 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, @@ -12356,7 +12776,7 @@ distribute_notes (notes, from_insn, i3, i2, elim_i2, elim_i1) if (place == 0) { - basic_block bb = BASIC_BLOCK (this_basic_block); + basic_block bb = this_basic_block; for (tem = PREV_INSN (i3); place == 0; tem = PREV_INSN (tem)) { @@ -12500,7 +12920,7 @@ distribute_notes (notes, from_insn, i3, i2, elim_i2, elim_i1) && REGNO_REG_SET_P (bb->global_live_at_start, REGNO (XEXP (note, 0)))) { - SET_BIT (refresh_blocks, this_basic_block); + SET_BIT (refresh_blocks, this_basic_block->index); need_refresh = 1; } } @@ -12520,7 +12940,7 @@ distribute_notes (notes, from_insn, i3, i2, elim_i2, elim_i1) after we remove them in delete_noop_moves. */ if (noop_move_p (place)) { - SET_BIT (refresh_blocks, this_basic_block); + SET_BIT (refresh_blocks, this_basic_block->index); need_refresh = 1; } @@ -12569,8 +12989,8 @@ distribute_notes (notes, from_insn, i3, i2, elim_i2, elim_i1) 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); + rtx piece = regno_reg_rtx[i]; + basic_block bb = this_basic_block; if (! dead_or_set_p (place, piece) && ! reg_bitfield_target_p (piece, @@ -12593,7 +13013,7 @@ distribute_notes (notes, from_insn, i3, i2, elim_i2, elim_i1) if (tem == bb->head) { SET_BIT (refresh_blocks, - this_basic_block); + this_basic_block->index); need_refresh = 1; break; } @@ -12698,8 +13118,8 @@ distribute_links (links) 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 && (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 --git a/contrib/gcc/config.gcc b/contrib/gcc/config.gcc index bb71f51..6493ccf 100644 --- a/contrib/gcc/config.gcc +++ b/contrib/gcc/config.gcc @@ -45,6 +45,8 @@ # # 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,11 +71,9 @@ # 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_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,6 +104,8 @@ # 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. # @@ -184,8 +186,8 @@ extra_host_objs= extra_gcc_objs= c_target_objs= cxx_target_objs= +tm_defines= xm_defines= -float_format= # Set this to force installation and use of collect2. use_collect2= # Set this to override the default target model. @@ -206,71 +208,67 @@ thread_file= gas="$gas_flag" gnu_ld="$gnu_ld_flag" enable_threads=$enable_threads_flag +target_gtfiles= # 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. - ;; - *) + 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 @@ -278,7 +276,6 @@ case $machine in 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 @@ -299,10 +296,6 @@ arm*-*-*) 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" @@ -327,19 +320,20 @@ m68k-*-*) mips*-*-*) cpu_type=mips ;; -pj*-*-*) - cpu_type=pj - ;; powerpc*-*-*) cpu_type=rs6000 - extra_headers="ppc-asm.h altivec.h" + extra_headers="ppc-asm.h altivec.h spe.h" ;; sparc*-*-*) cpu_type=sparc ;; -sh64-*-*) +# 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 @@ -347,6 +341,11 @@ if test -f ${srcdir}/config/${cpu_type}/${cpu_type}-protos.h 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-*-*) @@ -369,6 +368,8 @@ case $machine in *-*-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' ;; @@ -392,8 +393,11 @@ case $machine in # 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/att.h dbxelf.h elfos.h svr4.h linux.h i386/linux.h gnu.h ${tm_file}" + 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 ;; @@ -411,6 +415,32 @@ case $machine in 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 @@ -483,39 +513,6 @@ case $machine in 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" @@ -546,11 +543,8 @@ alpha-*-interix) #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 + 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" @@ -566,8 +560,10 @@ alpha*-*-linux*) 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*-*-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" @@ -582,12 +578,13 @@ alpha*-*-netbsd*) ;; 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*) +alpha*-dec-osf[45]*) xm_defines=POSIX if test x$stabs = xyes then @@ -598,30 +595,22 @@ alpha*-dec-osf*) extra_passes="mips-tfile mips-tdump" fi use_collect2=yes - tmake_file="alpha/t-alpha alpha/t-ieee alpha/t-crtfm" + 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 - *-*-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 + # 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/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*) + tm_file="${tm_file} alpha/osf5.h" target_cpu_default=MASK_SUPPORT_ARCH ;; esac @@ -639,7 +628,7 @@ alpha*-*-vxworks*) ;; alpha64-dec-*vms*) xm_defines=POSIX - tm_file="alpha/vms.h alpha/vms64.h" + 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 @@ -657,7 +646,7 @@ alpha64-dec-*vms*) ;; alpha*-dec-*vms*) xm_defines=POSIX - tm_file=alpha/vms.h + 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 @@ -686,20 +675,6 @@ arm-*-vxworks*) 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 @@ -713,11 +688,13 @@ arm*-*-freebsd*|strongarm*-*-freebsd*) tmake_file="${tmake_file} arm/t-strongarm-elf" ;; arm*-*-netbsdelf*) - echo "GCC does not yet support the ${machine} target"; exit 1 + 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 @@ -770,27 +747,7 @@ arm-*-pe*) ;; 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*) +c4x-*-rtems* | tic4x-*-rtems*) xm_defines=POSIX tmake_file="c4x/t-c4x t-rtems" tm_file="c4x/c4x.h c4x/rtems.h rtems.h" @@ -800,18 +757,11 @@ c4x-*-rtems*) c_target_objs="c4x-c.o" cxx_target_objs="c4x-c.o" ;; -c4x-*) - float_format=c4x +c4x-* | tic4x-*) 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 @@ -825,28 +775,21 @@ cris-*-elf | cris-*-none) 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" ;; +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" @@ -854,30 +797,25 @@ h8300-*-rtems*) 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" + 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" + 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" - 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" @@ -973,7 +911,6 @@ hppa1.0-*-hpux8*) 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" @@ -990,7 +927,6 @@ hppa1.1-*-hpux10* | hppa2*-*-hpux10*) ;; 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" @@ -1007,12 +943,24 @@ hppa1.0-*-hpux10*) ;; 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 + 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 @@ -1021,12 +969,10 @@ hppa*64*-*-hpux11*) # 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" @@ -1042,7 +988,6 @@ hppa1.1-*-hpux11* | hppa2*-*-hpux11*) ;; 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" @@ -1119,195 +1064,117 @@ i370-*-linux*) 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-*-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/att.h dbxelf.h elfos.h i386/i386elf.h" + 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-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" + 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-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" + 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-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" + 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 ;; -i386-sun-sunos*) # Sun i386 roadrunner - xm_defines=POSIX - tm_file=i386/sun.h - use_collect2=yes +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=i386/vxi386.h + 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=i386/i386-aout.h + 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/att.h dbxelf.h elfos.h svr4.h i386/beos-elf.h" + 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-*-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 +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/att.h dbxelf.h elfos.h ${fbsd_tm_file} i386/freebsd.h" + 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/att.h dbxelf.h elfos.h ${fbsd_tm_file} i386/x86-64.h i386/freebsd.h i386/freebsd64.h" + 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/att.h dbxelf.h elfos.h netbsd.h netbsd-elf.h i386/netbsd-elf.h" - float_format=i386 + 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=i386/netbsd.h + 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/att.h dbxelf.h elfos.h netbsd.h netbsd-elf.h i386/x86-64.h i386/netbsd64.h" - float_format=i386 + 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=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 + tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h dbxcoff.h i386/i386-coff.h" ;; -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*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=i386/linux-aout.h + 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 - 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" + 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 - float_format=i386 if test x$enable_threads = xyes; then thread_file='single' fi @@ -1315,22 +1182,15 @@ i[34567]86-*-linux*libc1) # Intel 80386's running GNU/Linux 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" + 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" - 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 \ + 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-crtstuff i386/t-linux64" - extra_parts="crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o" - gnu_ld=yes - float_format=i386 + tmake_file="t-slibgcc-elf-ver t-linux i386/t-linux64" ;; 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." @@ -1338,19 +1198,18 @@ i[34567]86-go32-msdos | i[34567]86-*-go32*) ;; i[34567]86-pc-msdosdjgpp*) xm_file=i386/xm-djgpp.h - tm_file=i386/djgpp.h + tm_file="dbxcoff.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" + 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 @@ -1358,47 +1217,24 @@ i[34567]86-moss-msdos* | i[34567]86-*-moss*) i[34567]86-*-lynxos*) if test x$gas = xyes then - tm_file=i386/lynx.h + tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/gstabs.h lynx.h i386/lynx.h" else - tm_file=i386/lynx-ng.h + 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=i386/mach.h + 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-*-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-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*|i[34567]86-*-rtemself*) +i[34567]86-*-rtems*) xm_defines=POSIX - tm_file="${tm_file} i386/att.h dbxelf.h elfos.h i386/i386elf.h i386/rtemself.h rtems.h" + 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 @@ -1408,7 +1244,7 @@ i[34567]86-*-rtems*|i[34567]86-*-rtemself*) 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" + 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}" @@ -1420,10 +1256,7 @@ i[34567]86-*-sco3.2v5*) # 80386 running SCO Open Server 5 ;; 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 + 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" @@ -1447,7 +1280,7 @@ i[34567]86-*-solaris2*) ;; 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" + 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" @@ -1460,7 +1293,7 @@ i[34567]86-*-sysv5*) # Intel x86 on System V Release 5 ;; 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" + 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" @@ -1470,53 +1303,41 @@ i[34567]86-*-sysv4*) # Intel 80386's running system V.4 ;; 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" + 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-*-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 + 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.rfile" + extra_parts="svr3.ifile svr3z.ifile" else - tm_file=i386/svr3gas.h + 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=i386/sysv3.h + 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=i386/xm-vsta.h - tm_file=i386/vsta.h + 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 - float_format=i386 tmake_file=i386/t-cygwin - tm_file=i386/win32.h + tm_file="${tm_file} i386/win32.h" extra_objs=winnt.o if test x$enable_threads = xyes; then thread_file='win32' @@ -1526,7 +1347,6 @@ i[34567]86-*-win32) 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 @@ -1537,7 +1357,6 @@ i[34567]86-*-pe | i[34567]86-*-cygwin*) ;; 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" @@ -1555,7 +1374,7 @@ i[34567]86-*-mingw32*) esac ;; i[34567]86-*-uwin*) - tm_file=i386/uwin.h + 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 @@ -1564,11 +1383,11 @@ i[34567]86-*-uwin*) exeext=.exe ;; i[34567]86-*-interix3*) - tm_file="i386/i386-interix.h i386/i386-interix3.h interix.h interix3.h" + 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=interix.o + extra_objs=winnt.o xmake_file="x-interix" if test x$enable_threads = xyes ; then thread_file='posix' @@ -1578,11 +1397,11 @@ i[34567]86-*-interix3*) fi ;; i[34567]86-*-interix*) - tm_file="i386/i386-interix.h interix.h" + 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=interix.o + extra_objs=winnt.o if test x$enable_threads = xyes ; then thread_file='posix' fi @@ -1590,44 +1409,6 @@ i[34567]86-*-interix*) 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 @@ -1678,6 +1459,7 @@ ia64*-*-aix*) 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" @@ -1691,19 +1473,19 @@ ia64*-*-elf*) then target_cpu_default="${target_cpu_default}|MASK_GNU_LD" fi - float_format=i386 + 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" - float_format=i386 + 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" - float_format=i386 + 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" @@ -1712,11 +1494,15 @@ ia64*-*-hpux*) if test x$enable_threads = xyes; then thread_file='posix' fi - float_format=i386 + 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}" - extra_parts="crtinit.o crtfini.o" + extra_parts="crtinit.o crtfini.o m32rx/crtinit.o m32rx/crtfini.o" ;; # m68hc11 and m68hc12 share the same machine description. m68hc11-*-*|m6811-*-*) @@ -1733,11 +1519,6 @@ m68hc12-*-*|m6812-*-*) 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 @@ -1772,63 +1553,16 @@ m68000-att-sysv*) 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-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 @@ -1853,7 +1587,6 @@ m68k-motorola-sysv*) 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 @@ -1879,32 +1612,18 @@ m68k-cbm-sysv4*) # Commodore variant of V.4. 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 @@ -1918,7 +1637,6 @@ m68k-hp-hpux7*) # HP 9000 series 300 running HPUX version 7. fi install_headers_dir=install-headers-cpio use_collect2=yes - float_format=m68k ;; m68k-hp-hpux*) # HP 9000 series 300 xm_defines=POSIX @@ -1932,71 +1650,26 @@ m68k-hp-hpux*) # HP 9000 series 300 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 +m68k-sun-sunos3*) + if test x$with_fp = xno then - tm_file=m68k/news3gas.h + tm_file=m68k/sun3n3.h else - tm_file=m68k/news3.h + tm_file=m68k/sun3o3.h fi use_collect2=yes - float_format=m68k ;; -m68k-sony-bsd* | m68k-sony-newsos*) - if test x$gas = xyes +m68k-sun-sunos*) # For SunOS 4 (the default). + if test x$with_fp = xno then - tm_file=m68k/newsgas.h + tm_file=m68k/sun3n.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 - then - tm_file=m68k/sun3n3.h - else - tm_file=m68k/sun3o3.h - float_format=m68k - fi - use_collect2=yes - ;; -m68k-sun-sunos*) # For SunOS 4 (the default). - if test x$with_fp = xno - then - tm_file=m68k/sun3n.h - else - tm_file=m68k/sun3.h - float_format=m68k + tm_file=m68k/sun3.h fi use_collect2=yes ;; @@ -2004,17 +1677,14 @@ m68k-wrs-vxworks*) 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" @@ -2022,16 +1692,6 @@ m68020-*-elf* | m68k-*-elf*) 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 @@ -2042,38 +1702,29 @@ m68010-*-netbsdelf* | m68k*-*-netbsdelf*) 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 + extra_parts="" 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 @@ -2082,7 +1733,6 @@ m68k-*-linux*libc1) # Motorola m68k's running GNU/Linux 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 @@ -2090,104 +1740,32 @@ m68k-*-linux*) # Motorola m68k's running GNU/Linux # 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" - 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-*-rtemscoff*) # would otherwise be caught by m68k-*-rtems* + echo "*** Configuration $machine not supported" 1>&2 + exit 1 ;; -m68k-*-rtemself*|m68k-*-rtems*) +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" @@ -2202,6 +1780,30 @@ mcore-*-pe*) 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 mips/dbxmdebug.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 @@ -2209,14 +1811,14 @@ mips-sgi-irix6*) # SGI System V.4., IRIX 6 else tm_file=mips/iris6.h fi - tmake_file="mips/t-iris mips/t-iris6" + 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="mips/elf.h mips/vxworks.h" + tm_file="${tm_file} mips/elf.h mips/vxworks.h" tmake_file=mips/t-ecoff gas=yes gnu_ld=yes @@ -2258,12 +1860,14 @@ mips-sgi-irix5*) # SGI System V.4., IRIX 5 tm_file="mips/iris5.h mips/iris5gas.h" if test x$stabs = xyes then - tm_file="${tm_file} dbx.h" + tm_file="${tm_file} dbx.h mips/dbxmdebug.h" fi + tmake_file=mips/t-iris5-gas else tm_file=mips/iris5.h + tmake_file=mips/t-iris5-as fi - tmake_file=mips/t-iris + 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 @@ -2273,122 +1877,24 @@ mips-sgi-irix5*) # SGI System V.4., IRIX 5 # 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-sgi-*) # would otherwise be caught by mips-*-elf* + echo "*** Configuration $machine not supported" 1>&2 + exit 1 ;; -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 + 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 mips/linux.h" + tm_file="dbxelf.h elfos.h svr4.h linux.h ${tm_file} mips/linux.h" case $machine in mipsisa32*-*) - tm_file="$tm_file mips/isa32-linux.h" target_cpu_default="MASK_SOFT_FLOAT" + tm_defines="MIPS_ISA_DEFAULT=32" ;; 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" @@ -2397,278 +1903,83 @@ mips*-*-openbsd*) # mips big endian 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 +mips-*-ecoff* | mipsel-*-ecoff*) 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" +mipsisa32-*-elf* | mipsisa32el-*-elf*) + tm_file="${tm_file} mips/elf.h" tmake_file=mips/t-isa3264 - target_cpu_default="MASK_SOFT_FLOAT" - ;; -mipsel-*-elf*) - tm_file="mips/elfl.h" - tmake_file=mips/t-elf + tm_defines="MIPS_ISA_DEFAULT=32 MIPS_ABI_DEFAULT=ABI_MEABI" ;; -mips-*-elf*) - tm_file="mips/elf.h" +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" ;; -mips64el-*-elf*) - tm_file="mips/elfl64.h" +mips-*-elf* | mipsel-*-elf*) + tm_file="${tm_file} mips/elf.h" tmake_file=mips/t-elf ;; -mips64orionel-*-elf*) - tm_file="mips/elforion.h mips/elfl64.h" +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" ;; -mips64-*-elf*) - tm_file="mips/elf64.h" +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 - ;; -mips64orion-*-elf*) - tm_file="mips/elforion.h 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" ;; mips64orion-*-rtems*) xm_defines=POSIX - tm_file="mips/elforion.h mips/elf64.h mips/rtems64.h rtems.h" + 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="mips/elf.h mips/rtems.h rtems.h" + 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 ;; -mipstx39el-*-elf*) - tm_file="mips/r3900.h mips/elfl.h mips/abi64.h" +mipstx39-*-elf* | mipstx39el-*-elf*) + tm_file="${tm_file} mips/r3900.h mips/elf.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 @@ -2684,42 +1995,14 @@ mn10300-*-*) 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 + 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 + tmake_file="t-netbsd ns32k/t-ns32k" + extra_parts="" use_collect2=yes ;; pdp11-*-bsd) @@ -2732,21 +2015,6 @@ avr-*-*) 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 ;; @@ -2762,7 +2030,7 @@ powerpc64-*-linux*) 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" + 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" @@ -2773,10 +2041,12 @@ powerpc-*-beos*) 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 + 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 @@ -2793,8 +2063,8 @@ powerpc-*-sysv*) 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" + 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 @@ -2811,10 +2081,15 @@ powerpc-*-eabiaix*) 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-ppcgas rs6000/t-ppccomm" + tmake_file="rs6000/t-ppcendian rs6000/t-ppccomm" ;; powerpc-*-eabisim*) xm_defines=POSIX @@ -2829,7 +2104,7 @@ powerpc-*-elf*) 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" + tmake_file="rs6000/t-ppcendian rs6000/t-ppccomm" ;; powerpc-*-eabi*) xm_defines=POSIX @@ -2884,6 +2159,12 @@ powerpc-wrs-vxworks*) 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" @@ -2913,14 +2194,12 @@ powerpcle-*-eabi*) 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= ;; @@ -2928,7 +2207,6 @@ rs6000-ibm-aix4.[12]* | powerpc-ibm-aix4.[12]*) 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= ;; @@ -2936,16 +2214,22 @@ rs6000-ibm-aix4.[3456789]* | powerpc-ibm-aix4.[3456789]*) 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].*) +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 - 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/aix52.h rs6000/xcoff.h" + tmake_file=rs6000/t-aix52 use_collect2=yes thread_file='aix' extra_headers= @@ -2953,13 +2237,11 @@ rs6000-ibm-aix[56789].* | powerpc-ibm-aix[56789].*) 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*) @@ -2974,37 +2256,45 @@ rs6000-*-lynxos*) ;; 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" + 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-linux s390/t-linux64" - extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o" + tmake_file="t-slibgcc-elf-ver t-linux s390/t-crtstuff s390/t-linux64" ;; -sh-*-elf*) +sh-*-elf* | sh[2346l]*-*-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 + 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} sh/elf.h sh/rtemself.h rtems.h" - float_format=sh + 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 @@ -3012,27 +2302,80 @@ sh-*-rtemself*) sh-*-rtems*) xm_defines=POSIX tmake_file="sh/t-sh t-rtems" - tm_file="${tm_file} sh/rtems.h rtems.h" - float_format=sh + 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*) - tm_file="${tm_file} sh/elf.h sh/linux.h" +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 - float_format=sh + 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-*-*) - float_format=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 sparc/sol2.h sparc/elf.h sparc/biarch64.h gofast.h sparc/vxsparc64.h" + 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 ;; @@ -3052,6 +2395,7 @@ sparc-*-netbsdelf*) 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*) @@ -3066,16 +2410,14 @@ sparc64-*-openbsd*) 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" + 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" - float_format=i64 case x${enable_threads} in xyes | xpthreads | xposix) thread_file='posix' @@ -3083,29 +2425,23 @@ sparc-*-chorusos*) esac ;; sparc-*-elf*) - tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/sol2.h sparc/elf.h" + 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" - #float_format=i128 - float_format=i64 ;; -sparc-*-linux*aout*) # Sparc's running GNU/Linux, a.out +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 +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 +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 @@ -3116,27 +2452,21 @@ sparc-*-lynxos*) 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-*-rtemsaout*) # would otherwise be caught by sparc-*-rtems* + echo "*** Configuration $machine not supported" 1>&2 + exit 1 ;; -sparc-*-rtems*|sparc-*-rtemself*) +sparc-*-rtems*) 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" + 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" - #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" + 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 @@ -3151,7 +2481,6 @@ sparc64-*-solaris2* | sparcv9-*-solaris2*) 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 @@ -3168,7 +2497,7 @@ sparc64-*-solaris2* | sparcv9-*-solaris2*) ;; 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" + 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" @@ -3177,11 +2506,10 @@ sparc-hal-solaris2*) 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" + 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 @@ -3192,6 +2520,11 @@ sparc-*-solaris2*) 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 @@ -3203,16 +2536,8 @@ sparc-*-solaris2*) 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 @@ -3267,7 +2592,7 @@ sparclite-*-aout*) 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" + 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" ;; @@ -3276,7 +2601,7 @@ sparc86x-*-aout*) 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" + 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" ;; @@ -3284,7 +2609,7 @@ sparc64-*-aout*) 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" + 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" ;; @@ -3298,36 +2623,35 @@ sparc64-*-freebsd*|ultrasparc-*-freebsd*) *) echo "$with_cpu not supported for freebsd target"; exit 1 ;; esac ;; -sparc64-*-linux*) # 64-bit Sparc's running GNU/Linux +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 + 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*-*-*) @@ -3348,6 +2672,21 @@ v850-*-rtems*) 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}" @@ -3361,55 +2700,49 @@ v850-*-*) cxx_target_objs="v850-c.o" ;; vax-*-bsd*) # VAXen running BSD + tm_file="${tm_file} vax/bsd.h" 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 + 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 - float_format=vax + extra_parts="" 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 + 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'. @@ -3429,12 +2762,10 @@ xtensa-*-elf*) ;; xtensa-*-linux*) tm_file="${tm_file} dbxelf.h elfos.h svr4.h linux.h xtensa/linux.h" - tmake_file="t-linux xtensa/t-xtensa" - extra_parts="crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o" - gas=yes gnu_ld=yes + tmake_file="t-slibgcc-elf-ver t-linux xtensa/t-xtensa" ;; *) - echo "Configuration $machine not supported" 1>&2 + echo "*** Configuration $machine not supported" 1>&2 exit 1 ;; esac @@ -3464,7 +2795,7 @@ i586-*-*) k6-*) target_cpu_default2=TARGET_CPU_DEFAULT_k6 ;; - pentium_mmx-*) + pentium_mmx-*|winchip_c6-*|winchip2-*|c3-*) target_cpu_default2=TARGET_CPU_DEFAULT_pentium_mmx ;; *) @@ -3566,23 +2897,49 @@ hppa*-*-* | parisc*-*-*) then target_cpu_default2="MASK_GAS|MASK_JUMP_IN_DELAY" fi + case $machine in + hppa1* | parisc1*) + tm_defines="TARGET_SCHED_DEFAULT=\\\"7100LC\\\"" + ;; + esac ;; - -mips*-*-ecoff* | mips*-*-elf*) - if test x$gas = xyes - then - if test x$gnu_ld = xyes +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|MASK_SPLIT_ADDR" - else target_cpu_default2="MASK_GAS" fi - fi - ;; -mips*-*-*) - if test x$gas = xyes + ;; + 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 - target_cpu_default2="MASK_GAS" + 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-*-*) @@ -3603,7 +2960,6 @@ powerpc*-*-* | rs6000-*-*) x401 | x403 | x405 | xec603e | x801 | x821 | x823 | x860) target_cpu_default2="\\\"$with_cpu\\\"" - tm_file="$tm_file rs6000/softfloat.h" ;; xyes | xno) @@ -3619,6 +2975,9 @@ powerpc*-*-* | rs6000-*-*) 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 @@ -3637,6 +2996,22 @@ sparc*-*-*) ;; 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 --git a/contrib/gcc/config.in b/contrib/gcc/config.in index ec5be95..bc52d36 100644 --- a/contrib/gcc/config.in +++ b/contrib/gcc/config.in @@ -1,4 +1,4 @@ -/* config.in. Generated automatically from configure.in by autoheader. */ +/* config.in. Generated automatically from configure.in by autoheader 2.13. */ /* Define if using alloca.c. */ #undef C_ALLOCA @@ -93,6 +93,9 @@ /* 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 @@ -138,15 +141,15 @@ /* Define if you have the getgid function. */ #undef HAVE_GETGID -/* Define if you have the getpagesize function. */ -#undef HAVE_GETPAGESIZE - /* Define if you have the getrlimit function. */ #undef HAVE_GETRLIMIT /* Define if you have the getrusage function. */ #undef HAVE_GETRUSAGE +/* Define if you have the gettimeofday function. */ +#undef HAVE_GETTIMEOFDAY + /* Define if you have the getuid function. */ #undef HAVE_GETUID @@ -159,6 +162,9 @@ /* Define if you have the mempcpy function. */ #undef HAVE_MEMPCPY +/* Define if you have the mmap function. */ +#undef HAVE_MMAP + /* Define if you have the munmap function. */ #undef HAVE_MUNMAP @@ -171,6 +177,9 @@ /* 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 @@ -246,6 +255,9 @@ /* Define if you have the header file. */ #undef HAVE_SYS_FILE_H +/* Define if you have the header file. */ +#undef HAVE_SYS_MMAN_H + /* Define if you have the header file. */ #undef HAVE_SYS_PARAM_H @@ -273,39 +285,6 @@ /* 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 @@ -339,6 +318,48 @@ /* 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 @@ -372,15 +393,15 @@ /* Define if printf supports %p. */ #undef HAVE_PRINTF_PTR -/* Define if mmap can get us zeroed pages from /dev/zero. */ +/* Define if read-only mmap of a plain file works. */ +#undef HAVE_MMAP_FILE + +/* Define if mmap of /dev/zero works. */ #undef HAVE_MMAP_DEV_ZERO -/* Define if mmap can get us zeroed pages using MAP_ANON(YMOUS). */ +/* Define if mmap with MAP_ANON(YMOUS) works. */ #undef HAVE_MMAP_ANON -/* Define if read-only mmap of a plain file works. */ -#undef HAVE_MMAP_FILE - /* Define if you have the iconv() function. */ #undef HAVE_ICONV @@ -430,6 +451,9 @@ #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,6 +483,9 @@ /* 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,9 +495,20 @@ /* 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,6 +561,9 @@ /* 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,6 +585,9 @@ /* 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,12 +598,22 @@ /* 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 --git a/contrib/gcc/config/alpha/alpha-interix.h b/contrib/gcc/config/alpha/alpha-interix.h index 4dc2186..3f1580d 100644 --- a/contrib/gcc/config/alpha/alpha-interix.h +++ b/contrib/gcc/config/alpha/alpha-interix.h @@ -1,6 +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. + Copyright (C) 1995, 1996, 1999, 2000, 2002 Free Software Foundation, Inc. Donn Terry, Softway Systems, Inc. From code @@ -25,15 +25,18 @@ Boston, MA 02111-1307, USA. */ /* 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" +#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 "\ @@ -64,17 +67,9 @@ Boston, MA 02111-1307, USA. */ /* 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. */ +/* Support const sections and the ctors and dtors sections for g++. */ -#define USE_CONST_SECTION 1 - -#define CONST_SECTION_ASM_OP "\t.rdata" +#define READONLY_DATA_SECTION_ASM_OP "\t.rdata" /* Define the pseudo-ops used to switch to the .ctors and .dtors sections. @@ -94,38 +89,6 @@ Boston, MA 02111-1307, USA. */ #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 @@ -185,15 +148,3 @@ while (0) 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) diff --git a/contrib/gcc/config/alpha/alpha-protos.h b/contrib/gcc/config/alpha/alpha-protos.h index c6fdd04..fe4943b 100644 --- a/contrib/gcc/config/alpha/alpha-protos.h +++ b/contrib/gcc/config/alpha/alpha-protos.h @@ -1,5 +1,5 @@ /* Prototypes for alpha.c functions used in the md file & elsewhere. - Copyright (C) 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of GNU CC. @@ -34,10 +34,10 @@ extern void alpha_expand_epilogue PARAMS ((void)); 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 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)); @@ -47,8 +47,7 @@ extern int or_operand PARAMS ((rtx, enum machine_mode)); 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 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)); @@ -61,6 +60,12 @@ extern int local_symbolic_operand PARAMS ((rtx, enum machine_mode)); 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)); @@ -108,13 +113,7 @@ extern rtx alpha_emit_set_long_const PARAMS ((rtx, HOST_WIDE_INT, 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))); @@ -124,61 +123,55 @@ extern void alpha_expand_unaligned_store PARAMS ((rtx, rtx, HOST_WIDE_INT, 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)); -#endif /* RTX_CODE */ + +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)); + 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 *)); +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 -#endif /* TARGET_ABI_OPEN_VMS */ -#ifdef RTX_CODE extern rtx alpha_need_linkage PARAMS ((const char *, int)); -#endif +extern rtx alpha_use_linkage PARAMS ((rtx, tree, int, int)); -#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)); +#if TARGET_ABI_OPEN_VMS +#ifdef HAVE_MACHINE_MODES +extern enum avms_arg_type alpha_arg_type PARAMS ((enum machine_mode)); #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 */ +extern rtx alpha_arg_info_reg_val PARAMS ((CUMULATIVE_ARGS)); +#endif /* TARGET_ABI_OPEN_VMS */ -#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)); diff --git a/contrib/gcc/config/alpha/alpha.c b/contrib/gcc/config/alpha/alpha.c index 3bc8e4d..9657e56 100644 --- a/contrib/gcc/config/alpha/alpha.c +++ b/contrib/gcc/config/alpha/alpha.c @@ -1,6 +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. + 2000, 2001, 2002, 2003 Free Software Foundation, Inc. Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu) This file is part of GNU CC. @@ -47,6 +47,7 @@ Boston, MA 02111-1307, USA. */ #include "target.h" #include "target-def.h" #include "debug.h" +#include "langhooks.h" /* Specify which cpu to schedule for. */ @@ -68,6 +69,10 @@ enum alpha_fp_rounding_mode alpha_fprm; 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= */ @@ -76,13 +81,14 @@ const char *alpha_tp_string; /* -mtrap-precision=[p|s|i] */ 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; -/* Non-zero if inside of a function, because the Alpha asm can't +/* Nonzero if inside of a function, because the Alpha asm can't handle .files inside of functions. */ static int inside_function = FALSE; @@ -112,14 +118,22 @@ int alpha_this_literal_sequence_number; 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 bool local_symbol_p - PARAMS ((rtx)); static void alpha_set_memflags_1 PARAMS ((rtx, int, int, int)); static rtx alpha_emit_set_const_1 @@ -128,9 +142,13 @@ static void alpha_expand_unaligned_load_words 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 +static int find_lo_sum_using_gp PARAMS ((rtx *, void *)); static int alpha_does_function_need_gp PARAMS ((void)); @@ -140,6 +158,10 @@ static const char *get_trap_mode_suffix 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 @@ -156,18 +178,31 @@ static int alpha_adjust_cost PARAMS ((rtx, rtx, rtx, int)); static int alpha_issue_rate PARAMS ((void)); -static int alpha_variable_issue - PARAMS ((FILE *, int, rtx, int)); +static int alpha_use_dfa_pipeline_interface + PARAMS ((void)); +static int alpha_multipass_dfa_lookahead + PARAMS ((void)); -#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)); +#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 *)); @@ -196,15 +231,27 @@ static void vms_asm_out_destructor PARAMS ((rtx, int)); # 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 @@ -223,6 +270,11 @@ static unsigned int unicosmk_section_type_flags PARAMS ((tree, const char *, #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 @@ -230,8 +282,27 @@ static unsigned int unicosmk_section_type_flags PARAMS ((tree, const char *, #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 +#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; @@ -352,6 +423,18 @@ override_options () 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); @@ -494,12 +577,16 @@ override_options () /* 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 + + /* 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. */ @@ -526,7 +613,7 @@ reg_or_0_operand (op, mode) register rtx op; enum machine_mode mode; { - return op == const0_rtx || register_operand (op, 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 @@ -555,6 +642,16 @@ reg_or_8bit_operand (op, mode) || 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 @@ -661,24 +758,26 @@ mode_mask_operand (op, mode) 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 + if (GET_CODE (op) == CONST_INT) + { + HOST_WIDE_INT value = INTVAL (op); - 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 - )); + 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. */ @@ -693,25 +792,14 @@ mul8_operand (op, mode) && (INTVAL (op) & 7) == 0); } -/* Return 1 if OP is the constant zero in floating-point. */ +/* Return 1 if OP is the zero constant for MODE. */ int -fp0_operand (op, mode) +const0_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 op == CONST0_RTX (mode); } /* Return 1 if OP is a hard floating-point register. */ @@ -769,8 +857,15 @@ some_operand (op, mode) switch (GET_CODE (op)) { - case REG: case MEM: case CONST_DOUBLE: case CONST_INT: case LABEL_REF: - case SYMBOL_REF: case CONST: case HIGH: + 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: @@ -824,7 +919,9 @@ input_operand (op, mode) symbolic operands to be reconstructed from their high/lo_sum form. */ return (small_symbolic_operand (op, mode) - || global_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. */ @@ -847,7 +944,8 @@ input_operand (op, mode) && general_operand (op, mode)); case CONST_DOUBLE: - return GET_MODE_CLASS (mode) == MODE_FLOAT && op == CONST0_RTX (mode); + case CONST_VECTOR: + return op == CONST0_RTX (mode); case CONST_INT: return mode == QImode || mode == HImode || add_operand (op, mode); @@ -911,31 +1009,15 @@ direct_call_operand (op, mode) } /* 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] == '$')); -} + 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; @@ -950,7 +1032,26 @@ local_symbolic_operand (op, mode) if (GET_CODE (op) != SYMBOL_REF) return 0; - return local_symbol_p (op); + /* 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 @@ -982,7 +1083,7 @@ small_symbolic_operand (op, mode) else { str = XSTR (op, 0); - return str[0] == '@' && str[1] == 's'; + return str[0] == '@' && str[1] == 'S'; } } @@ -994,6 +1095,8 @@ global_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; @@ -1005,7 +1108,12 @@ global_symbolic_operand (op, mode) if (GET_CODE (op) != SYMBOL_REF) return 0; - return ! local_symbol_p (op); + 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. */ @@ -1058,6 +1166,110 @@ symbolic_operand (op, mode) 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. */ @@ -1455,7 +1667,9 @@ alpha_extra_constraint (value, c) 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; } @@ -1528,6 +1742,54 @@ alpha_tablejump_best_label (insn) 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. */ @@ -1545,6 +1807,36 @@ decl_in_text_section (decl) && 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. @@ -1553,25 +1845,38 @@ decl_in_text_section (decl) to the name. If in addition the variable is to go in .sdata/.sbss, then add "@s" instead. */ -void -alpha_encode_section_info (decl) +static void +alpha_encode_section_info (decl, first) tree decl; + int first ATTRIBUTE_UNUSED; { const char *symbol_str; - bool is_local, is_small; + 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 (XEXP (DECL_RTL (decl), 0)) = 1; + SYMBOL_REF_FLAG (symbol) = 1; return; } @@ -1579,98 +1884,100 @@ alpha_encode_section_info (decl) 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); + symbol_str = XSTR (symbol, 0); /* A variable is considered "local" if it is defined in this module. */ + is_local = (*targetm.binds_local_p) (decl); - 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)) + /* Care for TLS variables. */ + if (TREE_CODE (decl) == VAR_DECL && DECL_THREAD_LOCAL (decl)) { - const char *section = TREE_STRING_POINTER (DECL_SECTION_NAME (decl)); - if (strcmp (section, ".sdata") == 0 - || strcmp (section, ".sbss") == 0) - is_small = true; + 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 + else if (is_local) { - 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; + /* 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 (is_local) + if (encoding) { - const char *string; char *newstr; size_t len; + char want_prefix = (is_local ? '@' : '%'); + char other_prefix = (is_local ? '%' : '@'); - if (symbol_str[0] == '@') + if (symbol_str[0] == want_prefix) { - if (symbol_str[1] == (is_small ? 's' : 'v')) + 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] = '@'; - newstr[1] = (is_small ? 's' : 'v'); + newstr[0] = want_prefix; + newstr[1] = encoding; 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. */ + 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. @@ -1710,6 +2017,11 @@ alpha_legitimate_address_p (mode, x, strict) 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) { @@ -1765,7 +2077,9 @@ alpha_legitimate_address_p (mode, x, strict) return false; /* The symbol must be local. */ - if (local_symbolic_operand (ofs, Pmode)) + if (local_symbolic_operand (ofs, Pmode) + || dtp32_symbolic_operand (ofs, Pmode) + || tp32_symbolic_operand (ofs, Pmode)) return true; } } @@ -1831,6 +2145,100 @@ alpha_legitimize_address (x, scratch, mode) /* 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)) @@ -2156,6 +2564,8 @@ alpha_set_memflags_1 (x, in_struct_p, volatile_p, unchanging_p) 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, @@ -2190,11 +2600,11 @@ alpha_set_memflags_1 (x, in_struct_p, volatile_p, unchanging_p) } } -/* 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. */ +/* 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) @@ -2555,6 +2965,8 @@ alpha_expand_mov (mode, operands) tmp = alpha_legitimize_address (operands[1], operands[0], mode); if (tmp) { + if (tmp == operands[0]) + return true; operands[1] = tmp; return false; } @@ -2603,7 +3015,7 @@ alpha_expand_mov (mode, operands) } /* Otherwise we've nothing left but to drop the thing to memory. */ - operands[1] = force_const_mem (DImode, operands[1]); + operands[1] = force_const_mem (mode, operands[1]); if (reload_in_progress) { emit_move_insn (operands[0], XEXP (operands[1], 0)); @@ -2907,7 +3319,7 @@ alpha_emit_conditional_branch (code) } else { - /* ??? We mark the the branch mode to be CCmode to prevent the + /* ??? 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; @@ -3075,7 +3487,7 @@ alpha_emit_setcc (code) /* 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 + 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 @@ -3107,7 +3519,7 @@ alpha_emit_conditional_move (cmp, mode) /* 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 + zero/nonzero value to integer registers, where we can then use a normal cmov, or vice-versa. */ switch (code) @@ -3639,7 +4051,7 @@ alpha_split_tfmode_frobsign (operands, operation) alpha_split_tfmode_pair (operands); - /* Detect three flavours of operand overlap. */ + /* Detect three flavors of operand overlap. */ move = 1; if (rtx_equal_p (operands[0], operands[2])) move = 0; @@ -3885,17 +4297,13 @@ alpha_expand_unaligned_store (dst, src, size, ofs) 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 + 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; } @@ -3932,17 +4340,13 @@ alpha_expand_unaligned_store (dst, src, size, ofs) 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 + 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; } } @@ -4068,11 +4472,6 @@ alpha_expand_unaligned_store_words (data_regs, dmem, words, ofs) { 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; @@ -4136,13 +4535,13 @@ alpha_expand_unaligned_store_words (data_regs, dmem, words, ofs) /* 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_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, im1, dreg)); + emit_insn (gen_mskxl_le (st_tmp_1, st_tmp_1, constm1_rtx, dreg)); } if (data_regs != NULL) @@ -4807,6 +5206,75 @@ alpha_expand_block_clear (operands) 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. */ @@ -4818,15 +5286,13 @@ alpha_adjust_cost (insn, link, dep_insn, cost) 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; + 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) @@ -4841,122 +5307,13 @@ alpha_adjust_cost (insn, link, dep_insn, cost) || 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." */ + /* Everything else handled in DFA bypasses now. */ - 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. */ +/* The number of instructions that can be issued per cycle. */ + static int alpha_issue_rate () { @@ -4964,57 +5321,50 @@ alpha_issue_rate () } static int -alpha_variable_issue (dump, verbose, insn, cim) - FILE *dump ATTRIBUTE_UNUSED; - int verbose ATTRIBUTE_UNUSED; - rtx insn; - int cim; +alpha_use_dfa_pipeline_interface () { - if (recog_memoized (insn) < 0 || get_attr_type (insn) == TYPE_MULTI) - return 0; - - return cim - 1; + return true; } - -/* Register global variables and machine-specific functions with the - garbage collector. */ +/* 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. -#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)); + 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. */ - p->machine->first_ciw = NULL_RTX; - p->machine->last_ciw = NULL_RTX; - p->machine->ciw_count = 0; - p->machine->addr_list = NULL_RTX; +static int +alpha_multipass_dfa_lookahead () +{ + return (alpha_cpu == PROCESSOR_EV6 ? 4 : 2); } + +/* Machine-specific function data. */ -static void -alpha_mark_machine_status (p) - struct function *p; +struct machine_function GTY(()) { - struct machine_function *machine = p->machine; + /* 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; - if (machine) - { - ggc_mark_rtx (machine->first_ciw); - ggc_mark_rtx (machine->addr_list); - } -} + /* List of deferred case vectors. */ + struct rtx_def *addr_list; -static void -alpha_free_machine_status (p) - struct function *p; + /* For OSF. */ + const char *some_ld_name; +}; + +/* How to allocate a 'struct machine_function'. */ + +static struct machine_function * +alpha_init_machine_status () { - free (p->machine); - p->machine = NULL; + return ((struct machine_function *) + ggc_alloc_cleared (sizeof (struct machine_function))); } -#endif /* TARGET_ABI_UNICOSMK */ /* Functions to save and restore alpha_return_addr_rtx. */ @@ -5039,7 +5389,7 @@ alpha_gp_save_rtx () { rtx r = get_hard_reg_initial_val (DImode, 29); if (GET_CODE (r) != MEM) - r = gen_mem_addressof (r, NULL_TREE); + r = gen_mem_addressof (r, NULL_TREE, /*rescan=*/true); return r; } @@ -5158,6 +5508,45 @@ get_round_mode_suffix () 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 @@ -5175,6 +5564,10 @@ print_operand (file, x, code) assemble_name (file, alpha_fnname); break; + case '&': + assemble_name (file, get_some_local_dynamic_name ()); + break; + case '/': { const char *trap = get_trap_mode_suffix (); @@ -5216,13 +5609,30 @@ print_operand (file, x, code) 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"); + { + 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': @@ -5330,31 +5740,40 @@ print_operand (file, x, code) 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"); + 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': @@ -5456,6 +5875,19 @@ print_operand (file, x, code) 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; @@ -5485,7 +5917,36 @@ print_operand_address (file, addr) if (GET_CODE (addr) == LO_SUM) { - output_addr_const (file, XEXP (addr, 1)); + 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); @@ -5502,7 +5963,7 @@ print_operand_address (file, addr) abort (); fprintf (file, "($%d)\t\t!%s", basereg, - (basereg == 29 ? "gprel" : "gprellow")); + (basereg == 29 ? reloc16 : reloclo)); return; } @@ -5513,6 +5974,24 @@ print_operand_address (file, addr) 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 (); @@ -5577,7 +6056,7 @@ alpha_initialize_trampoline (tramp, fnaddr, cxt, fnofs, cxtofs, jmpofs) #ifdef TRANSFER_FROM_TRAMPOLINE emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "__enable_execute_stack"), - 0, VOIDmode, 1, addr, Pmode); + 0, VOIDmode, 1, tramp, Pmode); #endif if (jmpofs >= 0) @@ -5723,7 +6202,7 @@ alpha_build_va_list () if (TARGET_ABI_OPEN_VMS || TARGET_ABI_UNICOSMK) return ptr_type_node; - record = make_lang_type (RECORD_TYPE); + 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; @@ -5746,8 +6225,7 @@ alpha_build_va_list () } void -alpha_va_start (stdarg_p, valist, nextarg) - int stdarg_p; +alpha_va_start (valist, nextarg) tree valist; rtx nextarg ATTRIBUTE_UNUSED; { @@ -5758,7 +6236,7 @@ alpha_va_start (stdarg_p, valist, nextarg) return; if (TARGET_ABI_UNICOSMK) - std_expand_builtin_va_start (stdarg_p, valist, nextarg); + 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 @@ -5767,12 +6245,15 @@ alpha_va_start (stdarg_p, valist, nextarg) 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. */ + 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 <= 5 + stdarg_p) + if (NUM_ARGS <= 6) offset = TARGET_ABI_OPEN_VMS ? UNITS_PER_WORD : 6 * UNITS_PER_WORD; else - offset = -6 * UNITS_PER_WORD; + offset = -6 * UNITS_PER_WORD + current_function_pretend_args_size; if (TARGET_ABI_OPEN_VMS) { @@ -5897,6 +6378,310 @@ alpha_va_arg (valist, type) 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. */ @@ -5934,10 +6719,11 @@ alpha_sa_mask (imaskP, fmaskP) 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. */ + 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; @@ -6012,7 +6798,7 @@ alpha_sa_size () alpha_procedure_type = (sa_size || get_frame_size() != 0 - || current_function_outgoing_args_size || current_function_varargs + || current_function_outgoing_args_size || current_function_stdarg || current_function_calls_alloca || frame_pointer_needed) ? PT_STACK : PT_REGISTER; @@ -6111,11 +6897,18 @@ const struct attribute_spec vms_attribute_table[] = #endif static int -find_lo_sum (px, data) +find_lo_sum_using_gp (px, data) rtx *px; void *data ATTRIBUTE_UNUSED; { - return GET_CODE (*px) == LO_SUM; + 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 @@ -6144,15 +6937,9 @@ alpha_does_function_need_gp () 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; - } + && GET_CODE (PATTERN (insn)) != CLOBBER + && get_attr_usegp (insn)) + return 1; return 0; } @@ -6179,22 +6966,30 @@ alpha_write_verstamp (file) static rtx set_frame_related_p () { - rtx seq = gen_sequence (); + rtx seq = get_insns (); + rtx insn; + end_sequence (); - if (GET_CODE (seq) == SEQUENCE) + if (!seq) + return NULL_RTX; + + if (INSN_P (seq)) { - int i = XVECLEN (seq, 0); - while (--i >= 0) - RTX_FRAME_RELATED_P (XVECEXP (seq, 0, i)) = 1; - return emit_insn (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; } + return seq; } #define FRP(exp) (start_sequence (), exp, set_frame_related_p ()) @@ -6698,26 +7493,13 @@ alpha_start_function (file, fnname, decl) } #if TARGET_ABI_OPEN_VMS - /* Ifdef'ed cause readonly_section and link_section are only - available then. */ - readonly_section (); + /* 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); - - 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 @@ -7003,6 +7785,39 @@ alpha_expand_epilogue () } } } + +#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. */ @@ -7010,7 +7825,7 @@ void alpha_end_function (file, fnname, decl) FILE *file; const char *fnname; - tree decl ATTRIBUTE_UNUSED; + tree decl; { /* End the function. */ if (!TARGET_ABI_UNICOSMK && !flag_inhibit_size_directive) @@ -7021,20 +7836,20 @@ alpha_end_function (file, fnname, decl) } inside_function = FALSE; - /* Show that we know this function if it is called again. +#if TARGET_ABI_OPEN_VMS + alpha_write_linkage (file, fnname, decl); +#endif + + /* 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. + 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 (!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; + 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) @@ -7044,7 +7859,8 @@ alpha_end_function (file, fnname, decl) } } -/* Emit a tail call to FUNCTION after adjusting THIS by DELTA. +#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 @@ -7053,11 +7869,12 @@ alpha_end_function (file, fnname, decl) Not sure why this idea hasn't been explored before... */ -void -alpha_output_mi_thunk_osf (file, thunk_fndecl, delta, function) +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; @@ -7092,6 +7909,37 @@ alpha_output_mi_thunk_osf (file, thunk_fndecl, delta, function) 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)) { @@ -7113,6 +7961,7 @@ alpha_output_mi_thunk_osf (file, thunk_fndecl, delta, function) final (insn, file, 1, 0); final_end_function (); } +#endif /* TARGET_ABI_OSF */ /* Debugging support. */ @@ -7575,6 +8424,7 @@ alphaev4_insn_pipe (insn) case TYPE_MISC: case TYPE_IBR: case TYPE_JSR: + case TYPE_CALLPAL: case TYPE_FCPYS: case TYPE_FCMOV: case TYPE_FADD: @@ -7617,6 +8467,7 @@ alphaev5_insn_pipe (insn) case TYPE_IBR: case TYPE_JSR: + case TYPE_CALLPAL: return EV5_E1; case TYPE_FCPYS: @@ -8077,82 +8928,25 @@ alpha_reorg (insns) } } -/* 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", -}; +#ifdef OBJECT_FORMAT_ELF -static REAL_VALUE_TYPE float_values[8]; -static int inited_float_values = 0; +/* Switch to the section to which we should output X. The only thing + special we do here is to honor small data. */ -int -check_float_value (mode, d, overflow) +static void +alpha_elf_select_rtx_section (mode, x, align) enum machine_mode mode; - REAL_VALUE_TYPE *d; - int overflow ATTRIBUTE_UNUSED; + rtx x; + unsigned HOST_WIDE_INT align; { - - 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_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 @@ -8189,25 +8983,6 @@ alpha_arg_info_reg_val (cum) 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 @@ -8241,46 +9016,67 @@ alpha_need_linkage (name, is_local) { splay_tree_node node; struct alpha_links *al; + struct alpha_funcs *cfaf; if (name[0] == '*') name++; - if (alpha_links) + 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, (splay_tree_key) name); + 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->kind == KIND_EXTERN) - al->kind = KIND_LOCAL; + if (al->lkind == KIND_EXTERN) + al->lkind = KIND_LOCAL; } else { /* Used here but unused assumed. */ - if (al->kind == KIND_UNUSED) - al->kind = KIND_LOCAL; + if (al->lkind == KIND_UNUSED) + al->lkind = 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); + 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->kind = (is_local ? KIND_UNUSED : KIND_EXTERN); + al->lkind = (is_local ? KIND_UNUSED : KIND_EXTERN); /* Ensure we have an IDENTIFIER so assemble_name can mark it used. */ get_identifier (name); @@ -8296,50 +9092,165 @@ alpha_need_linkage (name, is_local) ggc_alloc_string (linksym, name_len + 5)); } - splay_tree_insert (alpha_links, (splay_tree_key) name, + 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 *links = (struct alpha_links *) node->value; + struct alpha_links *link = (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) + fprintf (stream, "$%d..%s..lk:\n", link->num, name); + if (link->rkind == KIND_CODEADDR) { - /* Local and used, build linkage pair. */ - fprintf (stream, "\t.quad %s..en\n", name); - fprintf (stream, "\t.quad %s\n", name); + 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 { - /* External and used, request linkage pair. */ - fprintf (stream, "\t.linkage %s\n", name); + 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; } -void -alpha_write_linkage (stream) - FILE *stream; +static void +alpha_write_linkage (stream, funname, fundecl) + FILE *stream; + const char *funname; + tree fundecl; { - if (alpha_links) + 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) { - readonly_section (); - fprintf (stream, "\t.align 3\n"); - splay_tree_foreach (alpha_links, alpha_write_one_linkage, stream); + splay_tree_foreach (func->links, alpha_write_one_linkage, stream); + /* splay_tree_delete (func->links); */ } } @@ -8432,6 +9343,16 @@ alpha_need_linkage (name, is_local) 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 @@ -8495,9 +9416,8 @@ unicosmk_output_module_name (file) prefix the module name with a '$' if necessary. */ if (!ISALPHA (*name)) - fprintf (file, "$%s", name); - else - fputs (name, file); + putc ('$', file); + output_clean_symbol_name (file, name); } /* Output text that to appear at the beginning of an assembler file. */ @@ -8636,7 +9556,7 @@ unicosmk_section_type_flags (decl, name, reloc) /* Generate a section name for decl and associate it with the declaration. */ -void +static void unicosmk_unique_section (decl, reloc) tree decl; int reloc ATTRIBUTE_UNUSED; @@ -8648,7 +9568,7 @@ unicosmk_unique_section (decl, reloc) abort (); name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)); - STRIP_NAME_ENCODING (name, name); + name = alpha_strip_name_encoding (name); len = strlen (name); if (TREE_CODE (decl) == FUNCTION_DECL) @@ -8716,7 +9636,7 @@ unicosmk_insert_attributes (decl, attr_ptr) { if (DECL_P (decl) && (TREE_PUBLIC (decl) || TREE_CODE (decl) == FUNCTION_DECL)) - UNIQUE_SECTION (decl, 0); + unicosmk_unique_section (decl, 0); } /* Output an alignment directive. We have to use the macro 'gcc@code@align' @@ -8879,8 +9799,7 @@ unicosmk_ssib_name () x = XEXP (x, 0); if (GET_CODE (x) != SYMBOL_REF) abort (); - fnname = XSTR (x, 0); - STRIP_NAME_ENCODING (fnname, fnname); + fnname = alpha_strip_name_encoding (XSTR (x, 0)); len = strlen (fnname); if (len + SSIB_PREFIX_LEN > 255) @@ -9055,7 +9974,7 @@ unicosmk_output_externs (file) /* 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); + real_name = alpha_strip_name_encoding (p->name); if (len && p->name[0] == '*' && !memcmp (real_name, user_label_prefix, len)) real_name += len; @@ -9080,7 +9999,7 @@ unicosmk_add_extern (name) struct unicosmk_extern_list *p; p = (struct unicosmk_extern_list *) - permalloc (sizeof (struct unicosmk_extern_list)); + xmalloc (sizeof (struct unicosmk_extern_list)); p->next = unicosmk_extern_head; p->name = name; unicosmk_extern_head = p; @@ -9162,7 +10081,7 @@ unicosmk_need_dex (x) --i; } - dex = (struct unicosmk_dex *) permalloc (sizeof (struct unicosmk_dex)); + dex = (struct unicosmk_dex *) xmalloc (sizeof (struct unicosmk_dex)); dex->name = name; dex->next = unicosmk_dex_list; unicosmk_dex_list = dex; @@ -9230,3 +10149,6 @@ unicosmk_need_dex (x) } #endif /* TARGET_ABI_UNICOSMK */ + +#include "gt-alpha.h" + diff --git a/contrib/gcc/config/alpha/alpha.h b/contrib/gcc/config/alpha/alpha.h index 4410a86..b933ea3 100644 --- a/contrib/gcc/config/alpha/alpha.h +++ b/contrib/gcc/config/alpha/alpha.h @@ -20,24 +20,81 @@ 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 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 -/* 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)" +#define CPP_SPEC "%(cpp_subtarget)" #ifndef CPP_SUBTARGET_SPEC #define CPP_SUBTARGET_SPEC "" @@ -89,6 +146,7 @@ extern int target_flags; 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. */ @@ -160,6 +218,10 @@ extern enum alpha_fp_trap_mode alpha_fptm; #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) @@ -203,6 +265,9 @@ extern enum alpha_fp_trap_mode alpha_fptm; #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, @@ -245,6 +310,8 @@ extern enum alpha_fp_trap_mode alpha_fptm; 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, ""} } @@ -268,6 +335,7 @@ extern const char *alpha_fprm_string; /* For -mfp-rounding-mode=[n|m|c|d] */ 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 \ { \ @@ -283,67 +351,10 @@ extern const char *alpha_mlat_string; /* For -mmemory-latency= */ 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")}, \ } -/* 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. @@ -359,21 +370,6 @@ extern const char *alpha_mlat_string; /* For -mmemory-latency= */ #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 @@ -409,15 +405,16 @@ extern const char *alpha_mlat_string; /* For -mmemory-latency= */ /* 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 +/* 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. */ @@ -474,15 +471,6 @@ extern const char *alpha_mlat_string; /* For -mmemory-latency= */ 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 @@ -505,7 +493,7 @@ extern const char *alpha_mlat_string; /* For -mmemory-latency= */ /* 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. */ +/* 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. */ @@ -524,14 +512,14 @@ extern const char *alpha_mlat_string; /* For -mmemory-latency= */ #define DATA_ALIGNMENT(EXP, ALIGN) MAX ((ALIGN), BITS_PER_WORD) #endif -/* Set this non-zero if move instructions will actually fail to work +/* 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 non-zero if unaligned move instructions are extremely slow. +/* Set this nonzero if unaligned move instructions are extremely slow. On the Alpha, they trap. */ @@ -640,6 +628,12 @@ extern const char *alpha_mlat_string; /* For -mmemory-latency= */ ? 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. @@ -719,7 +713,7 @@ extern const char *alpha_mlat_string; /* For -mmemory-latency= */ class that represents their union. */ enum reg_class { - NO_REGS, R24_REG, R25_REG, R27_REG, + NO_REGS, R0_REG, R24_REG, R25_REG, R27_REG, GENERAL_REGS, FLOAT_REGS, ALL_REGS, LIM_REG_CLASSES }; @@ -728,8 +722,8 @@ enum reg_class { /* Give names of register classes as strings for dump file. */ -#define REG_CLASS_NAMES \ - {"NO_REGS", "R24_REG", "R25_REG", "R27_REG", \ +#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. @@ -738,6 +732,7 @@ enum reg_class { #define REG_CLASS_CONTENTS \ { {0x00000000, 0x00000000}, /* NO_REGS */ \ + {0x00000001, 0x00000000}, /* R0_REG */ \ {0x01000000, 0x00000000}, /* R24_REG */ \ {0x02000000, 0x00000000}, /* R25_REG */ \ {0x08000000, 0x00000000}, /* R27_REG */ \ @@ -751,7 +746,8 @@ enum reg_class { or could index an array. */ #define REGNO_REG_CLASS(REGNO) \ - ((REGNO) == 24 ? R24_REG \ + ((REGNO) == 0 ? R0_REG \ + : (REGNO) == 24 ? R24_REG \ : (REGNO) == 25 ? R25_REG \ : (REGNO) == 27 ? R27_REG \ : (REGNO) >= 32 && (REGNO) <= 62 ? FLOAT_REGS \ @@ -768,6 +764,7 @@ enum reg_class { : (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. */ @@ -811,7 +808,9 @@ enum reg_class { 'T' is a HIGH. - 'U' is a symbolic operand. */ + 'U' is a symbolic operand. + + 'W' is a vector zero. */ #define EXTRA_CONSTRAINT alpha_extra_constraint @@ -858,15 +857,11 @@ enum reg_class { #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 +/* Return the class of registers that cannot change mode from FROM to TO. */ -/* 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 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. @@ -1172,12 +1167,11 @@ extern int alpha_memory_latency; /* 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. */ + be optimized into a sibcall. */ #define FUNCTION_OK_FOR_SIBCALL(DECL) \ (DECL \ - && ((TREE_ASM_WRITTEN (DECL) && !flag_pic) \ - || ! TREE_PUBLIC (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 @@ -1474,7 +1468,7 @@ do { \ #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 + 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 @@ -1730,60 +1724,6 @@ do { \ #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). */ @@ -1802,7 +1742,7 @@ do { \ #define ASM_OUTPUT_LABELREF(STREAM, NAME) \ do { \ const char *name_ = NAME; \ - if (*name_ == '@') \ + if (*name_ == '@' || *name_ == '%') \ name_ += 2; \ if (*name_ == '*') \ name_++; \ @@ -1811,17 +1751,8 @@ do { \ 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) +/* Globalizing directive for a label. */ +#define GLOBAL_ASM_OP "\t.globl " /* The prefix to add to user-visible assembler symbols. */ @@ -1848,11 +1779,6 @@ do { \ #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. */ @@ -1985,7 +1911,7 @@ do { \ #define PRINT_OPERAND_PUNCT_VALID_P(CODE) \ ((CODE) == '/' || (CODE) == ',' || (CODE) == '-' || (CODE) == '~' \ - || (CODE) == '#' || (CODE) == '*') + || (CODE) == '#' || (CODE) == '*' || (CODE) == '&') /* Print a memory address as an operand to reference that memory location. */ @@ -1995,9 +1921,11 @@ do { \ /* Define the codes that are matched by predicates in alpha.c. */ #define PREDICATE_CODES \ - {"reg_or_0_operand", {SUBREG, REG, CONST_INT}}, \ + {"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}}, \ @@ -2008,24 +1936,29 @@ do { \ {"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}}, \ + {"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, \ - SYMBOL_REF, CONST, LABEL_REF, HIGH}}, \ + CONST_VECTOR, SYMBOL_REF, CONST, LABEL_REF, HIGH}},\ {"some_operand", {SUBREG, REG, MEM, CONST_INT, CONST_DOUBLE, \ - SYMBOL_REF, CONST, LABEL_REF, HIGH}}, \ + CONST_VECTOR, SYMBOL_REF, CONST, LABEL_REF, HIGH}}, \ {"some_ni_operand", {SUBREG, REG, MEM}}, \ {"aligned_memory_operand", {MEM}}, \ {"unaligned_memory_operand", {MEM}}, \ @@ -2045,8 +1978,8 @@ do { \ (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) +#define EXPAND_BUILTIN_VA_START(valist, nextarg) \ + alpha_va_start (valist, nextarg) /* Implement `va_arg'. */ #define EXPAND_BUILTIN_VA_ARG(valist, type) \ @@ -2061,9 +1994,9 @@ do { \ /* 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 */ +#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 @@ -2201,8 +2134,3 @@ do { \ /* 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) diff --git a/contrib/gcc/config/alpha/alpha.md b/contrib/gcc/config/alpha/alpha.md index 1875b80..a4c0ae6 100644 --- a/contrib/gcc/config/alpha/alpha.md +++ b/contrib/gcc/config/alpha/alpha.md @@ -1,6 +1,6 @@ ;; Machine description for DEC Alpha for GNU C compiler ;; Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -;; 2000, 2001 Free Software Foundation, Inc. +;; 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,6 +40,24 @@ (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,6 +75,8 @@ (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,8 +97,8 @@ ;; 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" + "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. @@ -122,315 +142,25 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" (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. + +;; 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. @@ -453,7 +183,7 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" (match_operand:SI 1 "nonimmediate_operand" "r,m,*f,m")))] "! TARGET_FIX" "@ - addl %1,$31,%0 + addl $31,%1,%0 ldl %0,%1 cvtlq %1,%0 lds %0,%1\;cvtlq %0,%0" @@ -466,7 +196,7 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" (match_operand:SI 1 "nonimmediate_operand" "r,m,*f,*f,m")))] "TARGET_FIX" "@ - addl %1,$31,%0 + addl $31,%1,%0 ldl %0,%1 ftois %1,%0 cvtlq %1,%0 @@ -637,12 +367,55 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" "" "") +(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") + "ldah %0,%2(%1)\t\t!gprelhigh" + [(set_attr "usegp" "yes")]) (define_split [(set (match_operand:DI 0 "register_operand" "") @@ -977,17 +750,31 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" "mulqv %r1,%2,%0" [(set_attr "type" "imul")]) -(define_insn "umuldi3_highpart" +(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 "reg_or_0_operand" "%rJ")) + (match_operand:DI 1 "register_operand" "r")) (zero_extend:TI - (match_operand:DI 2 "reg_or_8bit_operand" "rI"))) + (match_operand:DI 2 "register_operand" "r"))) (const_int 64))))] "" - "umulh %r1,%2,%0" + "umulh %1,%2,%0" [(set_attr "type" "imul") (set_attr "opsize" "udi")]) @@ -1973,7 +1760,7 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" "ext%M2l %r1,%3,%0" [(set_attr "type" "shift")]) -;; Combine has some strange notion of preserving existing undefined behaviour +;; 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. @@ -2346,35 +2133,35 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" (define_insn "abssf2" [(set (match_operand:SF 0 "register_operand" "=f") - (abs:SF (match_operand:SF 1 "reg_or_fp0_operand" "fG")))] + (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_fp0_operand" "fG"))))] + (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_fp0_operand" "fG")))] + (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_fp0_operand" "fG"))))] + (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_fp0_operand" ""))) + (abs:TF (match_operand:TF 1 "reg_or_0_operand" ""))) (use (match_dup 2))])] "TARGET_HAS_XFLOATING_LIBS" { @@ -2387,7 +2174,7 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" (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"))) + (abs:TF (match_operand:TF 1 "reg_or_0_operand" "rG"))) (use (match_operand:DI 2 "register_operand" "r"))] "TARGET_HAS_XFLOATING_LIBS" "#" @@ -2397,21 +2184,21 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" (define_insn "negsf2" [(set (match_operand:SF 0 "register_operand" "=f") - (neg:SF (match_operand:SF 1 "reg_or_fp0_operand" "fG")))] + (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_fp0_operand" "fG")))] + (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_fp0_operand" ""))) + (neg:TF (match_operand:TF 1 "reg_or_0_operand" ""))) (use (match_dup 2))])] "TARGET_HAS_XFLOATING_LIBS" { @@ -2424,7 +2211,7 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" (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"))) + (neg:TF (match_operand:TF 1 "reg_or_0_operand" "rG"))) (use (match_operand:DI 2 "register_operand" "r"))] "TARGET_HAS_XFLOATING_LIBS" "#" @@ -2434,8 +2221,8 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" (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")))] + (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") @@ -2445,8 +2232,8 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" (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")))] + (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") @@ -2456,8 +2243,8 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" (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")))] + (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") @@ -2467,8 +2254,8 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" (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")))] + (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") @@ -2479,8 +2266,8 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" (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")))] + (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") @@ -2491,9 +2278,9 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" (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")) + (match_operand:SF 1 "reg_or_0_operand" "%fG")) (float_extend:DF - (match_operand:SF 2 "reg_or_fp0_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") @@ -2519,7 +2306,7 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" (define_insn "*cvtql" [(set (match_operand:SI 0 "register_operand" "=f") - (unspec:SI [(match_operand:DI 1 "reg_or_fp0_operand" "fG")] + (unspec:SI [(match_operand:DI 1 "reg_or_0_operand" "fG")] UNSPEC_CVTQL))] "TARGET_FP" "cvtql%/ %R1,%0" @@ -2529,7 +2316,7 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" (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)) + (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" @@ -2544,7 +2331,7 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" (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)) + (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" "#" @@ -2559,7 +2346,7 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" (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")))] + (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") @@ -2569,7 +2356,7 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" (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")))] + (fix:DI (match_operand:DF 1 "reg_or_0_operand" "fG")))] "TARGET_FP" "cvt%-q%/ %R1,%0" [(set_attr "type" "fadd") @@ -2582,7 +2369,7 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" (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)) + (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" @@ -2598,7 +2385,7 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" (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)) + (match_operand:SF 1 "reg_or_0_operand" "fG"))) 0)) (clobber (match_scratch:DI 2 "=f"))] "TARGET_FP && alpha_fptm < ALPHA_FPTM_SU" "#" @@ -2614,7 +2401,7 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" (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"))))] + (match_operand:SF 1 "reg_or_0_operand" "fG"))))] "TARGET_FP && alpha_fptm >= ALPHA_FPTM_SU" "cvt%-q%/ %R1,%0" [(set_attr "type" "fadd") @@ -2625,7 +2412,7 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" (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"))))] + (match_operand:SF 1 "reg_or_0_operand" "fG"))))] "TARGET_FP" "cvt%-q%/ %R1,%0" [(set_attr "type" "fadd") @@ -2752,7 +2539,7 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" (define_insn "*truncdfsf2_ieee" [(set (match_operand:SF 0 "register_operand" "=&f") - (float_truncate:SF (match_operand:DF 1 "reg_or_fp0_operand" "fG")))] + (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") @@ -2762,7 +2549,7 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" (define_insn "truncdfsf2" [(set (match_operand:SF 0 "register_operand" "=f") - (float_truncate:SF (match_operand:DF 1 "reg_or_fp0_operand" "fG")))] + (float_truncate:SF (match_operand:DF 1 "reg_or_0_operand" "fG")))] "TARGET_FP" "cvt%-%,%/ %R1,%0" [(set_attr "type" "fadd") @@ -2804,8 +2591,8 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" (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")))] + (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") @@ -2816,8 +2603,8 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" (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")))] + (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") @@ -2828,8 +2615,8 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" (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")))] + (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") @@ -2839,8 +2626,8 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" (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")))] + (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") @@ -2850,8 +2637,8 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" (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")))] + (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") @@ -2861,9 +2648,9 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" (define_insn "*divdf_ext2" [(set (match_operand:DF 0 "register_operand" "=f") - (div:DF (match_operand:DF 1 "reg_or_fp0_operand" "fG") + (div:DF (match_operand:DF 1 "reg_or_0_operand" "fG") (float_extend:DF - (match_operand:SF 2 "reg_or_fp0_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") @@ -2873,8 +2660,8 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" (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"))))] + (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") @@ -2891,8 +2678,8 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" (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")))] + (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") @@ -2902,8 +2689,8 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" (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")))] + (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") @@ -2913,8 +2700,8 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" (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")))] + (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") @@ -2924,8 +2711,8 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" (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")))] + (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") @@ -2936,8 +2723,8 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" (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")))] + (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") @@ -2948,9 +2735,9 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" (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")) + (match_operand:SF 1 "reg_or_0_operand" "%fG")) (float_extend:DF - (match_operand:SF 2 "reg_or_fp0_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") @@ -2967,8 +2754,8 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" (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")))] + (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") @@ -2978,8 +2765,8 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" (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")))] + (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") @@ -2989,8 +2776,8 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" (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")))] + (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") @@ -3000,8 +2787,8 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" (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")))] + (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") @@ -3012,8 +2799,8 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" (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")))] + (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") @@ -3023,9 +2810,9 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" (define_insn "*subdf_ext2" [(set (match_operand:DF 0 "register_operand" "=f") - (minus:DF (match_operand:DF 1 "reg_or_fp0_operand" "fG") + (minus:DF (match_operand:DF 1 "reg_or_0_operand" "fG") (float_extend:DF - (match_operand:SF 2 "reg_or_fp0_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") @@ -3036,9 +2823,9 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" (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")) + (match_operand:SF 1 "reg_or_0_operand" "fG")) (float_extend:DF - (match_operand:SF 2 "reg_or_fp0_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") @@ -3055,7 +2842,7 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" (define_insn "*sqrtsf2_ieee" [(set (match_operand:SF 0 "register_operand" "=&f") - (sqrt:SF (match_operand:SF 1 "reg_or_fp0_operand" "fG")))] + (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") @@ -3066,7 +2853,7 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" (define_insn "sqrtsf2" [(set (match_operand:SF 0 "register_operand" "=f") - (sqrt:SF (match_operand:SF 1 "reg_or_fp0_operand" "fG")))] + (sqrt:SF (match_operand:SF 1 "reg_or_0_operand" "fG")))] "TARGET_FP && TARGET_FIX" "sqrt%,%/ %R1,%0" [(set_attr "type" "fsqrt") @@ -3077,7 +2864,7 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" (define_insn "*sqrtdf2_ieee" [(set (match_operand:DF 0 "register_operand" "=&f") - (sqrt:DF (match_operand:DF 1 "reg_or_fp0_operand" "fG")))] + (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") @@ -3087,9 +2874,9 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" (define_insn "sqrtdf2" [(set (match_operand:DF 0 "register_operand" "=f") - (sqrt:DF (match_operand:DF 1 "reg_or_fp0_operand" "fG")))] + (sqrt:DF (match_operand:DF 1 "reg_or_0_operand" "fG")))] "TARGET_FP && TARGET_FIX" - "sqrt%-%/ %1,%0" + "sqrt%-%/ %R1,%0" [(set_attr "type" "fsqrt") (set_attr "trap" "yes") (set_attr "round_suffix" "normal") @@ -3462,7 +3249,7 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" (match_operand:HI 2 "reg_or_8bit_operand" "rI")))] "TARGET_MAX" "maxuw4 %r1,%2,%0" - [(set_attr "type" "shift")]) + [(set_attr "type" "mvi")]) (define_expand "smaxdi3" [(set (match_dup 3) @@ -3647,8 +3434,8 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" (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")]))] + [(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") @@ -3658,8 +3445,8 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" (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")]))] + [(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") @@ -3670,8 +3457,8 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" [(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")]))] + (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") @@ -3682,8 +3469,8 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" [(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")]))] + (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") @@ -3693,9 +3480,9 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" (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") + [(match_operand:DF 2 "reg_or_0_operand" "fG") (float_extend:DF - (match_operand:SF 3 "reg_or_fp0_operand" "fG"))]))] + (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") @@ -3705,9 +3492,9 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" (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") + [(match_operand:DF 2 "reg_or_0_operand" "fG") (float_extend:DF - (match_operand:SF 3 "reg_or_fp0_operand" "fG"))]))] + (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") @@ -3718,9 +3505,9 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" [(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:SF 2 "reg_or_0_operand" "fG")) (float_extend:DF - (match_operand:SF 3 "reg_or_fp0_operand" "fG"))]))] + (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") @@ -3731,9 +3518,9 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" [(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:SF 2 "reg_or_0_operand" "fG")) (float_extend:DF - (match_operand:SF 3 "reg_or_fp0_operand" "fG"))]))] + (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") @@ -3744,10 +3531,10 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" [(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")))] + [(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 @@ -3758,10 +3545,10 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" [(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")))] + [(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 @@ -3772,10 +3559,10 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" [(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")))] + [(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 @@ -3787,10 +3574,10 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" (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")))] + (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 @@ -3802,10 +3589,10 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" (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")))] + (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 @@ -3817,10 +3604,10 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" (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")))] + (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 @@ -3829,8 +3616,8 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" (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" ""))) + (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)))] @@ -3842,8 +3629,8 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" (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" ""))) + (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)))] @@ -3855,8 +3642,8 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" (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" "")))) + (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)))] @@ -3868,8 +3655,8 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" (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" "")))) + (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)))] @@ -3883,8 +3670,8 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" [(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")]) + [(match_operand:DF 2 "reg_or_0_operand" "fG") + (match_operand:DF 3 "const0_operand" "G")]) (label_ref (match_operand 0 "" "")) (pc)))] "TARGET_FP" @@ -3896,8 +3683,8 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" (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")]) + (match_operand:SF 2 "reg_or_0_operand" "fG")) + (match_operand:DF 3 "const0_operand" "G")]) (label_ref (match_operand 0 "" "")) (pc)))] "TARGET_FP" @@ -3908,8 +3695,8 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" ;; and compares. (define_expand "cmpdf" - [(set (cc0) (compare (match_operand:DF 0 "reg_or_fp0_operand" "") - (match_operand:DF 1 "reg_or_fp0_operand" "")))] + [(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]; @@ -4669,11 +4456,9 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" 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); + 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))); + operands[2] = const0_rtx; } else { @@ -4771,11 +4556,9 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" 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); + 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))); + operands[3] = const0_rtx; } else { @@ -4960,17 +4743,31 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" [(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 "nonimmediate_operand" "r,m")) + (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" - "@ - mov %2,$27\;jsr $26,0\;ldq $27,0($29) - ldq $27,%2\;jsr $26,%0\;ldq $27,0($29)" + "* +{ + 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")]) @@ -5018,7 +4815,8 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" [(unspec_volatile [(const_int 0)] UNSPECV_BLOCKAGE)] "" "" - [(set_attr "length" "0")]) + [(set_attr "length" "0") + (set_attr "type" "none")]) (define_insn "jump" [(set (pc) @@ -5095,7 +4893,7 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" [(unspec_volatile [(const_int 0)] UNSPECV_IMB)] "" "call_pal 0x86" - [(set_attr "type" "ibr")]) + [(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 @@ -5105,7 +4903,44 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" [(trap_if (const_int 1) (const_int 0))] "!TARGET_ABI_WINDOWS_NT" "call_pal 0x81" - [(set_attr "type" "ibr")]) + [(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 @@ -5116,7 +4951,7 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" (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))" + || reg_or_0_operand (operands[1], SFmode))" "@ cpys %R1,%R1,%0 ld%, %0,%1 @@ -5131,7 +4966,7 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" (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))" + || reg_or_0_operand (operands[1], SFmode))" "@ cpys %R1,%R1,%0 ld%, %0,%1 @@ -5148,7 +4983,7 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" (match_operand:SF 1 "input_operand" "rG,m,r"))] "! TARGET_FPREGS && (register_operand (operands[0], SFmode) - || reg_or_fp0_operand (operands[1], SFmode))" + || reg_or_0_operand (operands[1], SFmode))" "@ bis $31,%r1,%0 ldl %0,%1 @@ -5160,7 +4995,7 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" (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))" + || reg_or_0_operand (operands[1], DFmode))" "@ cpys %R1,%R1,%0 ld%- %0,%1 @@ -5175,7 +5010,7 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" (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))" + || reg_or_0_operand (operands[1], DFmode))" "@ cpys %R1,%R1,%0 ld%- %0,%1 @@ -5192,7 +5027,7 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" (match_operand:DF 1 "input_operand" "rG,m,r"))] "! TARGET_FPREGS && (register_operand (operands[0], DFmode) - || reg_or_fp0_operand (operands[1], DFmode))" + || reg_or_0_operand (operands[1], DFmode))" "@ bis $31,%r1,%0 ldq %0,%1 @@ -5206,7 +5041,7 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" [(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)" + || reg_or_0_operand (operands[1], TFmode)" "#" "reload_completed" [(set (match_dup 0) (match_dup 2)) @@ -5227,7 +5062,7 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" "" { if (GET_CODE (operands[0]) == MEM - && ! reg_or_fp0_operand (operands[1], SFmode)) + && ! reg_or_0_operand (operands[1], SFmode)) operands[1] = force_reg (SFmode, operands[1]); }) @@ -5237,7 +5072,7 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" "" { if (GET_CODE (operands[0]) == MEM - && ! reg_or_fp0_operand (operands[1], DFmode)) + && ! reg_or_0_operand (operands[1], DFmode)) operands[1] = force_reg (DFmode, operands[1]); }) @@ -5247,7 +5082,7 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" "" { if (GET_CODE (operands[0]) == MEM - && ! reg_or_fp0_operand (operands[1], TFmode)) + && ! reg_or_0_operand (operands[1], TFmode)) operands[1] = force_reg (TFmode, operands[1]); }) @@ -5497,7 +5332,8 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" 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" "") @@ -5523,10 +5359,12 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" [(match_dup 0)] "operands[0] = split_small_symbolic_operand (operands[0]);") +;; Accepts any symbolic, not just global, since function calls that +;; don't go via bsr still use !literal in hopes of linker relaxation. (define_insn "movdi_er_high_g" [(set (match_operand:DI 0 "register_operand" "=r") (unspec:DI [(match_operand:DI 1 "register_operand" "r") - (match_operand:DI 2 "global_symbolic_operand" "") + (match_operand:DI 2 "symbolic_operand" "") (match_operand 3 "const_int_operand" "")] UNSPEC_LITERAL))] "TARGET_EXPLICIT_RELOCS" @@ -5583,6 +5421,77 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" } }) +(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"))] @@ -5600,7 +5509,8 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" fmov %R1,%0 ldt %0,%1 stt %R1,%0" - [(set_attr "type" "ilog,iadd,iadd,iadd,ldsym,ild,ist,fcpys,fld,fst")]) + [(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 @@ -5647,7 +5557,8 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" 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 "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") @@ -6254,6 +6165,195 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" 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" @@ -6684,7 +6784,11 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" "TARGET_EXPLICIT_RELOCS && TARGET_ABI_OSF && prev_nonnote_insn (insn) == operands[0]" [(const_int 0)] - "DONE;") + " +{ + emit_note (NULL, NOTE_INSN_DELETED); + DONE; +}") (define_insn "*builtin_setjmp_receiver_1" [(unspec_volatile [(label_ref (match_operand 0 "" ""))] UNSPECV_SETJMPR)] @@ -6864,12 +6968,12 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" and leave the LRU eviction counter pointing to that block. */ static const char * const alt[2][2] = { { - "lds $f31,%a0", /* read, evict next */ + "ldq $31,%a0", /* read, evict next */ "ldl $31,%a0", /* read, evict last */ }, { "ldt $f31,%a0", /* write, evict next */ - "ldq $31,%a0", /* write, evict last */ + "lds $f31,%a0", /* write, evict last */ } }; @@ -6922,53 +7026,733 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" else return ".align %0 #realign"; }) + +;; Instructions to be emitted from __builtins. -;; The call patterns are at the end of the file because their -;; wildcard operand0 interferes with nice recognition. - -(define_insn "*call_value_osf_1_er" - [(set (match_operand 0 "" "") - (call (mem:DI (match_operand:DI 1 "call_operand" "c,R,s")) - (match_operand 2 "" ""))) - (use (reg:DI 29)) - (clobber (reg:DI 26))] - "TARGET_EXPLICIT_RELOCS && TARGET_ABI_OSF" - "@ - jsr $26,(%1),0\;ldah $29,0($26)\t\t!gpdisp!%*\;lda $29,0($29)\t\t!gpdisp!%* - bsr $26,$%1..ng - ldq $27,%1($29)\t\t!literal!%#\;jsr $26,($27),0\t\t!lituse_jsr!%#\;ldah $29,0($26)\t\t!gpdisp!%*\;lda $29,0($29)\t\t!gpdisp!%*" - [(set_attr "type" "jsr") - (set_attr "length" "12,*,16")]) +(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")]) -;; We must use peep2 instead of a split because we need accurate life -;; information for $gp. Consider the case of { bar(); while (1); }. -(define_peephole2 - [(parallel [(set (match_operand 0 "" "") - (call (mem:DI (match_operand:DI 1 "call_operand" "")) - (match_operand 2 "" ""))) - (use (reg:DI 29)) - (clobber (reg:DI 26))])] - "TARGET_EXPLICIT_RELOCS && TARGET_ABI_OSF && reload_completed - && ! current_file_function_operand (operands[1], Pmode) - && peep2_regno_dead_p (1, 29)" - [(parallel [(set (match_dup 0) - (call (mem:DI (match_dup 3)) - (match_dup 2))) - (set (reg:DI 26) (plus:DI (pc) (const_int 4))) - (unspec_volatile [(reg:DI 29)] UNSPECV_BLOCKAGE) - (use (match_dup 1)) - (use (match_dup 4))])] +(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" "")] + "" { - if (CONSTANT_P (operands[1])) - { - operands[3] = gen_rtx_REG (Pmode, 27); - operands[4] = GEN_INT (alpha_next_sequence_number++); - emit_insn (gen_movdi_er_high_g (operands[3], pic_offset_table_rtx, - operands[1], operands[4])); - } + rtx (*gen) PARAMS ((rtx, rtx, rtx, rtx)); + if (WORDS_BIG_ENDIAN) + gen = gen_extxl_be; else - { - operands[3] = operands[1]; + 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. + +(define_insn "*call_value_osf_1_er" + [(set (match_operand 0 "" "") + (call (mem:DI (match_operand:DI 1 "call_operand" "c,R,s")) + (match_operand 2 "" ""))) + (use (reg:DI 29)) + (clobber (reg:DI 26))] + "TARGET_EXPLICIT_RELOCS && TARGET_ABI_OSF" + "@ + jsr $26,(%1),0\;ldah $29,0($26)\t\t!gpdisp!%*\;lda $29,0($29)\t\t!gpdisp!%* + bsr $26,$%1..ng + ldq $27,%1($29)\t\t!literal!%#\;jsr $26,($27),0\t\t!lituse_jsr!%#\;ldah $29,0($26)\t\t!gpdisp!%*\;lda $29,0($29)\t\t!gpdisp!%*" + [(set_attr "type" "jsr") + (set_attr "length" "12,*,16")]) + +;; We must use peep2 instead of a split because we need accurate life +;; information for $gp. Consider the case of { bar(); while (1); }. +(define_peephole2 + [(parallel [(set (match_operand 0 "" "") + (call (mem:DI (match_operand:DI 1 "call_operand" "")) + (match_operand 2 "" ""))) + (use (reg:DI 29)) + (clobber (reg:DI 26))])] + "TARGET_EXPLICIT_RELOCS && TARGET_ABI_OSF && reload_completed + && ! current_file_function_operand (operands[1], Pmode) + && peep2_regno_dead_p (1, 29)" + [(parallel [(set (match_dup 0) + (call (mem:DI (match_dup 3)) + (match_dup 2))) + (set (reg:DI 26) (plus:DI (pc) (const_int 4))) + (unspec_volatile [(reg:DI 29)] UNSPECV_BLOCKAGE) + (use (match_dup 1)) + (use (match_dup 4))])] +{ + if (CONSTANT_P (operands[1])) + { + operands[3] = gen_rtx_REG (Pmode, 27); + operands[4] = GEN_INT (alpha_next_sequence_number++); + emit_insn (gen_movdi_er_high_g (operands[3], pic_offset_table_rtx, + operands[1], operands[4])); + } + else + { + operands[3] = operands[1]; operands[1] = const0_rtx; operands[4] = const0_rtx; } @@ -7021,7 +7805,7 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" (plus:DI (pc) (const_int 4))) (unspec_volatile [(reg:DI 29)] UNSPECV_BLOCKAGE) (use (match_operand 3 "" "")) - (use (match_operand 4 "const_int_operand" ""))] + (use (match_operand 4 "" ""))] "TARGET_EXPLICIT_RELOCS && TARGET_ABI_OSF" "jsr $26,(%1),%3%J4" [(set_attr "type" "jsr")]) @@ -7041,6 +7825,70 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" [(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")) @@ -7092,18 +7940,32 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" [(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 "nonimmediate_operand" "r,m")) + (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" - "@ - mov %3,$27\;jsr $26,0\;ldq $27,0($29) - ldq $27,%3\;jsr $26,%1\;ldq $27,0($29)" + "* +{ + 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")]) @@ -7116,4 +7978,3 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" "TARGET_ABI_UNICOSMK" "jsr $26,(%1)" [(set_attr "type" "jsr")]) - diff --git a/contrib/gcc/config/alpha/elf.h b/contrib/gcc/config/alpha/elf.h index 9f8d808..dbe9263 100644 --- a/contrib/gcc/config/alpha/elf.h +++ b/contrib/gcc/config/alpha/elf.h @@ -27,30 +27,23 @@ Boston, MA 02111-1307, USA. */ /* ??? Move all SDB stuff from alpha.h to osf.h. */ #undef SDB_DEBUGGING_INFO -#define DBX_DEBUGGING_INFO -#define DWARF2_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}" -#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) \ @@ -75,9 +68,6 @@ do { \ #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) \ @@ -122,7 +112,7 @@ do { \ #undef ASM_OUTPUT_EXTERNAL_LIBCALL #define ASM_OUTPUT_EXTERNAL_LIBCALL(FILE, FUN) \ - ASM_GLOBALIZE_LABEL (FILE, XSTR (FUN, 0)) + (*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, @@ -152,17 +142,9 @@ do { \ 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); \ + ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "object"); \ if (!flag_inhibit_size_directive) \ - { \ - fprintf (FILE, "%s", SIZE_ASM_OP); \ - assemble_name (FILE, NAME); \ - fprintf (FILE, ",%d\n", (SIZE)); \ - } \ + 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); \ @@ -174,7 +156,7 @@ do { \ #undef ASM_OUTPUT_ALIGNED_BSS #define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \ do { \ - ASM_GLOBALIZE_LABEL (FILE, NAME); \ + (*targetm.asm_out.globalize_label) (FILE, NAME); \ ASM_OUTPUT_ALIGNED_LOCAL (FILE, NAME, SIZE, ALIGN); \ } while (0) @@ -198,20 +180,8 @@ do { \ #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 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 @@ -246,7 +216,7 @@ do { \ includes this file. */ #undef EXTRA_SECTIONS -#define EXTRA_SECTIONS in_const, in_sbss, in_sdata +#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 @@ -254,30 +224,12 @@ do { \ #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 () \ @@ -291,177 +243,10 @@ void FN () \ /* 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 TARGET_ASM_SELECT_SECTION default_elf_select_section #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 @@ -538,22 +323,14 @@ do { \ #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); \ + 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; \ - 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_SIZE_DIRECTIVE (FILE, NAME, size); \ } \ ASM_OUTPUT_LABEL(FILE, NAME); \ } while (0) @@ -577,11 +354,7 @@ do { \ && (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_SIZE_DIRECTIVE (FILE, name, size); \ } \ } while (0) @@ -653,7 +426,7 @@ do { \ %{shared:crtendS.o%s}%{!shared:crtend.o%s} crtn.o%s" /* We support #pragma. */ -#define HANDLE_SYSV_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 --git a/contrib/gcc/config/alpha/ev4.md b/contrib/gcc/config/alpha/ev4.md new file mode 100644 index 0000000..41e1efd --- /dev/null +++ b/contrib/gcc/config/alpha/ev4.md @@ -0,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 --git a/contrib/gcc/config/alpha/ev5.md b/contrib/gcc/config/alpha/ev5.md new file mode 100644 index 0000000..832cf6b --- /dev/null +++ b/contrib/gcc/config/alpha/ev5.md @@ -0,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 --git a/contrib/gcc/config/alpha/ev6.md b/contrib/gcc/config/alpha/ev6.md new file mode 100644 index 0000000..12204b6 --- /dev/null +++ b/contrib/gcc/config/alpha/ev6.md @@ -0,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 --git a/contrib/gcc/config/alpha/freebsd.h b/contrib/gcc/config/alpha/freebsd.h index 35a9e65..f809c62 100644 --- a/contrib/gcc/config/alpha/freebsd.h +++ b/contrib/gcc/config/alpha/freebsd.h @@ -20,18 +20,26 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* Provide a CPP_SPEC appropriate for FreeBSD/alpha. Besides the dealing with +/* 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_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}" +#define CPP_SPEC "%(cpp_subtarget) %{posix:-D_POSIX_SOURCE}" -#undef LINK_SPEC #define LINK_SPEC "%{G*} %{relax:-relax} \ %{p:%e`-p' not supported; use `-pg' and gprof(1)} \ %{Wl,*:%*} \ @@ -54,9 +62,6 @@ Boston, MA 02111-1307, USA. */ /* 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 diff --git a/contrib/gcc/config/alpha/gnu.h b/contrib/gcc/config/alpha/gnu.h new file mode 100644 index 0000000..9b25daf --- /dev/null +++ b/contrib/gcc/config/alpha/gnu.h @@ -0,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 --git a/contrib/gcc/config/alpha/linux-elf.h b/contrib/gcc/config/alpha/linux-elf.h index 6430059..49f5181 100644 --- a/contrib/gcc/config/alpha/linux-elf.h +++ b/contrib/gcc/config/alpha/linux-elf.h @@ -27,17 +27,23 @@ Boston, MA 02111-1307, USA. */ #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 +#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 \ -"%{shared:-lc}%{!shared:%{pthread:-lpthread }%{profile:-lc_p}%{!profile:-lc}} " +"%{pthread:-lpthread }%{shared:-lc}%{!shared:%{profile:-lc_p}%{!profile:-lc}} " #endif diff --git a/contrib/gcc/config/alpha/linux.h b/contrib/gcc/config/alpha/linux.h index 912d7b26..0c53344 100644 --- a/contrib/gcc/config/alpha/linux.h +++ b/contrib/gcc/config/alpha/linux.h @@ -23,20 +23,23 @@ Boston, MA 02111-1307, USA. */ #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)" +#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 \ - "%{shared: -lc} \ - %{!shared: %{pthread:-lpthread} \ - %{profile:-lc_p} %{!profile: -lc}}" + "%{pthread:-lpthread} \ + %{shared:-lc} \ + %{!shared: %{profile:-lc_p}%{!profile:-lc}}" /* Show that we need a GP when profiling. */ #undef TARGET_PROFILING_NEEDS_GP @@ -56,6 +59,8 @@ SUB_CPP_PREDEFINES /* 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 --git a/contrib/gcc/config/alpha/netbsd.h b/contrib/gcc/config/alpha/netbsd.h index 9a54c3a..e1da9cf 100644 --- a/contrib/gcc/config/alpha/netbsd.h +++ b/contrib/gcc/config/alpha/netbsd.h @@ -22,9 +22,16 @@ Boston, MA 02111-1307, USA. */ #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" +#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. */ @@ -32,39 +39,28 @@ Boston, MA 02111-1307, USA. */ #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)" +/* 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 \ - "%{posix:-D_POSIX_SOURCE}" +#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. - This is a copy of LINK_SPEC from tweaked for - the alpha target. */ +/* Provide a LINK_SPEC appropriate for a NetBSD/alpha ELF 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}}" +#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 @@ -76,7 +72,12 @@ Boston, MA 02111-1307, USA. */ #undef ENDFILE_SPEC #define ENDFILE_SPEC \ "%{ffast-math|funsafe-math-optimizations:crtfm%O%s} \ - %{!shared:crtend%O%s} %{shared:crtendS%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 --git a/contrib/gcc/config/alpha/openbsd.h b/contrib/gcc/config/alpha/openbsd.h index 3424112..b82b66d 100644 --- a/contrib/gcc/config/alpha/openbsd.h +++ b/contrib/gcc/config/alpha/openbsd.h @@ -21,8 +21,6 @@ Boston, MA 02111-1307, USA. */ /* 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 @@ -41,8 +39,13 @@ Boston, MA 02111-1307, USA. */ "%{!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" +#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 --git a/contrib/gcc/config/alpha/osf.h b/contrib/gcc/config/alpha/osf.h index efb0a16..2be2a42 100644 --- a/contrib/gcc/config/alpha/osf.h +++ b/contrib/gcc/config/alpha/osf.h @@ -1,5 +1,5 @@ /* Definitions of target machine for GNU compiler, for DEC Alpha on OSF/1. - Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2001 + Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2001, 2002, 2003 Free Software Foundation, Inc. Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu) @@ -32,14 +32,24 @@ Boston, MA 02111-1307, USA. */ /* Names to predefine in the preprocessor for this target machine. */ -#define CPP_PREDEFINES "\ --Dunix -D__osf__ -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 "" +#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 @@ -47,8 +57,7 @@ Boston, MA 02111-1307, USA. */ #undef CPP_SUBTARGET_SPEC #define CPP_SUBTARGET_SPEC \ -"%{pthread|threads:-D_REENTRANT} %{threads:-D_PTHREAD_USE_D4} %(cpp_xfloat) \ --D__EXTERN_PREFIX" +"%{pthread|threads:-D_REENTRANT} %{threads:-D_PTHREAD_USE_D4}" /* Under OSF4, -p and -pg require -lprof1, and -lprof1 requires -lpdf. */ @@ -136,9 +145,7 @@ Boston, MA 02111-1307, USA. */ #endif #undef SUBTARGET_EXTRA_SPECS -#define SUBTARGET_EXTRA_SPECS \ - { "cpp_xfloat", CPP_XFLOAT_SPEC }, \ - { "asm_oldas", ASM_OLDAS_SPEC } +#define SUBTARGET_EXTRA_SPECS { "asm_oldas", ASM_OLDAS_SPEC } /* Indicate that we have a stamp.h to use. */ #ifndef CROSS_COMPILE @@ -193,7 +200,7 @@ __enable_execute_stack (addr) \ #define ASM_OUTPUT_WEAK_ALIAS(FILE, NAME, VALUE) \ do \ { \ - ASM_GLOBALIZE_LABEL (FILE, NAME); \ + (*targetm.asm_out.globalize_label) (FILE, NAME); \ fputs ("\t.weakext\t", FILE); \ assemble_name (FILE, NAME); \ if (VALUE) \ @@ -208,7 +215,6 @@ __enable_execute_stack (addr) \ #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, diff --git a/contrib/gcc/config/alpha/osf5.h b/contrib/gcc/config/alpha/osf5.h index c832c57..e483124 100644 --- a/contrib/gcc/config/alpha/osf5.h +++ b/contrib/gcc/config/alpha/osf5.h @@ -18,15 +18,12 @@ 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 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" +#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 --git a/contrib/gcc/config/alpha/t-crtfm b/contrib/gcc/config/alpha/t-crtfm index 7076b51..5ca8c3f 100644 --- a/contrib/gcc/config/alpha/t-crtfm +++ b/contrib/gcc/config/alpha/t-crtfm @@ -1,4 +1,5 @@ EXTRA_PARTS += crtfastmath.o crtfastmath.o: $(srcdir)/config/alpha/crtfastmath.c $(GCC_PASSES) - $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -c -o crtfastmath.o $(srcdir)/config/alpha/crtfastmath.c + $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -frandom-seed=gcc-crtfastmath -c \ + -o crtfastmath.o $(srcdir)/config/alpha/crtfastmath.c diff --git a/contrib/gcc/config/alpha/unicosmk.h b/contrib/gcc/config/alpha/unicosmk.h index 6dbe1a3..8f7b53d 100644 --- a/contrib/gcc/config/alpha/unicosmk.h +++ b/contrib/gcc/config/alpha/unicosmk.h @@ -1,6 +1,6 @@ /* Definitions of target machine for GNU compiler, for DEC Alpha on Cray T3E running Unicos/Mk. - Copyright (C) 2001 + Copyright (C) 2001, 2002 Free Software Foundation, Inc. Contributed by Roman Lechtchinsky (rl@cs.tu-berlin.de) @@ -32,15 +32,18 @@ Boston, MA 02111-1307, USA. */ /* 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 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 @@ -234,10 +237,7 @@ do { \ 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. */ + 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) \ @@ -245,36 +245,9 @@ do { \ { \ if (! (NO_RTL)) \ { \ - int start; \ - \ - start = (CUM).num_reg_words; \ - if (!current_function_varargs || start == 0) \ - ++start; \ + int start = (CUM).num_reg_words + 1; \ \ 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 ()); \ } \ \ @@ -288,19 +261,6 @@ do { \ #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) \ @@ -342,9 +302,9 @@ do { fprintf (FILE, "\tbr $1,0\n"); \ #undef DATA_SECTION_ASM_OP #define DATA_SECTION_ASM_OP unicosmk_data_section () -/* There are ni read-only sections on Unicos/Mk. */ +/* There are no read-only sections on Unicos/Mk. */ -#undef READONLY_DATA_SECTION +#undef READONLY_DATA_SECTION_ASM_OP #define READONLY_DATA_SECTION data_section /* Define extra sections for common data and SSIBs (static subroutine @@ -375,16 +335,6 @@ ssib_section () \ 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 @@ -399,12 +349,6 @@ ssib_section () \ #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. */ @@ -568,38 +512,6 @@ ssib_section () \ #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 diff --git a/contrib/gcc/config/alpha/vms-cc.c b/contrib/gcc/config/alpha/vms-cc.c index a171b1c..26c3ae3 100644 --- a/contrib/gcc/config/alpha/vms-cc.c +++ b/contrib/gcc/config/alpha/vms-cc.c @@ -109,16 +109,11 @@ preprocess_args (p_argc, argv) 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); + buff = concat ("/obj=", ptr, NULL); addarg (buff); } } @@ -202,11 +197,8 @@ main (argc, argv) 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); + search_dirs = xstrdup (system_search_dirs); + defines = xstrdup (default_defines); addarg ("cc"); preprocess_args (&argc , argv); @@ -251,7 +243,6 @@ main (argc, argv) { /* Assume filename arg */ char buff [256], *ptr; - int buff_len; ptr = to_host_file_spec (argv[i]); arg_len = strlen (ptr); @@ -263,10 +254,7 @@ main (argc, argv) else sprintf (buff, "%s%s", cwd, ptr); - buff_len = strlen (buff); - ptr = xmalloc (buff_len + 1); - - strcpy (ptr, buff); + ptr = xstrdup (buff); addarg (ptr); } } diff --git a/contrib/gcc/config/alpha/vms-crt0-64.c b/contrib/gcc/config/alpha/vms-crt0-64.c index 4120a6b..82ba322 100644 --- a/contrib/gcc/config/alpha/vms-crt0-64.c +++ b/contrib/gcc/config/alpha/vms-crt0-64.c @@ -32,7 +32,7 @@ Boston, MA 02111-1307, USA. */ 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 +/* 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 --git a/contrib/gcc/config/alpha/vms-crt0.c b/contrib/gcc/config/alpha/vms-crt0.c index e75bc02..b7665f9 100644 --- a/contrib/gcc/config/alpha/vms-crt0.c +++ b/contrib/gcc/config/alpha/vms-crt0.c @@ -32,7 +32,7 @@ Boston, MA 02111-1307, USA. */ 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 +/* This file can only be compiled with DEC C, due to the call to lib$establish. */ #include diff --git a/contrib/gcc/config/alpha/vms-ld.c b/contrib/gcc/config/alpha/vms-ld.c index 83ceaf9..e5688d8 100644 --- a/contrib/gcc/config/alpha/vms-ld.c +++ b/contrib/gcc/config/alpha/vms-ld.c @@ -396,8 +396,7 @@ main (argc, argv) strncpy (cwdev, cwd, devlen); cwdev [devlen] = '\0'; - search_dirs = xmalloc (strlen (system_search_dirs) + 1); - strcpy (search_dirs, system_search_dirs); + search_dirs = xstrdup (system_search_dirs); addarg ("link"); diff --git a/contrib/gcc/config/alpha/vms-psxcrt0-64.c b/contrib/gcc/config/alpha/vms-psxcrt0-64.c index be3e70d..b16e8b4 100644 --- a/contrib/gcc/config/alpha/vms-psxcrt0-64.c +++ b/contrib/gcc/config/alpha/vms-psxcrt0-64.c @@ -32,7 +32,7 @@ Boston, MA 02111-1307, USA. */ 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 +/* 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 --git a/contrib/gcc/config/alpha/vms-psxcrt0.c b/contrib/gcc/config/alpha/vms-psxcrt0.c index cdf5ced..c4140b4 100644 --- a/contrib/gcc/config/alpha/vms-psxcrt0.c +++ b/contrib/gcc/config/alpha/vms-psxcrt0.c @@ -32,7 +32,7 @@ Boston, MA 02111-1307, USA. */ 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 +/* This file can only be compiled with DEC C, due to the call to lib$establish. */ #include diff --git a/contrib/gcc/config/alpha/vms.h b/contrib/gcc/config/alpha/vms.h index ffc3275..8df6156 100644 --- a/contrib/gcc/config/alpha/vms.h +++ b/contrib/gcc/config/alpha/vms.h @@ -29,17 +29,17 @@ Boston, MA 02111-1307, USA. */ #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}" +#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 @@ -261,26 +261,17 @@ typedef struct {int num_args; enum avms_arg_type atypes[6];} avms_arg_info; } #define LINK_SECTION_ASM_OP "\t.link" -#define READONLY_SECTION_ASM_OP "\t.rdata" +#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_rdata, in_literals +#define EXTRA_SECTIONS in_link, 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) \ @@ -299,7 +290,6 @@ literals_section () \ } \ } -extern void readonly_section PARAMS ((void)); extern void link_section PARAMS ((void)); extern void literals_section PARAMS ((void)); @@ -310,11 +300,6 @@ extern void literals_section PARAMS ((void)); #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 @@ -379,8 +364,8 @@ do { \ #undef MIPS_DEBUGGING_INFO #undef DBX_DEBUGGING_INFO -#define DWARF2_DEBUGGING_INFO -#define VMS_DEBUGGING_INFO +#define DWARF2_DEBUGGING_INFO 1 +#define VMS_DEBUGGING_INFO 1 #define DWARF2_UNWIND_INFO 1 @@ -469,7 +454,7 @@ do { \ sprintf ((OUTPUT), "%s___%d", (NAME), (LABELNO))) /* ??? VMS uses different linkage. */ -#undef ASM_OUTPUT_MI_THUNK +#undef TARGET_ASM_OUTPUT_MI_THUNK #undef ASM_SPEC #undef ASM_FINAL_SPEC diff --git a/contrib/gcc/config/alpha/vxworks.h b/contrib/gcc/config/alpha/vxworks.h index 2f711ce..a27c645 100644 --- a/contrib/gcc/config/alpha/vxworks.h +++ b/contrib/gcc/config/alpha/vxworks.h @@ -26,10 +26,14 @@ Boston, MA 02111-1307, USA. */ %{!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" +#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 --git a/contrib/gcc/config/arm/README-interworking b/contrib/gcc/config/arm/README-interworking index 46b76c9..de8b278 100644 --- a/contrib/gcc/config/arm/README-interworking +++ b/contrib/gcc/config/arm/README-interworking @@ -235,7 +235,7 @@ processing is enabled. 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, +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 --git a/contrib/gcc/config/arm/aof.h b/contrib/gcc/config/arm/aof.h index f110ea2..965337c 100644 --- a/contrib/gcc/config/arm/aof.h +++ b/contrib/gcc/config/arm/aof.h @@ -54,8 +54,6 @@ Boston, MA 02111-1307, USA. */ 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 @@ -222,14 +220,8 @@ do \ 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) +/* Globalizing directive for a label. */ +#define GLOBAL_ASM_OP "\tEXPORT\t" #define ASM_OUTPUT_LABEL(STREAM,NAME) \ do { \ diff --git a/contrib/gcc/config/arm/aout.h b/contrib/gcc/config/arm/aout.h index 868eee0..8f4a605 100644 --- a/contrib/gcc/config/arm/aout.h +++ b/contrib/gcc/config/arm/aout.h @@ -111,9 +111,7 @@ Boston, MA 02111-1307, USA. */ /* 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 +#define DBX_DEBUGGING_INFO 1 /* Acorn dbx moans about continuation chars, so don't use any. */ #ifndef DBX_CONTIN_LENGTH @@ -144,27 +142,8 @@ Boston, MA 02111-1307, USA. */ 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 +/* 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 --git a/contrib/gcc/config/arm/arm-modes.def b/contrib/gcc/config/arm/arm-modes.def new file mode 100644 index 0000000..48f9ddf --- /dev/null +++ b/contrib/gcc/config/arm/arm-modes.def @@ -0,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 --git a/contrib/gcc/config/arm/arm-protos.h b/contrib/gcc/config/arm/arm-protos.h index b42da82..cae9bea 100644 --- a/contrib/gcc/config/arm/arm-protos.h +++ b/contrib/gcc/config/arm/arm-protos.h @@ -1,5 +1,5 @@ /* Prototypes for exported functions defined in arm.c and pe.c - Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. + 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) @@ -31,9 +31,11 @@ extern void arm_finalize_pic PARAMS ((int)); 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)); @@ -43,7 +45,8 @@ extern void arm_encode_call_attribute PARAMS ((tree, int)); 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 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)); @@ -106,6 +109,7 @@ extern int arm_gen_movstrqi PARAMS ((rtx *)); 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)); @@ -121,7 +125,8 @@ extern const char * output_move_double PARAMS ((rtx *)); 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 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)); @@ -136,6 +141,11 @@ extern rtx arm_function_arg PARAMS ((CUMULATIVE_ARGS *, 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 @@ -152,10 +162,13 @@ extern void common_section PARAMS ((void)); #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 @@ -185,7 +198,7 @@ extern int arm_dllimport_name_p PARAMS ((const char *)); #ifdef TREE_CODE extern void arm_pe_unique_section PARAMS ((tree, int)); -extern void arm_pe_encode_section_info PARAMS ((tree)); +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 --git a/contrib/gcc/config/arm/arm.c b/contrib/gcc/config/arm/arm.c index 8c696c6..7422f1d 100644 --- a/contrib/gcc/config/arm/arm.c +++ b/contrib/gcc/config/arm/arm.c @@ -65,9 +65,8 @@ const struct attribute_spec arm_attribute_table[]; /* 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 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 rtx emit_sfm PARAMS ((int, int)); #ifndef AOF_ASSEMBLER @@ -82,9 +81,7 @@ static Ccstar output_multi_immediate PARAMS ((rtx *, Ccstar, Ccstar, int, Hi 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 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)); @@ -117,9 +114,20 @@ static void thumb_output_function_prologue PARAMS ((FILE *, Hint)); 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 @@ -142,6 +150,8 @@ static void arm_elf_asm_named_section PARAMS ((const char *, unsigned int)); #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 @@ -170,15 +180,27 @@ static void arm_elf_asm_named_section PARAMS ((const char *, unsigned int)); #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; -#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; @@ -223,13 +245,13 @@ int arm_structure_size_boundary = DEFAULT_STRUCTURE_SIZE_BOUNDARY; /* The bits in this mask specify which instructions we are allowed to generate. */ -static int insn_flags = 0; +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 int tune_flags = 0; +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. */ @@ -301,7 +323,7 @@ static const char * const arm_condition_codes[] = struct processors { const char *const name; - const unsigned int flags; + const unsigned long flags; }; /* Not all of these give usefully different compilation alternatives, @@ -355,7 +377,7 @@ static const struct processors all_cores[] = {"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} }; @@ -389,17 +411,17 @@ struct arm_cpu_select arm_select[] = { NULL, "-mtune=", all_cores } }; -/* Return the number of bits set in value' */ -static unsigned long +/* Return the number of bits set in VALUE. */ +static unsigned bit_count (value) - signed int value; + unsigned long value; { unsigned long count = 0; while (value) { - value &= ~(value & -value); - ++count; + count++; + value &= value - 1; /* Clear the least-significant set bit. */ } return count; @@ -526,7 +548,7 @@ arm_override_options () if (sel->name == NULL) { - unsigned int current_bit_count = 0; + unsigned current_bit_count = 0; const struct processors * best_fit = NULL; /* Ideally we would like to issue an error message here @@ -545,7 +567,7 @@ arm_override_options () for (sel = all_cores; sel->name != NULL; sel++) if ((sel->flags & sought) == sought) { - unsigned int count; + unsigned count; count = bit_count (sel->flags & insn_flags); @@ -570,7 +592,7 @@ arm_override_options () 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)) @@ -657,7 +679,7 @@ arm_override_options () 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. */ + /* 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; @@ -714,7 +736,7 @@ arm_override_options () 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"); @@ -759,10 +781,6 @@ arm_override_options () 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); } @@ -820,7 +838,7 @@ arm_isr_value (argument) if (streq (arg, ptr->arg)) return ptr->return_value; - /* An unrecognised interrupt type. */ + /* An unrecognized interrupt type. */ return ARM_FT_UNKNOWN; } @@ -902,6 +920,10 @@ use_return_insn (iscond) consideration. */ if (func_type & (ARM_FT_VOLATILE | ARM_FT_NAKED)) return 0; + + /* So do interrupt functions that use the frame pointer. */ + if (IS_INTERRUPT (func_type) && frame_pointer_needed) + return 0; /* As do variadic functions. */ if (current_function_pretend_args_size @@ -909,7 +931,7 @@ use_return_insn (iscond) /* 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) + || ((arm_get_frame_size () + current_function_outgoing_args_size != 0) && !frame_pointer_needed)) return 0; @@ -1032,7 +1054,7 @@ arm_split_constant (code, mode, val, target, source, subtargets) && 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 + 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 @@ -1073,7 +1095,9 @@ arm_split_constant (code, mode, val, target, source, subtargets) } static int -count_insns_for_constant (HOST_WIDE_INT remainder, int i) +count_insns_for_constant (remainder, i) + HOST_WIDE_INT remainder; + int i; { HOST_WIDE_INT temp1; int num_insns = 0; @@ -1752,9 +1776,20 @@ int 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. */ @@ -1763,7 +1798,7 @@ arm_return_in_memory (type) 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) + if (size < 0 || size > UNITS_PER_WORD) return 1; if (TREE_CODE (type) == RECORD_TYPE) @@ -1841,6 +1876,27 @@ arm_return_in_memory (type) 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. */ @@ -1899,6 +1955,35 @@ arm_function_arg (pcum, mode, type, named) 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 @@ -2171,7 +2256,7 @@ current_file_function_operand (sym_ref) return 0; } -/* Return non-zero if a 32 bit "long_call" should be generated for +/* 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)) @@ -2224,7 +2309,7 @@ arm_is_longcall_p (sym_ref, call_cookie, call_symbol) || TARGET_LONG_CALLS; } -/* Return non-zero if it is ok to make a tail-call to DECL. */ +/* Return nonzero if it is ok to make a tail-call to DECL. */ int arm_function_ok_for_sibcall (decl) @@ -2442,7 +2527,7 @@ arm_finalize_pic (prologue) emit_insn (gen_pic_add_dot_plus_four (pic_offset_table_rtx, l1)); } - seq = gen_sequence (); + seq = get_insns (); end_sequence (); if (prologue) emit_insn_after (seq, get_insns ()); @@ -2558,7 +2643,8 @@ arm_rtx_costs (x, code, outer) /* 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)); + + ((GET_CODE (x) == SYMBOL_REF && CONSTANT_POOL_ADDRESS_P (x)) + ? 4 : 0)); case IF_THEN_ELSE: /* XXX a guess. */ @@ -2606,7 +2692,8 @@ arm_rtx_costs (x, code, outer) /* 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)); + + (GET_CODE (x) == SYMBOL_REF + && CONSTANT_POOL_ADDRESS_P (x) ? 4 : 0)); case DIV: case MOD: @@ -2914,16 +3001,16 @@ arm_adjust_cost (insn, link, dep, cost) && (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 (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))) + 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; } @@ -4319,7 +4406,7 @@ arm_gen_load_multiple (base_regno, count, from, up, write_back, unchanging_p, if (write_back) emit_move_insn (from, plus_constant (from, count * 4 * sign)); - seq = gen_sequence (); + seq = get_insns (); end_sequence (); return seq; @@ -4386,7 +4473,7 @@ arm_gen_store_multiple (base_regno, count, to, up, write_back, unchanging_p, if (write_back) emit_move_insn (to, plus_constant (to, count * 4 * sign)); - seq = gen_sequence (); + seq = get_insns (); end_sequence (); return seq; @@ -4449,7 +4536,7 @@ arm_gen_movstrqi (operands) 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])); + in_words_to_go = ARM_NUM_INTS (INTVAL (operands[2])); out_words_to_go = INTVAL (operands[2]) / 4; last_bytes = INTVAL (operands[2]) & 3; @@ -4876,6 +4963,19 @@ arm_gen_compare_reg (code, x, y) 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; @@ -4956,7 +5056,14 @@ arm_reload_in_hi (operands) } } - scratch = gen_rtx_REG (SImode, REGNO (operands[2])); + /* 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, @@ -5349,7 +5456,7 @@ get_jump_table_size (insn) /* 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) +#if !defined(READONLY_DATA_SECTION) && !defined(READONLY_DATA_SECTION_ASM_OP) || 1 #endif ) @@ -6322,57 +6429,27 @@ output_call (operands) return ""; } -static int -eliminate_lr2ip (x) - rtx * x; -{ - int something_changed = 0; - rtx x0 = * x; - int code = GET_CODE (x0); - int i, j; - const char * fmt; - - switch (code) - { - case REG: - if (REGNO (x0) == LR_REGNUM) - { - *x = gen_rtx_REG (SImode, IP_REGNUM); - return 1; - } - return 0; - default: - /* Scan through the sub-elements and change any references there. */ - fmt = GET_RTX_FORMAT (code); - - for (i = GET_RTX_LENGTH (code) - 1; i >= 0; i--) - if (fmt[i] == 'e') - something_changed |= eliminate_lr2ip (&XEXP (x0, i)); - else if (fmt[i] == 'E') - for (j = 0; j < XVECLEN (x0, i); j++) - something_changed |= eliminate_lr2ip (&XVECEXP (x0, i, j)); - - return something_changed; - } -} - /* Output a 'call' insn that is a reference in memory. */ const char * output_call_mem (operands) rtx * operands; { - operands[0] = copy_rtx (operands[0]); /* Be ultra careful. */ - /* Handle calls using lr by using ip (which may be clobbered in subr anyway). */ - if (eliminate_lr2ip (&operands[0])) - output_asm_insn ("mov%?\t%|ip, %|lr", operands); - if (TARGET_INTERWORK) { output_asm_insn ("ldr%?\t%|ip, %0", operands); output_asm_insn ("mov%?\t%|lr, %|pc", operands); output_asm_insn ("bx%?\t%|ip", operands); } + else if (regno_use_in (LR_REGNUM, operands[0])) + { + /* LR is used in the memory address. We load the address in the + first instruction. It's safe to use IP as the target of the + load since the call will kill it anyway. */ + output_asm_insn ("ldr%?\t%|ip, %0", operands); + output_asm_insn ("mov%?\t%|lr, %|pc", operands); + output_asm_insn ("mov%?\t%|pc, %|ip", operands); + } else { output_asm_insn ("mov%?\t%|lr, %|pc", operands); @@ -6543,11 +6620,11 @@ output_move_double (operands) { if (GET_MODE (operands[1]) == DFmode) { + REAL_VALUE_TYPE r; long l[2]; - union real_extract u; - memcpy (&u, &CONST_DOUBLE_LOW (operands[1]), sizeof (u)); - REAL_VALUE_TO_TARGET_DOUBLE (u.d, l); + 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]); } @@ -6666,7 +6743,7 @@ output_move_double (operands) } else { - otherops[1] = adjust_address (operands[1], VOIDmode, 4); + otherops[1] = adjust_address (operands[1], SImode, 4); /* Take care of overlapping base/data reg. */ if (reg_mentioned_p (operands[0], operands[1])) { @@ -6732,7 +6809,7 @@ output_move_double (operands) /* Fall through */ default: - otherops[0] = adjust_address (operands[0], VOIDmode, 4); + otherops[0] = adjust_address (operands[0], SImode, 4); otherops[1] = gen_rtx_REG (SImode, 1 + REGNO (operands[1])); output_asm_insn ("str%?\t%1, %0", operands); output_asm_insn ("str%?\t%1, %0", otherops); @@ -7190,7 +7267,7 @@ output_return_instruction (operand, really_return, reverse) int reg; unsigned long live_regs_mask; unsigned long func_type; - + func_type = arm_current_func_type (); if (IS_NAKED (func_type)) @@ -7218,7 +7295,6 @@ output_return_instruction (operand, really_return, reverse) 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; @@ -7275,6 +7351,8 @@ output_return_instruction (operand, really_return, reverse) /* 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); @@ -7332,7 +7410,7 @@ output_return_instruction (operand, really_return, reverse) really_return = 0; } } - + if (really_return) { switch ((int) ARM_FUNC_TYPE (func_type)) @@ -7495,7 +7573,7 @@ arm_output_epilogue (really_return) frame that is $fp + 4 for a non-variadic function. */ int floats_offset = 0; rtx operands[3]; - int frame_size = get_frame_size (); + int frame_size = arm_get_frame_size (); FILE * f = asm_out_file; rtx eh_ofs = cfun->machine->eh_epilogue_sp_ofs; @@ -7612,7 +7690,7 @@ arm_output_epilogue (really_return) if (IS_INTERRUPT (func_type)) /* Interrupt handlers will have pushed the IP onto the stack, so restore it now. */ - print_multi_reg (f, "ldmfd\t%r", SP_REGNUM, 1 << IP_REGNUM); + print_multi_reg (f, "ldmfd\t%r!", SP_REGNUM, 1 << IP_REGNUM); } else { @@ -7686,7 +7764,16 @@ arm_output_epilogue (really_return) 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 (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) { @@ -7734,7 +7821,7 @@ arm_output_epilogue (really_return) default: if (frame_pointer_needed) - /* If we used the frame pointer then the return adddress + /* If we used the frame pointer then the return address will have been loaded off the stack directly into the PC, so there is no need to issue a MOV instruction here. */ @@ -7768,6 +7855,9 @@ arm_output_function_epilogue (file, frame_size) } 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 @@ -7809,7 +7899,7 @@ emit_multi_reg_push (mask) 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 + 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: @@ -7842,7 +7932,6 @@ emit_multi_reg_push (mask) 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++) @@ -7924,7 +8013,6 @@ emit_sfm (base_reg, count) 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++); @@ -7996,11 +8084,11 @@ emit_sfm (base_reg, count) current stack pointer -> | | / -- - For a given funciton some or all of these stack compomnents + 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 behaviour + 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 @@ -8012,7 +8100,7 @@ arm_compute_initial_elimination_offset (from, to) unsigned int from; unsigned int to; { - unsigned int local_vars = (get_frame_size () + 3) & ~3; + 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; @@ -8041,10 +8129,14 @@ arm_compute_initial_elimination_offset (from, to) 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. */ + 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; @@ -8133,6 +8225,79 @@ arm_compute_initial_elimination_offset (from, to) } } +/* 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 @@ -8275,18 +8440,19 @@ arm_expand_prologue () RTX_FRAME_RELATED_P (insn) = 1; } - /* If this is an interrupt service routine, and the link register is - going to be pushed, subtracting four now will mean that the - function return can be done with a single instruction. */ + /* If this is an interrupt service routine, and the link register + is going to be pushed, and we are not creating a stack frame, + (which would involve an extra push of IP and a pop in the epilogue) + subtracting four from LR now will mean that the function return + can be done with a single instruction. */ if ((func_type == ARM_FT_ISR || func_type == ARM_FT_FIQ) - && (live_regs_mask & (1 << LR_REGNUM)) != 0) - { - emit_insn (gen_rtx_SET (SImode, - gen_rtx_REG (SImode, LR_REGNUM), - gen_rtx_PLUS (SImode, - gen_rtx_REG (SImode, LR_REGNUM), - GEN_INT (-4)))); - } + && (live_regs_mask & (1 << LR_REGNUM)) != 0 + && ! frame_pointer_needed) + emit_insn (gen_rtx_SET (SImode, + gen_rtx_REG (SImode, LR_REGNUM), + gen_rtx_PLUS (SImode, + gen_rtx_REG (SImode, LR_REGNUM), + GEN_INT (-4)))); if (live_regs_mask) { @@ -8368,7 +8534,7 @@ arm_expand_prologue () } } - amount = GEN_INT (-(get_frame_size () + amount = GEN_INT (-(arm_get_frame_size () + current_function_outgoing_args_size)); if (amount != const0_rtx) @@ -8389,15 +8555,8 @@ arm_expand_prologue () 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))); - } + insn = emit_insn (gen_stack_tie (stack_pointer_rtx, + hard_frame_pointer_rtx)); } /* If we are profiling, make sure no instructions are scheduled before @@ -8573,11 +8732,12 @@ arm_print_operand (stream, x, code) case 'M': asm_fprintf (stream, "{%r-%r}", REGNO (x), - REGNO (x) + NUM_REGS (GET_MODE (x)) - 1); + REGNO (x) + ARM_NUM_REGS (GET_MODE (x)) - 1); return; case 'd': - if (!x) + /* CONST_TRUE_RTX means always -- that's the default. */ + if (x == const_true_rtx) return; if (TARGET_ARM) @@ -8588,8 +8748,10 @@ arm_print_operand (stream, x, code) return; case 'D': - if (!x) - return; + /* 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 @@ -8642,7 +8804,7 @@ arm_assemble_integer (x, size, aligned_p) 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 + if (GET_CODE (x) == SYMBOL_REF && (CONSTANT_POOL_ADDRESS_P (x) || ENCODED_SHORT_CALL_ATTR_P (XSTR (x, 0)))) fputs ("(GOTOFF)", asm_out_file); @@ -9171,7 +9333,7 @@ arm_hard_regno_mode_ok (regno, mode) 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); + 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. */ @@ -9251,7 +9413,7 @@ arm_debugger_arg_offset (value, addr) 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 + 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 @@ -9302,7 +9464,7 @@ arm_debugger_arg_offset (value, addr) } #define def_builtin(NAME, TYPE, CODE) \ - builtin_function ((NAME), (TYPE), (CODE), BUILT_IN_MD, NULL) + builtin_function ((NAME), (TYPE), (CODE), BUILT_IN_MD, NULL, NULL_TREE) void arm_init_builtins () @@ -9313,10 +9475,9 @@ arm_init_builtins () tree int_ftype_int, void_ftype_pchar; - /* void func (void *) */ + /* void func (char *) */ void_ftype_pchar - = build_function_type (void_type_node, - tree_cons (NULL_TREE, pchar_type_node, endlink)); + = build_function_type_list (void_type_node, pchar_type_node, NULL_TREE); /* int func (int) */ int_ftype_int @@ -9373,7 +9534,7 @@ arm_expand_builtin (exp, target, subtarget, mode, ignore) emit_insn (pat); return target; } - + /* @@@ Should really do something sensible here. */ return NULL_RTX; } @@ -9818,11 +9979,12 @@ thumb_shiftable_const (val) return 0; } -/* Returns non-zero if the current function contains, +/* Returns nonzero if the current function contains, or might contain a far jump. */ int -thumb_far_jump_used_p (int in_prologue) +thumb_far_jump_used_p (in_prologue) + int in_prologue; { rtx insn; @@ -9887,7 +10049,7 @@ thumb_far_jump_used_p (int in_prologue) return 0; } -/* Return non-zero if FUNC must be entered in ARM mode. */ +/* Return nonzero if FUNC must be entered in ARM mode. */ int is_called_in_ARM_mode (func) @@ -9922,17 +10084,16 @@ thumb_unexpanded_epilogue () if (return_used_this_function) return ""; + if (IS_NAKED (arm_current_func_type ())) + 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))) + if (THUMB_REG_PUSHED_P (regno)) 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++; - } + 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: @@ -9977,8 +10138,7 @@ thumb_unexpanded_epilogue () ("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))) + if (THUMB_REG_PUSHED_P (next_hi_reg)) break; while (high_regs_pushed) @@ -10007,10 +10167,7 @@ thumb_unexpanded_epilogue () 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))) + if (THUMB_REG_PUSHED_P (next_hi_reg)) break; } } @@ -10084,37 +10241,16 @@ thumb_unexpanded_epilogue () /* 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; +static struct machine_function * +arm_init_machine_status () { - p->machine = - (machine_function *) xcalloc (1, sizeof (machine_function)); + struct machine_function *machine; + machine = (machine_function *) ggc_alloc_cleared (sizeof (machine_function)); -#if ARM_FT_UNKNOWWN != 0 - ((machine_function *) p->machine)->func_type = ARM_FT_UNKNOWN; +#if ARM_FT_UNKNOWN != 0 + 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 machine; } /* Return an RTX indicating where the return address to the @@ -10145,8 +10281,92 @@ arm_init_expanders () { /* 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; +} + +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. */ @@ -10154,7 +10374,7 @@ arm_init_expanders () void thumb_expand_prologue () { - HOST_WIDE_INT amount = (get_frame_size () + HOST_WIDE_INT amount = (thumb_get_frame_size () + current_function_outgoing_args_size); unsigned long func_type; @@ -10200,14 +10420,12 @@ thumb_expand_prologue () 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)) + if (THUMB_REG_PUSHED_P (regno) && !(frame_pointer_needed && (regno == THUMB_HARD_FRAME_POINTER_REGNUM))) break; - if (regno > LAST_LO_REGNUM) /* Very unlikely */ + if (regno > LAST_LO_REGNUM) /* Very unlikely. */ { rtx spare = gen_rtx (REG, SImode, IP_REGNUM); @@ -10251,7 +10469,7 @@ thumb_expand_prologue () void thumb_expand_epilogue () { - HOST_WIDE_INT amount = (get_frame_size () + HOST_WIDE_INT amount = (thumb_get_frame_size () + current_function_outgoing_args_size); /* Naked functions don't have prologues. */ @@ -10322,13 +10540,13 @@ thumb_output_function_prologue (f, size) #define STUB_NAME ".real_start_of" - asm_fprintf (f, "\t.code\t16\n"); + 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"); + fprintf (f, "\t.thumb_func\n"); asm_fprintf (f, "%s%U%s:\n", STUB_NAME, name); } @@ -10338,9 +10556,9 @@ thumb_output_function_prologue (f, size) { int num_pushes; - asm_fprintf (f, "\tpush\t{"); + fprintf (f, "\tpush\t{"); - num_pushes = NUM_INTS (current_function_pretend_args_size); + num_pushes = ARM_NUM_INTS (current_function_pretend_args_size); for (regno = LAST_ARG_REGNUM + 1 - num_pushes; regno <= LAST_ARG_REGNUM; @@ -10348,7 +10566,7 @@ thumb_output_function_prologue (f, size) asm_fprintf (f, "%r%s", regno, regno == LAST_ARG_REGNUM ? "" : ", "); - asm_fprintf (f, "}\n"); + fprintf (f, "}\n"); } else asm_fprintf (f, "\tsub\t%r, %r, #%d\n", @@ -10357,8 +10575,7 @@ thumb_output_function_prologue (f, size) } 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))) + if (THUMB_REG_PUSHED_P (regno)) live_regs_mask |= 1 << regno; if (live_regs_mask || !leaf_function_p () || thumb_far_jump_used_p (1)) @@ -10459,11 +10676,8 @@ thumb_output_function_prologue (f, size) 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 (THUMB_REG_PUSHED_P (regno)) + high_regs_pushed++; if (high_regs_pushed) { @@ -10472,20 +10686,15 @@ thumb_output_function_prologue (f, size) 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; - } + if (THUMB_REG_PUSHED_P (next_hi_reg)) + 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]) + 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; } @@ -10501,15 +10710,12 @@ thumb_output_function_prologue (f, size) 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))) + { + 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); @@ -10522,8 +10728,7 @@ thumb_output_function_prologue (f, size) } if (pushable_regs == 0 - && (regs_ever_live[LAST_ARG_REGNUM] - || !call_used_regs[LAST_ARG_REGNUM])) + && (THUMB_REG_PUSHED_P (LAST_ARG_REGNUM))) asm_fprintf (f, "\tmov\t%r, %r\n", LAST_ARG_REGNUM, IP_REGNUM); } } @@ -10821,7 +11026,8 @@ thumb_reload_in_hi (operands) that starts with the character 'c'. */ static int -arm_get_strip_length (char c) +arm_get_strip_length (c) + int c; { switch (c) { @@ -10834,7 +11040,8 @@ arm_get_strip_length (char c) and all prefix encodings stripped from it. */ const char * -arm_strip_name_encoding (const char * name) +arm_strip_name_encoding (name) + const char * name; { int skip; @@ -10844,10 +11051,35 @@ arm_strip_name_encoding (const char * name) 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. */ -rtx aof_pic_label = NULL_RTX; struct pic_chain { struct pic_chain * next; @@ -10865,10 +11097,6 @@ aof_pic_entry (x) 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"); } @@ -11003,6 +11231,16 @@ aof_dump_imports (f) 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 @@ -11018,8 +11256,13 @@ arm_elf_asm_named_section (name, flags) const char *name; unsigned int flags; { - char flagchars[8], *f = flagchars; - const char *type; + 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'; @@ -11033,18 +11276,103 @@ arm_elf_asm_named_section (name, flags) *f++ = 'M'; if (flags & SECTION_STRINGS) *f++ = 'S'; + if (flags & SECTION_TLS) + *f++ = 'T'; *f = '\0'; - if (flags & SECTION_BSS) - type = "nobits"; - else - type = "progbits"; + fprintf (asm_out_file, "\t.section\t%s,\"%s\"", name, flagchars); - 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); + 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 --git a/contrib/gcc/config/arm/arm.h b/contrib/gcc/config/arm/arm.h index c5431b5..eda2d47 100644 --- a/contrib/gcc/config/arm/arm.h +++ b/contrib/gcc/config/arm/arm.h @@ -26,6 +26,52 @@ Boston, MA 02111-1307, USA. */ #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 @@ -66,21 +112,22 @@ extern arm_cc arm_current_cc; extern int arm_target_label; extern int arm_ccfsm_state; -extern struct rtx_def * arm_target_insn; +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. 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; + 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 struct rtx_def * pool_vector_label; +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 @@ -126,16 +173,17 @@ Unrecognized value in TARGET_CPU_DEFAULT. #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__}" +#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 "\ --Acpu=arm -Amachine=arm \ %{march=arm2:-D__ARM_ARCH_2__} \ %{march=arm250:-D__ARM_ARCH_2__} \ %{march=arm3:-D__ARM_ARCH_2__} \ @@ -206,58 +254,6 @@ Unrecognized value in TARGET_CPU_DEFAULT. %{!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 @@ -274,15 +270,6 @@ Unrecognized value in TARGET_CPU_DEFAULT. #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 @@ -383,6 +370,12 @@ Unrecognized value in TARGET_CPU_DEFAULT. 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) @@ -390,9 +383,11 @@ Unrecognized value in TARGET_CPU_DEFAULT. #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) @@ -409,8 +404,7 @@ Unrecognized value in TARGET_CPU_DEFAULT. ? (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. */ +/* SUBTARGET_SWITCHES is used to add flags on a per-config basis. */ #ifndef SUBTARGET_SWITCHES #define SUBTARGET_SWITCHES #endif @@ -647,8 +641,6 @@ extern int arm_is_6_or_7; /* 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 @@ -663,12 +655,6 @@ extern int arm_is_6_or_7; /* 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 @@ -693,22 +679,18 @@ extern int arm_is_6_or_7; #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 + 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 POINTER_SIZE 32 - #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 @@ -737,7 +719,7 @@ extern int arm_is_6_or_7; #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 +/* 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. */ @@ -748,12 +730,9 @@ extern int arm_structure_size_boundary; /* 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 +/* Nonzero 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. */ @@ -889,15 +868,15 @@ extern const char * structure_size_string; #define ROUND_UP(X) (((X) + 3) & ~3) /* Convert fron bytes to ints. */ -#define NUM_INTS(X) (((X) + UNITS_PER_WORD - 1) / UNITS_PER_WORD) +#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 NUM_REGS(MODE) \ - NUM_INTS (GET_MODE_SIZE (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 NUM_REGS2(MODE, TYPE) \ - NUM_INTS ((MODE) == BLKmode ? \ +#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. */ @@ -1001,7 +980,7 @@ extern const char * structure_size_string; && REGNO >= FIRST_ARM_FP_REGNUM \ && REGNO != FRAME_POINTER_REGNUM \ && REGNO != ARG_POINTER_REGNUM) \ - ? 1 : NUM_REGS (MODE)) + ? 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) \ @@ -1324,7 +1303,7 @@ enum reg_class 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)) + ((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) \ @@ -1420,7 +1399,7 @@ enum reg_class 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 + 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. */ @@ -1449,16 +1428,18 @@ enum reg_class /* A C structure for machine-specific, per-function data. This is added to the cfun structure. */ -typedef struct machine_function +typedef struct machine_function GTY(()) { /* Additionsl stack adjustment in __builtin_eh_throw. */ - struct rtx_def *eh_epilogue_sp_ofs; + 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. */ @@ -1503,9 +1484,17 @@ typedef struct 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 + 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. @@ -1517,12 +1506,16 @@ typedef struct 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) + (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. */ @@ -1572,7 +1565,10 @@ typedef struct 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! */ + ``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) \ { \ @@ -1589,20 +1585,16 @@ typedef struct } #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 - +#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 @@ -1657,7 +1649,13 @@ typedef struct ((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) \ @@ -1676,13 +1674,13 @@ typedef struct int count_regs = 0; \ int regno; \ for (regno = 8; regno < 13; regno ++) \ - if (regs_ever_live[regno] && ! call_used_regs[regno]) \ - count_regs ++; \ + 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 (regs_ever_live[regno] && ! call_used_regs[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); \ @@ -1697,7 +1695,7 @@ typedef struct if ((TO) == STACK_POINTER_REGNUM) \ { \ (OFFSET) += current_function_outgoing_args_size; \ - (OFFSET) += ROUND_UP (get_frame_size ()); \ + (OFFSET) += thumb_get_frame_size (); \ } \ } @@ -1884,56 +1882,11 @@ typedef struct 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 + arm_asm_output_labelref (FILE, NAME) #define ARM_DECLARE_FUNCTION_SIZE(STREAM, NAME, DECL) \ arm_encode_call_attribute (DECL, SHORT_CALL_FLAG_CHAR) @@ -2168,7 +2121,8 @@ typedef struct 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) \ + && 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 \ @@ -2477,12 +2431,13 @@ extern const char * arm_pic_register_string; /* 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))))) - + (!(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. */ @@ -2497,30 +2452,7 @@ extern int making_const_table; /* 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") + return the mode to be used for the comparison. */ #define SELECT_CC_MODE(OP, X, Y) arm_select_cc_mode (OP, X, Y) @@ -2779,39 +2711,6 @@ extern int making_const_table; 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. */ @@ -2835,8 +2734,10 @@ extern int making_const_table; 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))) + ((!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 --git a/contrib/gcc/config/arm/arm.md b/contrib/gcc/config/arm/arm.md index 5180c75..0e60712 100644 --- a/contrib/gcc/config/arm/arm.md +++ b/contrib/gcc/config/arm/arm.md @@ -59,7 +59,11 @@ (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 + (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,6 +73,7 @@ ; 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,7 +184,7 @@ (const_string "normal")) ; Load scheduling, set from the arm_ld_sched variable -; initialised by arm_override_options() +; 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,10 +605,10 @@ ;; 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_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" "k")))] + (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,9 +1862,9 @@ ;;; ??? 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 +;;; 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,7 +1872,7 @@ [(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" ""))] + (match_operand:SI 3 "reg_or_int_operand" ""))] "TARGET_ARM" " { @@ -2035,7 +2040,7 @@ "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 0) (and:SI (not:SI (match_dup 2)) (match_dup 1))) (set (match_dup 3) (match_dup 4))] " { @@ -2052,11 +2057,11 @@ [(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")))] + (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 1)) (match_dup 2))) + [(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,11 +2344,11 @@ ; 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"))] + [(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,7 +3918,7 @@ ;; DONE; ;;}") -;; Recognise garbage generated above. +;; Recognize garbage generated above. ;;(define_insn "" ;; [(set (match_operand:TI 0 "general_operand" "=r,r,r,<,>,m") @@ -4129,6 +4134,7 @@ 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,7 +4206,9 @@ (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))))) + (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,7 +4221,9 @@ (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))))) + (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,6 +4427,14 @@ 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,7 +4691,7 @@ " ) -;; Pattern to recognise insn generated default case above +;; 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,9 +4832,16 @@ 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]); - } + 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,7 +6039,7 @@ if (arm_ccfsm_state != 0) abort (); - return \"bvs\\t%l0;beq\\t%l0\"; + return \"bvs\\t%l0\;beq\\t%l0\"; " [(set_attr "conds" "jump_clob") (set_attr "length" "8")] @@ -6031,7 +6056,7 @@ if (arm_ccfsm_state != 0) abort (); - return \"bmi\\t%l0;bgt\\t%l0\"; + return \"bmi\\t%l0\;bgt\\t%l0\"; " [(set_attr "conds" "jump_clob") (set_attr "length" "8")] @@ -6066,7 +6091,7 @@ if (arm_ccfsm_state != 0) abort (); - return \"bmi\\t%l0;bgt\\t%l0\"; + return \"bmi\\t%l0\;bgt\\t%l0\"; " [(set_attr "conds" "jump_clob") (set_attr "length" "8")] @@ -6083,7 +6108,7 @@ if (arm_ccfsm_state != 0) abort (); - return \"bvs\\t%l0;beq\\t%l0\"; + return \"bvs\\t%l0\;beq\\t%l0\"; " [(set_attr "conds" "jump_clob") (set_attr "length" "8")] @@ -6288,8 +6313,12 @@ " { enum rtx_code code = GET_CODE (operands[1]); - rtx ccreg = arm_gen_compare_reg (code, arm_compare_op0, arm_compare_op1); + 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,6 +6334,9 @@ 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,8 +6357,12 @@ " { enum rtx_code code = GET_CODE (operands[1]); - rtx ccreg = arm_gen_compare_reg (code, arm_compare_op0, arm_compare_op1); + 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,8 +6701,8 @@ (define_expand "sibcall" [(parallel [(call (match_operand 0 "memory_operand" "") (match_operand 1 "general_operand" "")) - (use (match_operand 2 "" "")) - (use (reg:SI LR_REGNUM))])] + (return) + (use (match_operand 2 "" ""))])] "TARGET_ARM" " { @@ -6679,8 +6715,8 @@ [(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))])] + (return) + (use (match_operand 3 "" ""))])] "TARGET_ARM" " { @@ -6692,8 +6728,8 @@ (define_insn "*sibcall_insn" [(call (mem:SI (match_operand:SI 0 "" "X")) (match_operand 1 "" "")) - (use (match_operand 2 "" "")) - (use (reg:SI LR_REGNUM))] + (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,8 +6741,8 @@ [(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))] + (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,7 +6761,7 @@ arm_ccfsm_state += 2; return \"\"; } - return output_return_instruction (NULL, TRUE, FALSE); + return output_return_instruction (const_true_rtx, TRUE, FALSE); }" [(set_attr "type" "load") (set_attr "predicable" "yes")] @@ -6771,6 +6807,33 @@ (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,139 +7078,6 @@ ] ) -;; 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" @@ -8506,7 +8436,7 @@ ; 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 +; instruction that we would generate would have UNPREDICTABLE behavior so ; we cannot use it. (define_peephole @@ -8759,18 +8689,27 @@ " ) +;; Note - although unspec_volatile's USE all hard registers, +;; USEs are ignored after relaod has completed. Thus we need +;; to add an unspec of the link register to ensure that flow +;; does not think that it is unused by the sibcall branch that +;; will replace the standard function epilogue. (define_insn "sibcall_epilogue" - [(unspec_volatile [(const_int 0)] VUNSPEC_EPILOGUE)] + [(parallel [(unspec:SI [(reg:SI LR_REGNUM)] UNSPEC_PROLOGUE_USE) + (unspec_volatile [(return)] VUNSPEC_EPILOGUE)])] "TARGET_ARM" "* - output_asm_insn (\"%@ Sibcall epilogue\", operands); if (USE_RETURN_INSN (FALSE)) - return output_return_instruction (NULL, FALSE, FALSE); + return output_return_instruction (const_true_rtx, FALSE, FALSE); return arm_output_epilogue (FALSE); " ;; Length is absolute worst case [(set_attr "length" "44") - (set_attr "type" "block")] + (set_attr "type" "block") + ;; We don't clobber the conditions, but the potential length of this + ;; operation is sufficient to make conditionalizing the sequence + ;; unlikely to be profitable. + (set_attr "conds" "clob")] ) (define_insn "*epilogue_insns" @@ -8784,7 +8723,11 @@ " ; Length is absolute worst case [(set_attr "length" "44") - (set_attr "type" "block")] + (set_attr "type" "block") + ;; We don't clobber the conditions, but the potential length of this + ;; operation is sufficient to make conditionalizing the sequence + ;; unlikely to be profitable. + (set_attr "conds" "clob")] ) (define_expand "eh_epilogue" @@ -9018,6 +8961,16 @@ [(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,9 +9043,9 @@ { 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); + 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,9 +9067,9 @@ { 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); + 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 --git a/contrib/gcc/config/arm/coff.h b/contrib/gcc/config/arm/coff.h index c9f0d92..0a78268 100644 --- a/contrib/gcc/config/arm/coff.h +++ b/contrib/gcc/config/arm/coff.h @@ -1,6 +1,6 @@ /* Definitions of target machine for GNU compiler. For ARM with COFF object format. - Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000 + Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2002 Free Software Foundation, Inc. Contributed by Doug Evans (devans@cygnus.com). @@ -40,7 +40,7 @@ Boston, MA 02111-1307, USA. */ #endif /* This is COFF, but prefer stabs. */ -#define SDB_DEBUGGING_INFO +#define SDB_DEBUGGING_INFO 1 #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG @@ -76,42 +76,12 @@ Boston, MA 02111-1307, USA. */ 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 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\"" - -/* 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++. */ diff --git a/contrib/gcc/config/arm/conix-elf.h b/contrib/gcc/config/arm/conix-elf.h index b74afdf..4a137d6 100644 --- a/contrib/gcc/config/arm/conix-elf.h +++ b/contrib/gcc/config/arm/conix-elf.h @@ -39,6 +39,8 @@ the Free Software Foundation, 59 Temple Place - Suite 330, #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm7tdmi #endif -#undef CPP_PREDEFINES -#define CPP_PREDEFINES \ - "-D__arm__ -D__CONIX__ -D__ELF__" +#define TARGET_OS_CPP_BUILTINS() \ + do { \ + builtin_define ("__CONIX__"); \ + builtin_define ("__ELF__"); \ + } while (0) diff --git a/contrib/gcc/config/arm/crti.asm b/contrib/gcc/config/arm/crti.asm index f3741db..ac58e44 100644 --- a/contrib/gcc/config/arm/crti.asm +++ b/contrib/gcc/config/arm/crti.asm @@ -35,7 +35,7 @@ # .init sections. Users may put any desired instructions in those # sections. - # Note - this macro is complimented by the FUNC_END macro + # 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 --git a/contrib/gcc/config/arm/crtn.asm b/contrib/gcc/config/arm/crtn.asm index a7f0e9e..2f4b542 100644 --- a/contrib/gcc/config/arm/crtn.asm +++ b/contrib/gcc/config/arm/crtn.asm @@ -35,7 +35,7 @@ # 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 + # 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 --git a/contrib/gcc/config/arm/elf.h b/contrib/gcc/config/arm/elf.h index 1cab2c4..0ad23f8 100644 --- a/contrib/gcc/config/arm/elf.h +++ b/contrib/gcc/config/arm/elf.h @@ -36,21 +36,27 @@ Boston, MA 02111-1307, USA. */ #ifndef SUBTARGET_EXTRA_SPECS #define SUBTARGET_EXTRA_SPECS \ - { "subtarget_extra_asm_spec", SUBTARGET_EXTRA_ASM_SPEC }, + { "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} \ -%{mcpu=*:-m%*} \ -%{march=*:-m%*} \ +%{mlittle-endian:-EL} \ +%{mcpu=*:-mcpu=%*} \ +%{march=*:-march=%*} \ %{mapcs-*:-mapcs-%*} \ -%{mapcs-float:-mfloat} \ -%{msoft-float:-mno-fpu} \ +%(subtarget_asm_float_spec) \ %{mthumb-interwork:-mthumb-interwork} \ %(subtarget_extra_asm_spec)" #endif @@ -58,22 +64,18 @@ Boston, MA 02111-1307, USA. */ /* The ARM uses @ are a comment character so we need to redefine TYPE_OPERAND_FMT. */ #undef TYPE_OPERAND_FMT -#define TYPE_OPERAND_FMT "%s" +#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); \ - } \ +#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. */ @@ -83,20 +85,7 @@ Boston, MA 02111-1307, USA. */ { \ 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); \ - } \ + ASM_OUTPUT_MEASURED_SIZE (FILE, FNAME); \ } \ while (0) @@ -108,7 +97,7 @@ Boston, MA 02111-1307, USA. */ #define JUMP_TABLES_IN_TEXT_SECTION (TARGET_ARM) #ifndef LINK_SPEC -#define LINK_SPEC "%{mbig-endian:-EB} -X" +#define LINK_SPEC "%{mbig-endian:-EB} %{mlittle-endian:-EL} -X" #endif /* Run-time Target Specification. */ diff --git a/contrib/gcc/config/arm/freebsd.h b/contrib/gcc/config/arm/freebsd.h index a9b268c..0d417a2 100644 --- a/contrib/gcc/config/arm/freebsd.h +++ b/contrib/gcc/config/arm/freebsd.h @@ -41,9 +41,6 @@ Boston, MA 02111-1307, USA. */ /* 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 diff --git a/contrib/gcc/config/arm/linux-elf.h b/contrib/gcc/config/arm/linux-elf.h index f1c86d2..c6d14e7 100644 --- a/contrib/gcc/config/arm/linux-elf.h +++ b/contrib/gcc/config/arm/linux-elf.h @@ -48,9 +48,9 @@ Boston, MA 02111-1307, USA. */ /* Now we define the strings used to build the spec file. */ #define LIB_SPEC \ - "%{shared: -lc} \ - %{!shared: %{pthread:-lpthread} \ - %{profile:-lc_p} %{!profile: -lc}}" + "%{pthread:-lpthread} \ + %{shared:-lc} \ + %{!shared:%{profile:-lc_p}%{!profile:-lc}}" #define LIBGCC_SPEC "%{msoft-float:-lfloat} -lgcc" @@ -89,13 +89,15 @@ Boston, MA 02111-1307, USA. */ %{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 +#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 --git a/contrib/gcc/config/arm/linux-gas.h b/contrib/gcc/config/arm/linux-gas.h index b4e346d..5e8ddf9 100644 --- a/contrib/gcc/config/arm/linux-gas.h +++ b/contrib/gcc/config/arm/linux-gas.h @@ -45,7 +45,7 @@ Boston, MA 02111-1307, USA. */ #undef WCHAR_TYPE_SIZE #define WCHAR_TYPE_SIZE BITS_PER_WORD -/* Emit code to set up a trampoline and synchronise the caches. */ +/* Emit code to set up a trampoline and synchronize the caches. */ #undef INITIALIZE_TRAMPOLINE #define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT) \ { \ diff --git a/contrib/gcc/config/arm/netbsd-elf.h b/contrib/gcc/config/arm/netbsd-elf.h new file mode 100644 index 0000000..0d5b798 --- /dev/null +++ b/contrib/gcc/config/arm/netbsd-elf.h @@ -0,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 --git a/contrib/gcc/config/arm/netbsd.h b/contrib/gcc/config/arm/netbsd.h index 2be49d8..38ccc3f 100644 --- a/contrib/gcc/config/arm/netbsd.h +++ b/contrib/gcc/config/arm/netbsd.h @@ -44,16 +44,22 @@ Boston, MA 02111-1307, USA. */ /* 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 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 }, -/* 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} \ +%(cpp_cpu_arch) %(cpp_apcs_pc) %(cpp_float) %(cpp_endian) %(netbsd_cpp_spec) \ " /* Because TARGET_DEFAULT sets ARM_FLAG_APCS_32 */ @@ -66,10 +72,7 @@ Boston, MA 02111-1307, USA. */ /* 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*} \ -" +#define LINK_SPEC "-X %(netbsd_link_spec)" #undef SIZE_TYPE #define SIZE_TYPE "unsigned int" @@ -77,7 +80,7 @@ Boston, MA 02111-1307, USA. */ #undef PTRDIFF_TYPE #define PTRDIFF_TYPE "int" -#define HANDLE_SYSV_PRAGMA +#define HANDLE_SYSV_PRAGMA 1 /* We don't have any limit on the length as out debugger is GDB. */ #undef DBX_CONTIN_LENGTH @@ -142,3 +145,30 @@ Boston, MA 02111-1307, USA. */ 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 --git a/contrib/gcc/config/arm/pe.c b/contrib/gcc/config/arm/pe.c index 8360f85..ee3da8f 100644 --- a/contrib/gcc/config/arm/pe.c +++ b/contrib/gcc/config/arm/pe.c @@ -1,5 +1,5 @@ /* Routines for GCC for ARM/pe. - Copyright (C) 1995, 1996, 2000, 2001 Free Software Foundation, Inc. + 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. @@ -32,7 +32,7 @@ Boston, MA 02111-1307, USA. */ extern int current_function_anonymous_args; -/* Return non-zero if DECL is a dllexport'd object. */ +/* Return nonzero if DECL is a dllexport'd object. */ tree current_class_type; /* FIXME */ @@ -52,7 +52,7 @@ arm_dllexport_p (decl) return 0; } -/* Return non-zero if DECL is a dllimport'd object. */ +/* Return nonzero if DECL is a dllimport'd object. */ int arm_dllimport_p (decl) @@ -74,7 +74,7 @@ arm_dllimport_p (decl) return 0; } -/* Return non-zero if SYMBOL is marked as being dllexport'd. */ +/* Return nonzero if SYMBOL is marked as being dllexport'd. */ int arm_dllexport_name_p (symbol) @@ -83,7 +83,7 @@ arm_dllexport_name_p (symbol) return symbol[0] == ARM_PE_FLAG_CHAR && symbol[1] == 'e' && symbol[2] == '.'; } -/* Return non-zero if SYMBOL is marked as being dllimport'd. */ +/* Return nonzero if SYMBOL is marked as being dllimport'd. */ int arm_dllimport_name_p (symbol) @@ -204,13 +204,12 @@ arm_mark_dllimport (decl) XEXP (DECL_RTL (decl), 0) = newrtl; } -/* Cover function to implement ENCODE_SECTION_INFO. */ - void -arm_pe_encode_section_info (decl) +arm_pe_encode_section_info (decl, first) tree decl; + int first ATTRIBUTE_UNUSED; { - /* This bit is copied from arm.h. */ + /* This bit is copied from arm_encode_section_info. */ if (optimize > 0 && TREE_CONSTANT (decl) && (!flag_writable_strings || TREE_CODE (decl) != STRING_CST)) { @@ -247,8 +246,6 @@ arm_pe_encode_section_info (decl) } } -/* Cover function for UNIQUE_SECTION. */ - void arm_pe_unique_section (decl, reloc) tree decl; @@ -260,15 +257,14 @@ arm_pe_unique_section (decl, reloc) const char * prefix; name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)); - /* Strip off any encoding in fnname. */ - STRIP_NAME_ENCODING (name, name); + 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)) + else if (decl_readonly_section (decl, reloc)) prefix = ".rdata$"; else prefix = ".data$"; diff --git a/contrib/gcc/config/arm/pe.h b/contrib/gcc/config/arm/pe.h index 1182aac..38727da 100644 --- a/contrib/gcc/config/arm/pe.h +++ b/contrib/gcc/config/arm/pe.h @@ -1,5 +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. + 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. @@ -94,30 +94,13 @@ Boston, MA 02111-1307, USA. */ 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 TARGET_ASM_UNIQUE_SECTION arm_pe_unique_section #define SUPPORTS_ONE_ONLY 1 @@ -206,13 +189,13 @@ Boston, MA 02111-1307, USA. */ /* 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, +#undef EXTRA_SECTIONS +#define EXTRA_SECTIONS in_drectve /* A list of extra section function definitions. */ -#undef SUBTARGET_EXTRA_SECTION_FUNCTIONS -#define SUBTARGET_EXTRA_SECTION_FUNCTIONS \ +#undef EXTRA_SECTION_FUNCTIONS +#define EXTRA_SECTION_FUNCTIONS \ DRECTVE_SECTION_FUNCTION \ SWITCH_TO_SECTION_FUNCTION @@ -245,7 +228,7 @@ switch_to_section (section, decl) \ 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_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 --git a/contrib/gcc/config/arm/rtems-elf.h b/contrib/gcc/config/arm/rtems-elf.h index 312c96f..27928db 100644 --- a/contrib/gcc/config/arm/rtems-elf.h +++ b/contrib/gcc/config/arm/rtems-elf.h @@ -24,5 +24,9 @@ Boston, MA 02111-1307, USA. */ #define HAS_INIT_SECTION -#undef CPP_PREDEFINES -#define CPP_PREDEFINES "-D__rtems__ -D__ELF__ -Asystem=rtems" +#define TARGET_OS_CPP_BUILTINS() \ + do { \ + builtin_define ("__rtems__"); \ + builtin_define ("__ELF__"); \ + builtin_assert ("system=rtems"); \ + } while (0) diff --git a/contrib/gcc/config/arm/semi.h b/contrib/gcc/config/arm/semi.h index 54ea0e8b..2e1abd4 100644 --- a/contrib/gcc/config/arm/semi.h +++ b/contrib/gcc/config/arm/semi.h @@ -61,8 +61,8 @@ Boston, MA 02111-1307, USA. */ #define ASM_SPEC "\ %{fpic: -k} %{fPIC: -k} \ %{mbig-endian:-EB} \ -%{mcpu=*:-m%*} \ -%{march=*:-m%*} \ +%{mcpu=*:-mcpu=%*} \ +%{march=*:-march=%*} \ %{mapcs-float:-mfloat} \ %{msoft-float:-mno-fpu} \ %{mthumb-interwork:-mthumb-interwork} \ diff --git a/contrib/gcc/config/arm/semiaof.h b/contrib/gcc/config/arm/semiaof.h index 7ca68bc..6ee17ef 100644 --- a/contrib/gcc/config/arm/semiaof.h +++ b/contrib/gcc/config/arm/semiaof.h @@ -20,8 +20,11 @@ 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 CPP_PREDEFINES \ - "-Darm -Dsemi" +#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 --git a/contrib/gcc/config/arm/t-arm-elf b/contrib/gcc/config/arm/t-arm-elf index d94b5d2..0011b2a 100644 --- a/contrib/gcc/config/arm/t-arm-elf +++ b/contrib/gcc/config/arm/t-arm-elf @@ -25,16 +25,18 @@ MULTILIB_OPTIONS = marm/mthumb MULTILIB_DIRNAMES = arm thumb MULTILIB_EXCEPTIONS = -# MULTILIB_OPTIONS = mlittle-endian/mbig-endian -# MULTILIB_DIRNAMES = le be +# 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 --git a/contrib/gcc/config/arm/t-pe b/contrib/gcc/config/arm/t-pe index 4de3665..f559bd2 100644 --- a/contrib/gcc/config/arm/t-pe +++ b/contrib/gcc/config/arm/t-pe @@ -20,7 +20,8 @@ dp-bit.c: $(srcdir)/config/fp-bit.c echo '#endif' >> dp-bit.c cat $(srcdir)/config/fp-bit.c >> dp-bit.c -pe.o: $(srcdir)/config/arm/pe.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 --git a/contrib/gcc/config/arm/unknown-elf-oabi.h b/contrib/gcc/config/arm/unknown-elf-oabi.h index cc58f3a..91f18c0 100644 --- a/contrib/gcc/config/arm/unknown-elf-oabi.h +++ b/contrib/gcc/config/arm/unknown-elf-oabi.h @@ -23,10 +23,7 @@ Boston, MA 02111-1307, USA. */ #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%*} \ +#define ASM_SPEC "-moabi %{mbig-endian:-EB} %{mcpu=*:-mcpu=%*} %{march=*:-march=%*} \ %{mapcs-*:-mapcs-%*} %{mthumb-interwork:-mthumb-interwork}" diff --git a/contrib/gcc/config/arm/unknown-elf.h b/contrib/gcc/config/arm/unknown-elf.h index 0741884..7f9211b 100644 --- a/contrib/gcc/config/arm/unknown-elf.h +++ b/contrib/gcc/config/arm/unknown-elf.h @@ -47,7 +47,7 @@ Boston, MA 02111-1307, USA. */ #undef PREFERRED_DEBUGGING_TYPE #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG -/* Return a non-zero value if DECL has a section attribute. */ +/* 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) @@ -61,7 +61,7 @@ Boston, MA 02111-1307, USA. */ else \ bss_section (); \ \ - ASM_GLOBALIZE_LABEL (FILE, NAME); \ + (*targetm.asm_out.globalize_label) (FILE, NAME); \ \ ASM_OUTPUT_ALIGN (FILE, floor_log2 (ALIGN / BITS_PER_UNIT)); \ \ @@ -82,14 +82,10 @@ Boston, MA 02111-1307, USA. */ \ ASM_OUTPUT_ALIGN (FILE, floor_log2 (ALIGN / BITS_PER_UNIT)); \ ASM_OUTPUT_LABEL (FILE, NAME); \ - fprintf (FILE, "\t.space\t%d\n", SIZE); \ + fprintf (FILE, "\t.space\t%d\n", SIZE ? SIZE : 1); \ } \ 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 diff --git a/contrib/gcc/config/arm/vxarm.h b/contrib/gcc/config/arm/vxarm.h index 7559364..473362e 100644 --- a/contrib/gcc/config/arm/vxarm.h +++ b/contrib/gcc/config/arm/vxarm.h @@ -37,8 +37,10 @@ Boston, MA 02111-1307, USA. */ %{!mcpu*:%{!march=*:-DCPU=ARM710A}} \ " -#undef CPP_PREDEFINES -#define CPP_PREDEFINES "-D__vxworks -Acpu=arm -Amachine=arm" +#define TARGET_OS_CPP_BUILTINS() \ + do { \ + builtin_define ("__vxworks"); \ + } while (0) /* VxWorks does all the library stuff itself. */ #undef LIB_SPEC diff --git a/contrib/gcc/config/arm/xscale-coff.h b/contrib/gcc/config/arm/xscale-coff.h index 51fe693..d8fee7d 100644 --- a/contrib/gcc/config/arm/xscale-coff.h +++ b/contrib/gcc/config/arm/xscale-coff.h @@ -24,7 +24,7 @@ #define SUBTARGET_CPU_DEFAULT TARGET_CPU_xscale #undef SUBTARGET_EXTRA_ASM_SPEC -#define SUBTARGET_EXTRA_ASM_SPEC "%{!mcpu=*:-mxscale}" +#define SUBTARGET_EXTRA_ASM_SPEC "%{!mcpu=*:-mcpu=xscale}" #undef MULTILIB_DEFAULTS #define MULTILIB_DEFAULTS \ diff --git a/contrib/gcc/config/arm/xscale-elf.h b/contrib/gcc/config/arm/xscale-elf.h index b1ce04e..8ea3588 100644 --- a/contrib/gcc/config/arm/xscale-elf.h +++ b/contrib/gcc/config/arm/xscale-elf.h @@ -28,7 +28,7 @@ Boston, MA 02111-1307, USA. */ #define SUBTARGET_CPU_DEFAULT TARGET_CPU_xscale #endif -#define SUBTARGET_EXTRA_ASM_SPEC "%{!mcpu=*:-mxscale} %{!mhard-float:-mno-fpu}" +#define SUBTARGET_EXTRA_ASM_SPEC "%{!mcpu=*:-mcpu=xscale} %{!mhard-float:-mno-fpu}" #ifndef MULTILIB_DEFAULTS #define MULTILIB_DEFAULTS \ diff --git a/contrib/gcc/config/darwin-c.c b/contrib/gcc/config/darwin-c.c index 10ffaf0..c04c2b5 100644 --- a/contrib/gcc/config/darwin-c.c +++ b/contrib/gcc/config/darwin-c.c @@ -25,7 +25,6 @@ Boston, MA 02111-1307, USA. */ #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" @@ -91,7 +90,7 @@ void darwin_pragma_options (pfile) cpp_reader *pfile ATTRIBUTE_UNUSED; { - char *arg; + const char *arg; tree t, x; if (c_lex (&t) != CPP_NAME) diff --git a/contrib/gcc/config/darwin-crt2.c b/contrib/gcc/config/darwin-crt2.c new file mode 100644 index 0000000..1ea2413 --- /dev/null +++ b/contrib/gcc/config/darwin-crt2.c @@ -0,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 --git a/contrib/gcc/config/darwin-protos.h b/contrib/gcc/config/darwin-protos.h index 0bff130..5fea152 100644 --- a/contrib/gcc/config/darwin-protos.h +++ b/contrib/gcc/config/darwin-protos.h @@ -1,5 +1,5 @@ /* Prototypes. - Copyright (C) 2001 Free Software Foundation, Inc. + Copyright (C) 2001, 2002 Free Software Foundation, Inc. This file is part of GNU CC. @@ -22,11 +22,9 @@ extern int name_needs_quotes PARAMS ((const char *)); extern void machopic_validate_stub_or_non_lazy_ptr PARAMS ((const char *, int)); -extern char *machopic_function_base_name PARAMS ((void)); -extern char *machopic_non_lazy_ptr_name PARAMS ((const char*)); -extern char *machopic_stub_name PARAMS ((const char*)); - -extern void machopic_add_gc_roots PARAMS ((void)); +extern const char *machopic_function_base_name PARAMS ((void)); +extern const char *machopic_non_lazy_ptr_name PARAMS ((const char*)); +extern const char *machopic_stub_name PARAMS ((const char*)); extern void machopic_picsymbol_stub_section PARAMS ((void)); extern void machopic_symbol_stub_section PARAMS ((void)); @@ -58,7 +56,8 @@ extern void machopic_define_ident PARAMS ((tree)); extern void machopic_define_name PARAMS ((const char*)); extern int machopic_name_defined_p PARAMS ((const char*)); extern int machopic_ident_defined_p PARAMS ((tree)); -extern void darwin_encode_section_info PARAMS ((tree)); +extern void darwin_encode_section_info PARAMS ((tree, int)); +extern const char *darwin_strip_name_encoding PARAMS ((const char *)); #endif /* TREE_CODE */ @@ -68,9 +67,53 @@ extern void machopic_output_possible_stub_label PARAMS ((FILE *, const char*)); extern void darwin_exception_section PARAMS ((void)); extern void darwin_eh_frame_section PARAMS ((void)); +extern void machopic_select_section PARAMS ((tree, int, + unsigned HOST_WIDE_INT)); +extern void machopic_select_rtx_section PARAMS ((enum machine_mode, rtx, + unsigned HOST_WIDE_INT)); #ifdef GCC_C_PRAGMA_H extern void darwin_pragma_ignore PARAMS ((cpp_reader *)); extern void darwin_pragma_options PARAMS ((cpp_reader *)); extern void darwin_pragma_unused PARAMS ((cpp_reader *)); #endif + +/* Expanded by EXTRA_SECTION_FUNCTIONS into varasm.o. */ +extern void const_section PARAMS ((void)); +extern void const_data_section PARAMS ((void)); +extern void cstring_section PARAMS ((void)); +extern void literal4_section PARAMS ((void)); +extern void literal8_section PARAMS ((void)); +extern void constructor_section PARAMS ((void)); +extern void mod_init_section PARAMS ((void)); +extern void mod_term_section PARAMS ((void)); +extern void destructor_section PARAMS ((void)); +extern void objc_class_section PARAMS ((void)); +extern void objc_meta_class_section PARAMS ((void)); +extern void objc_category_section PARAMS ((void)); +extern void objc_class_vars_section PARAMS ((void)); +extern void objc_instance_vars_section PARAMS ((void)); +extern void objc_cls_meth_section PARAMS ((void)); +extern void objc_inst_meth_section PARAMS ((void)); +extern void objc_cat_cls_meth_section PARAMS ((void)); +extern void objc_cat_inst_meth_section PARAMS ((void)); +extern void objc_selector_refs_section PARAMS ((void)); +extern void objc_selector_fixup_section PARAMS ((void)); +extern void objc_symbols_section PARAMS ((void)); +extern void objc_module_info_section PARAMS ((void)); +extern void objc_protocol_section PARAMS ((void)); +extern void objc_string_object_section PARAMS ((void)); +extern void objc_constant_string_object_section PARAMS ((void)); +extern void objc_class_names_section PARAMS ((void)); +extern void objc_meth_var_names_section PARAMS ((void)); +extern void objc_meth_var_types_section PARAMS ((void)); +extern void objc_cls_refs_section PARAMS ((void)); +extern void machopic_lazy_symbol_ptr_section PARAMS ((void)); +extern void machopic_nl_symbol_ptr_section PARAMS ((void)); +extern void machopic_symbol_stub_section PARAMS ((void)); +extern void machopic_picsymbol_stub_section PARAMS ((void)); +extern void machopic_output_stub PARAMS ((FILE *, const char *, const char *)); +extern void darwin_exception_section PARAMS ((void)); +extern void darwin_eh_frame_section PARAMS ((void)); +extern void darwin_globalize_label PARAMS ((FILE *, const char *)); +extern void darwin_asm_output_dwarf_delta PARAMS ((FILE *, int, const char *, const char *)); diff --git a/contrib/gcc/config/darwin.c b/contrib/gcc/config/darwin.c index 6864f0c..3722950 100644 --- a/contrib/gcc/config/darwin.c +++ b/contrib/gcc/config/darwin.c @@ -1,5 +1,5 @@ /* Functions for generic Darwin as target machine for GNU C compiler. - Copyright (C) 1989, 1990, 1991, 1992, 1993, 2000, 2001 + Copyright (C) 1989, 1990, 1991, 1992, 1993, 2000, 2001, 2002 Free Software Foundation, Inc. Contributed by Apple Computer Inc. @@ -38,13 +38,9 @@ Boston, MA 02111-1307, USA. */ #include "function.h" #include "ggc.h" #include "langhooks.h" - -#include "darwin-protos.h" - -extern void machopic_output_stub PARAMS ((FILE *, const char *, const char *)); +#include "tm_p.h" 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 *)); @@ -67,7 +63,7 @@ name_needs_quotes (name) /* This module assumes that (const (symbol_ref "foo")) is a legal pic reference, which will not be changed. */ -static tree machopic_defined_list; +static GTY(()) tree machopic_defined_list; enum machopic_addr_class machopic_classify_ident (ident) @@ -221,13 +217,13 @@ machopic_define_name (name) } /* This is a static to make inline functions work. The rtx - representing the PIC base symbol always points to here. */ + representing the PIC base symbol always points to here. */ static char function_base[32]; static int current_pic_label_num; -char * +const char * machopic_function_base_name () { static const char *name = NULL; @@ -257,17 +253,17 @@ machopic_function_base_name () return function_base; } -static tree machopic_non_lazy_pointers = NULL; +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. */ -char * +const char * machopic_non_lazy_ptr_name (name) const char *name; { - char *temp_name; + const char *temp_name; tree temp, ident = get_identifier (name); for (temp = machopic_non_lazy_pointers; @@ -278,7 +274,7 @@ machopic_non_lazy_ptr_name (name) return IDENTIFIER_POINTER (TREE_PURPOSE (temp)); } - STRIP_NAME_ENCODING (name, name); + name = darwin_strip_name_encoding (name); /* Try again, but comparing names this time. */ for (temp = machopic_non_lazy_pointers; @@ -288,7 +284,7 @@ machopic_non_lazy_ptr_name (name) if (TREE_VALUE (temp)) { temp_name = IDENTIFIER_POINTER (TREE_VALUE (temp)); - STRIP_NAME_ENCODING (temp_name, temp_name); + temp_name = darwin_strip_name_encoding (temp_name); if (strcmp (name, temp_name) == 0) return IDENTIFIER_POINTER (TREE_PURPOSE (temp)); } @@ -321,22 +317,12 @@ machopic_non_lazy_ptr_name (name) } } -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); -} +static GTY(()) tree machopic_stubs; /* Return the name of the stub corresponding to the given name, generating a new stub name if necessary. */ -char * +const char * machopic_stub_name (name) const char *name; { @@ -360,7 +346,7 @@ machopic_stub_name (name) return IDENTIFIER_POINTER (TREE_PURPOSE (temp)); } - STRIP_NAME_ENCODING (name, name); + name = darwin_strip_name_encoding (name); { char *buffer; @@ -401,7 +387,7 @@ machopic_validate_stub_or_non_lazy_ptr (name, validate_stub) const char *name; int validate_stub; { - char *real_name; + const char *real_name; tree temp, ident = get_identifier (name), id2; for (temp = (validate_stub ? machopic_stubs : machopic_non_lazy_pointers); @@ -414,7 +400,8 @@ machopic_validate_stub_or_non_lazy_ptr (name, validate_stub) 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))); + 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; @@ -439,10 +426,12 @@ machopic_indirect_data_reference (orig, reg) 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; @@ -502,9 +491,6 @@ machopic_indirect_data_reference (orig, reg) 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) @@ -676,10 +662,10 @@ machopic_legitimize_pic_address (orig, mode, reg) } #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 + RTX_UNCHANGING_P (pic_ref) = 1; } else { @@ -711,6 +697,7 @@ machopic_legitimize_pic_address (orig, mode, reg) 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))); @@ -718,6 +705,7 @@ machopic_legitimize_pic_address (orig, mode, reg) 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 @@ -748,8 +736,6 @@ machopic_legitimize_pic_address (orig, mode, reg) } } - RTX_UNCHANGING_P (pic_ref) = 1; - if (GET_CODE (pic_ref) != REG) { if (reg != 0) @@ -846,7 +832,7 @@ machopic_finish (asm_out_file) if (sym_name[0] == '!' && sym_name[1] == 'T') continue; - STRIP_NAME_ENCODING (sym_name, sym_name); + sym_name = darwin_strip_name_encoding (sym_name); sym = alloca (strlen (sym_name) + 2); if (sym_name[0] == '*' || sym_name[0] == '&') @@ -869,20 +855,13 @@ machopic_finish (asm_out_file) 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 + 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)) -#if 0 /* add back when we have private externs */ - || (decl && DECL_PRIVATE_EXTERN (decl)) -#endif - ) + if (machopic_ident_defined_p (TREE_VALUE (temp))) { data_section (); assemble_align (GET_MODE_ALIGNMENT (Pmode)); @@ -932,18 +911,6 @@ machopic_operand_p (op) && 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; } @@ -952,8 +919,9 @@ machopic_operand_p (op) use later. */ void -darwin_encode_section_info (decl) +darwin_encode_section_info (decl, first) tree decl; + int first ATTRIBUTE_UNUSED; { char code = '\0'; int defined = 0; @@ -1014,6 +982,15 @@ darwin_encode_section_info (decl) 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. */ @@ -1024,17 +1001,17 @@ update_non_lazy_ptrs (name) const char *name1, *name2; tree temp; - STRIP_NAME_ENCODING (name1, name); + name1 = darwin_strip_name_encoding (name); for (temp = machopic_non_lazy_pointers; temp != NULL_TREE; temp = TREE_CHAIN (temp)) { - char *sym_name = IDENTIFIER_POINTER (TREE_VALUE (temp)); + const char *sym_name = IDENTIFIER_POINTER (TREE_VALUE (temp)); if (*sym_name == '!') { - STRIP_NAME_ENCODING (name2, sym_name); + name2 = darwin_strip_name_encoding (sym_name); if (strcmp (name1, name2) == 0) { IDENTIFIER_POINTER (TREE_VALUE (temp)) = name; @@ -1046,7 +1023,7 @@ update_non_lazy_ptrs (name) /* 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. */ + just emit the stub label now and we don't bother emitting the stub later. */ void machopic_output_possible_stub_label (file, name) @@ -1088,17 +1065,17 @@ update_stubs (name) const char *name1, *name2; tree temp; - STRIP_NAME_ENCODING (name1, name); + name1 = darwin_strip_name_encoding (name); for (temp = machopic_stubs; temp != NULL_TREE; temp = TREE_CHAIN (temp)) { - char *sym_name = IDENTIFIER_POINTER (TREE_VALUE (temp)); + const char *sym_name = IDENTIFIER_POINTER (TREE_VALUE (temp)); if (*sym_name == '!') { - STRIP_NAME_ENCODING (name2, sym_name); + name2 = darwin_strip_name_encoding (sym_name); if (strcmp (name1, name2) == 0) { IDENTIFIER_POINTER (TREE_VALUE (temp)) = name; @@ -1109,6 +1086,153 @@ update_stubs (name) } 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; @@ -1139,3 +1263,44 @@ machopic_asm_out_destructor (symbol, priority) 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 --git a/contrib/gcc/config/darwin.h b/contrib/gcc/config/darwin.h index 05ca85b..90d959c 100644 --- a/contrib/gcc/config/darwin.h +++ b/contrib/gcc/config/darwin.h @@ -35,6 +35,12 @@ Boston, MA 02111-1307, USA. */ 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.) */ @@ -78,56 +84,214 @@ Boston, MA 02111-1307, USA. */ #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 +/* 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 -