From bd0df3aa27aac083bd60b649fa5347076a5126eb Mon Sep 17 00:00:00 2001 From: Alexander Kabaev Date: Fri, 11 Jul 2003 03:40:53 +0000 Subject: [PATCH] Gcc 3.3.1-pre as of 2003-07-11. --- contrib/gcc/ChangeLog | 26805 +++++++++++-------- 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 | 1179 +- contrib/gcc/ONEWS | 98 +- contrib/gcc/README.Portability | 51 +- contrib/gcc/aclocal.m4 | 446 +- 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 | 101 +- contrib/gcc/builtin-attrs.def | 94 +- contrib/gcc/builtin-types.def | 47 +- contrib/gcc/builtins.c | 578 +- contrib/gcc/builtins.def | 530 +- 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 | 872 +- contrib/gcc/c-objc-common.c | 86 +- contrib/gcc/c-opts.c | 1799 ++ contrib/gcc/c-parse.in | 530 +- 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 | 259 +- contrib/gcc/cfganal.c | 368 +- contrib/gcc/cfgbuild.c | 208 +- contrib/gcc/cfgcleanup.c | 427 +- contrib/gcc/cfglayout.c | 579 +- contrib/gcc/cfglayout.h | 11 +- contrib/gcc/cfgloop.c | 1087 +- contrib/gcc/cfgrtl.c | 713 +- contrib/gcc/collect2.c | 43 +- contrib/gcc/collect2.h | 1 - contrib/gcc/combine.c | 1150 +- contrib/gcc/config.gcc | 1725 +- contrib/gcc/config.in | 140 +- contrib/gcc/config/alpha/alpha-interix.h | 79 +- contrib/gcc/config/alpha/alpha-protos.h | 79 +- contrib/gcc/config/alpha/alpha.c | 2050 +- contrib/gcc/config/alpha/alpha.h | 348 +- contrib/gcc/config/alpha/alpha.md | 1839 +- 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 | 27 +- 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 | 557 +- 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 | 452 +- contrib/gcc/config/fp-bit.h | 176 +- contrib/gcc/config/freebsd-spec.h | 49 +- 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 | 160 +- 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 | 166 +- 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 | 4193 ++- contrib/gcc/config/i386/i386.h | 1147 +- contrib/gcc/config/i386/i386.md | 5741 ++-- 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 | 47 +- contrib/gcc/config/i386/netbsd.h | 32 +- contrib/gcc/config/i386/netbsd64.h | 65 +- 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 | 48 +- 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 | 1421 +- contrib/gcc/config/ia64/ia64.h | 331 +- contrib/gcc/config/ia64/ia64.md | 1211 +- 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 | 57 +- 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 | 97 +- 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 | 4828 +++- contrib/gcc/config/rs6000/rs6000.h | 683 +- contrib/gcc/config/rs6000/rs6000.md | 3869 ++- 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 | 300 +- contrib/gcc/config/s390/s390-modes.def | 38 + contrib/gcc/config/s390/s390-protos.h | 27 +- contrib/gcc/config/s390/s390.c | 3550 ++- contrib/gcc/config/s390/s390.h | 1498 +- contrib/gcc/config/s390/s390.md | 3488 +-- 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 | 114 +- contrib/gcc/config/sparc/netbsd.h | 25 +- 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 | 1562 +- contrib/gcc/config/sparc/sparc.h | 407 +- contrib/gcc/config/sparc/sparc.md | 3034 +-- 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 | 4201 +-- contrib/gcc/configure.in | 775 +- contrib/gcc/conflict.c | 17 +- contrib/gcc/convert.c | 57 +- contrib/gcc/cp-demangle.c | 54 +- contrib/gcc/cp/ChangeLog | 3977 ++- 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 | 1824 +- contrib/gcc/cp/cfns.gperf | 108 +- contrib/gcc/cp/class.c | 2205 +- 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 | 1310 +- contrib/gcc/cp/cvt.c | 157 +- contrib/gcc/cp/decl.c | 3714 +-- contrib/gcc/cp/decl.h | 8 +- contrib/gcc/cp/decl2.c | 1870 +- contrib/gcc/cp/dump.c | 30 +- contrib/gcc/cp/error.c | 284 +- 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 | 1253 +- 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 | 422 +- contrib/gcc/cp/method.c | 243 +- contrib/gcc/cp/operators.def | 4 +- contrib/gcc/cp/optimize.c | 34 +- contrib/gcc/cp/parse.y | 957 +- contrib/gcc/cp/pt.c | 1246 +- contrib/gcc/cp/ptree.c | 18 +- contrib/gcc/cp/repo.c | 25 +- contrib/gcc/cp/rtti.c | 87 +- contrib/gcc/cp/search.c | 647 +- contrib/gcc/cp/semantics.c | 514 +- contrib/gcc/cp/spew.c | 530 +- contrib/gcc/cp/tree.c | 341 +- contrib/gcc/cp/typeck.c | 1872 +- contrib/gcc/cp/typeck2.c | 280 +- contrib/gcc/cplus-dem.c | 367 +- contrib/gcc/cppdefault.h | 42 - contrib/gcc/cpperror.c | 252 +- contrib/gcc/cppexp.c | 2040 +- contrib/gcc/cppfiles.c | 178 +- contrib/gcc/cpphash.c | 3 +- contrib/gcc/cpphash.h | 247 +- contrib/gcc/cppinit.c | 1125 +- contrib/gcc/cpplex.c | 780 +- contrib/gcc/cpplib.c | 432 +- contrib/gcc/cpplib.h | 295 +- contrib/gcc/cppmacro.c | 757 +- contrib/gcc/cppmain.c | 360 +- contrib/gcc/cppspec.c | 36 +- contrib/gcc/cpptrad.c | 1216 + contrib/gcc/crtstuff.c | 85 +- contrib/gcc/cse.c | 376 +- 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 | 1205 +- contrib/gcc/diagnostic.def | 16 +- contrib/gcc/diagnostic.h | 261 +- contrib/gcc/doc/bugreport.texi | 322 +- contrib/gcc/doc/c-tree.texi | 43 +- contrib/gcc/doc/collect2.texi | 2 +- contrib/gcc/doc/compat.texi | 4 +- contrib/gcc/doc/contrib.texi | 200 +- contrib/gcc/doc/cpp.texi | 596 +- 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 | 266 +- 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 | 863 +- contrib/gcc/doc/interface.texi | 2 +- contrib/gcc/doc/invoke.texi | 2946 +- contrib/gcc/doc/makefile.texi | 14 +- contrib/gcc/doc/md.texi | 933 +- contrib/gcc/doc/objc.texi | 38 +- contrib/gcc/doc/passes.texi | 42 +- contrib/gcc/doc/rtl.texi | 213 +- contrib/gcc/doc/service.texi | 8 +- contrib/gcc/doc/sourcebuild.texi | 358 +- contrib/gcc/doc/standards.texi | 19 +- contrib/gcc/doc/tm.texi | 1432 +- contrib/gcc/doc/trouble.texi | 169 +- contrib/gcc/doloop.c | 69 +- contrib/gcc/dominance.c | 374 +- 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 | 1908 +- 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 | 2110 +- 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 | 558 +- 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 | 1858 +- contrib/gcc/function.c | 801 +- 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 | 1398 +- 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 | 59 +- 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 | 417 +- 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 | 734 +- contrib/gcc/ggc-none.c | 15 + contrib/gcc/ggc-page.c | 521 +- contrib/gcc/ggc-simple.c | 46 +- contrib/gcc/ggc.h | 153 +- 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 | 102 +- contrib/gcc/gthr-posix.h | 204 +- 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 | 104 +- 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 | 975 +- 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 | 94 +- contrib/gcc/langhooks-def.h | 123 +- contrib/gcc/langhooks.c | 191 +- contrib/gcc/langhooks.h | 219 +- contrib/gcc/lbasename.c | 16 +- contrib/gcc/lcm.c | 468 +- contrib/gcc/libfuncs.h | 2 +- contrib/gcc/libgcc-std.ver | 9 + contrib/gcc/libgcc2.c | 591 +- 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 | 819 +- 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 | 799 +- 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 | 816 +- 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 | 1508 +- 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 | 11078 +++----- contrib/gcc/real.h | 716 +- 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 | 354 +- 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 | 719 +- contrib/gcc/rtlanal.c | 591 +- contrib/gcc/sbitmap.c | 416 +- 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 | 779 +- 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 | 820 +- contrib/gcc/stor-layout.c | 564 +- contrib/gcc/stringpool.c | 4 +- contrib/gcc/system.h | 45 +- contrib/gcc/target-def.h | 124 +- 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 | 1446 +- 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 | 685 +- contrib/gcc/tree.def | 33 +- contrib/gcc/tree.h | 475 +- contrib/gcc/tsystem.h | 11 +- contrib/gcc/unroll.c | 536 +- 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 | 2180 +- contrib/gcc/varray.c | 70 +- contrib/gcc/varray.h | 167 +- contrib/gcc/version.c | 16 +- contrib/gcc/version.h | 3 +- contrib/gcc/vmsdbg.h | 4 +- contrib/gcc/vmsdbgout.c | 230 +- contrib/gcc/xcoffout.c | 5 +- contrib/gcc/xcoffout.h | 29 +- contrib/gcc/xmemdup.c | 38 + 726 files changed, 205777 insertions(+), 89857 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 diff --git a/contrib/gcc/ChangeLog b/contrib/gcc/ChangeLog index c8f8970bc75e..c6496ffb76f1 100644 --- a/contrib/gcc/ChangeLog +++ b/contrib/gcc/ChangeLog @@ -1,111 +1,3635 @@ -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 + + * doc/install.texi (Configuration): Document the valgrind option + to --enable-checking. + +2003-07-08 John David Anglin + + PR Target/11453 + * pa.md: Disparage all mtsar constraints. + (extzv, extv, insv): Don't fail on length of {32|64}. + +2003-07-08 James E Wilson + + PR target/10021 + * emit-rtl.c (set_mem_attribute_minus_bitpos): When handle ARRAY_REF, + loop over new variable t2 instead of t. + +2003-07-08 Stephane Carrez + + * config/m68hc11/m68hc11.h (HAVE_AS_DWARF2_DEBUG_LINE): Don't define + as .file/.loc directives are incompatible with linker relaxation. + +2003-07-08 Jakub Jelinek + + 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. + + * config/i386/i386.md (movdi_1_rex64): Set Y<-m alternative's type + to ssemov. + +2003-07-08 Jakub Jelinek + + * unroll.c (reg_dead_after_loop): Check for reg in REG_EQUAL and + REG_EQUIV notes as well. + +2003-07-07 Dale Johannesen + + PR 10900 + * config/rs6000/darwin-tramp.asm: Fix trampolines. + +2003-07-07 Andrew Pinski + + 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. + +2003-07-07 Richard Kenner + Eric Botcazou + + 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. + +2003-07-06 Matthias Klose + + Backport from mainline: + + 2003-07-04 Zack Weinberg + + * doc/extend.texi: Delete entire section on multiline strings. + +2003-07-04 H.J. Lu + + * Makefile.in: Replace PWD with PWD_COMMAND. + +2003-07-03 Eric Botcazou + + PR optimization/11304 + Backport from mainline: + + 2003-04-18 Richard Kenner + + * cfgcleanup.c (flow_find_cross_jump): Use INSN_P, not active_insn_p. + +2003-07-03 Roger Sayle + + PR target/10700 + * fold-const.c (extract_muldiv_1): There's nothing that can be done + if the expression is a SAVE_EXPR. + +2003-07-03 Eric Botcazou + + PR optimization/11381 + * simplify-rtx.c (simplify_relational_operation): Check that + two equal operands have no side-effects before simplifying + the comparison. + +2003-07-01 Zack Weinberg + + 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. + +2003-07-02 Rainer Orth + + * 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. + +2003-07-01 Richard Henderson + (blame to: Loren James Rittle ) + + * 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. + +2003-07-01 Kazu Hirata + + * doc/contrib.texi: Fix typos. + * doc/sourcebuild.texi: Likewise. + +2003-06-29 Aaron W. LaFramboise + + * config/i386/gthr-win32.h (__GTHREAD_HIDE_WIN32API): Define to 1. + +2003-06-27 Gunther Nikl + + PR target/11014 + * config/m68k/m68k.c (m68k_output_mi_thunk): Use correct assembly + syntax for MIT / MOTOROLA. + +2003-06-27 Ulrich Weigand + + * 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. + + * 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. + +2003-06-27 Rainer Orth + + * config/mips/mips.md (trap): Use break 0 when !TARGET_GAS. + + * config/mips/iris6-o32.h (MIPS_ISA_DEFAULT): Remove. + (MIPS_CPU_STRING_DEFAULT): Redefine to mips2. + + * config/mips/mips.c (TARGET_ASM_UNALIGNED_DI_OP) [TARGET_IRIX5 && + !TARGET_IRIX6]: Define as NULL. + + * config/mips/iris5gas.h (MDEBUG_ASM_SPEC): Override to match + DWARF 2 default. + + * config/mips/dbxmdebug.h: New file. + * config.gcc (mips-sgi-irix6*o32, mips-sgi-irix5*): Use it with + gas and --with-stabs. + +2003-06-27 Andreas Schwab + + * config.gcc (m68k-*-linux*): Don't override extra_parts and + gnu_ld, use the generic *-*-linux* settings instead. + +2003-06-26 Roger Sayle + + PR optimization/11054 + * rtlanal.c (reg_overlap_mentioned_p): Handle ZERO_EXTRACT + and SIGN_EXTRACT. + +2003-06-25 Zack Weinberg + + 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. + + * ggc-page.c (init_gcc): Call fatal_io_error, not abort, + if opening /dev/zero fails. + +2003-06-25 Roger Sayle + + * builtins.c (expand_builtin_strcpy): Construct new argument list + manually instead of using chainon to modify the original arglist. + (expand_builtin_strcmp): Likewise. + +2003-06-25 David O'Brien + + * config/i386/i386.h (builtin_define): Remove duplicate __amd64 + and __amd64__. + +2003-06-25 Dhananjay Deshpande + + * config/sh/sh.c (sh_register_move_cost): + Add case for moving between MAC_REGS. + +2003-06-24 Jerry Quinn + + PR other/11280 + * gcc/doc/invoke.texi (Optimization Options): Remove -Os from + -freorder-functions description. + +2003-06-25 Richard Sandiford + + PR target/11084 + * config/mips/mips.c (mips_expand_prologue): Fix setting of regno + for the end of a variable argument list. + +2003-06-25 Josef Zlomek + + * dwarf2out.c (gen_field_die): Return if type of decl is error mark. + +2003-06-24 Falk Hueffner + + PR target/11260 + * config/alpha/alpha.md (sqrtdf2): Fix operand substitution. + +2003-06-24 Jakub Jelinek + + * builtins.c (expand_builtin_strcpy): Don't evaluate side-effects in + src twice. + +2003-06-23 Jakub Jelinek + + * config/s390/s390.c (s390_output_mi_thunk): Avoid .plt in -m31 + mode, as it requires pic register loaded. + +2003-06-23 Kazu Hirata + + * doc/extend.texi: Fix typos. + * doc/md.texi: Likewise. + +2003-06-23 Roger Sayle + Gerald Pfeifer + + * doc/contrib.texi (Contributors): Add a note on testing and + remove duplicates from testers list. + +2003-06-23 Kazu Hirata + + * doc/invoke.texi: Document dump options, dT and dW. + +2003-06-23 Andreas Schwab + + * doc/invoke.texi: Remove leading `-' from options in index. + +2003-06-22 Kazu Hirata + + * doc/invoke.texi: Document dump, .cfg. + +2003-06-22 Kazu Hirata + + * doc/invoke.texi: Alphabetize dump options. + +2003-06-22 Kazu Hirata + + * doc/invoke.texi: Remove a duplicate -dk. + +2003-06-22 Kazu Hirata + + * doc/rtl.texi: Fix the @findex for pre_modify. + +Sat Jun 21 13:37:52 CEST 2003 Jan Hubicka + + * i386.c (ix86_va_arg): Fix allocation of temporary slot. + +2003-06-21 Gerald Pfeifer + + * doc/contrib.texi (Contributors): Use Windows instead of Win32. + + Update Andreas Jaeger's entry. + + Merge the two entries of Kaveh Ghazi, David Edelsohn, and + Loren J. Rittle. + +2003-06-20 Geoffrey Keating + + 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. + +2003-06-20 Mark Mitchell + + 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. + +2003-06-20 Rainer Orth + + * 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 + + * doc/install.texi (Building): Correct and improve statement + about parallel builds. + +2003-06-20 Eric Botcazou + + * 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. + +2003-06-19 Kazu Hirata + + * flow.c (initialize_uninitialized_subregs): Use + emit_move_insn instead of emitting a hardcoded move. + +2003-06-19 David Edelsohn + + * config/rs6000/rs6000.c (init_cumulative_args): Limit CALL_LIBCALL + to ABI_V4. + +2003-06-19 DJ Delorie + + PR preprocessor/11022 + * cppmacro.c (warn_of_redefinition): Handle cases where the two + definitions have different numbers of tokens. + +2003-06-18 Richard Henderson + + * config/ia64/unwind-ia64.c (_Unwind_GetCFA): New. + (_Unwind_FindEnclosingFunction): Implement. + +2003-06-18 Franz Sirl + + * 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. + +2003-06-17 Jason Merrill + + 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. + +2003-06-17 Ranjit Mathew + + * install.texi (Testing): Add information on how to run Java + runtime tests separately. + +2003-06-17 Christopher Faylor + + * doc/install.texi: Add msvc rebuild caveat. + +2003-06-17 Kazu Hirata + + * doc/contrib.texi: Replace Hitachi with Renesas. + * doc/install.texi: Likewise. + * doc/invoke.texi: Likewise. + +2003-06-17 Franz Sirl + + * config/rs6000/linux.h (MD_FALLBACK_FRAME_STATE_FOR): Partly revert + 2003-01-23 patch. Corrected to handle kernels with changed ucontext. + + * config/rs6000/sysv4.h (SUBTARGET_OVERRIDE_OPTIONS): Error on invalid + -msdata=eabi usages. + +2003-06-14 Richard Earnshaw + + PR optimization/10842 + From trunk: + 2003-01-20 Nick Clifton + + * config/arm/arm.md (sibcall_epilogue): Add an + UNSPEC_PROLOGUE_USE to prevent the link register from being + considered dead. + + 2003-02-02 Richard Earnshaw + + * arm.md (sibcall_epilogue): Set the "conds" to "clob". + (epilogue_insns): Likewise. + +2003-06-14 Richard Earnshaw + + PR target/11183 + * arm.c (output_move_double): Pass SImode to adjust_address. + +2003-06-13 Janis Johnson + + * doc/install.texi (m32r-*-elf): Change company to Renesas. + +2003-06-13 Richard Earnshaw + + * arm.c (output_call_mem): If the address references the link-register + use an instruction sequence that avoids early-clobbering IP. + (eliminate_lr2ip): Delete. + +2003-06-12 Richard Henderson + + PR target/11089 + * config/i386/i386.md (sse_movaps): Use an expander to force + one operand to be a register. + (sse_movups): Likewise. + +2003-06-12 Richard Henderson + + PR middle-end/10557 + * rtlanal.c (subreg_offset_representable_p): Relax subreg check. + +2003-06-13 Eric Botcazou + Christian Ehrhardt + + 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. + +2003-06-13 Eric Botcazou + + PR optimization/10955 + * unroll.c (unroll_loop): Fix off-by-one bug. + +2003-06-12 Richard Henderson + + PR middle-end/10475 + * expmed.c (emit_store_flag): Use simplify_gen_subreg directly + for extracting sub-words. + +2003-06-12 Richard Henderson + + PR target/7594 + * config/m68k/m68k.md (zero_extendhisi2): Use gen_lowpart_SUBREG. + (zero_extendqihi2, zero_extendqisi2): Likewise. + +2003-06-12 Richard Henderson + + PR inline-asm/4823 + * reg-stack.c (any_malformed_asm): New. + (check_asm_stack_operands): Set it. + (convert_regs_1): Check it before aborting. + +2003-06-12 Jakub Jelinek + + * c-decl.c (c_expand_body): Save input_filename and lineno, + set it before tree inlining and restore before return. + +2003-06-12 Ulrich Weigand + + * config/s390/s390.c (s390_emit_prologue): Use LA instead of AR + to initialize GOT register. + +2003-06-12 Jakub Jelinek + + * c-opts.c (complain_wrong_lang): Add on argument. + Print no- switch if on is false. + (c_common_decode_option): Adjust caller. + +2003-06-11 Richard Henderson + + * stmt.c (expand_asm_operands): Don't warn for memories with + queued addresses. + +2003-06-11 Andrew Pinski + + PR target/8787 + * config/i386/djgpp.h (ASM_FILE_START): emit `.intel_syntax' + if -masm=intel. + +2003-06-10 Andrew Haley + + * 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. + +2003-06-09 Richard Henderson + + 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. + + * 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. + + * config/s390/s390.h (EH_RETURN_STACKADJ_RTX): Remove. + +2003-06-08 Richard Henderson + + * stmt.c (expand_asm_operands): Re-word warning. + +2003-06-08 Richard Henderson + + * 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. + +2003-06-07 Richard Henderson + + * c-common.c (cb_register_builtins): Define __EXCEPTIONS for C also. + +2003-06-07 Kelley Cook + + * configure.in (HAVE_LD_RO_RW_SECTION_MIXING): Remove quotes in + section names. + * configure: Regenerate. + +2003-06-07 Alan Modra + + * config/rs6000/linux64.h (CRT_CALL_STATIC_FUNCTION): Define. + +2003-06-06 James E Wilson + + PR inline-asm/10890 + * reload1.c (merge_assigned_reloads): Abort only if two reloads have + different in fields. + +2003-06-06 Richard Earnshaw + + PR target/11052 + * ifcvt.c (noce_process_if_block): Fail if the destination has + side-effects. + +2003-06-06 Dan Kegel + Kaz Kojima + + PR target/10331 + * config/sh/t-linux (STMP_FIXPROTO): Define. + + PR target/11096 + * config/sh/linux.h (CPLUSPLUS_CPP_SPEC): Redefine so to include + -D_GNU_SOURCE. + +2003-06-05 David Miller + Richard Henderson + + * 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. + +2003-06-05 Eric Botcazou + + * doc/md.texi (Machine Constraints): Correct the meaning of + constraints related to floating-point registers on SPARC. + +2003-06-05 Eric Botcazou + Paolo Bonzini + + 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. + +2003-06-04 David Edelsohn + + * doc/install.texi (*-ibm-aix*): Native as and ld required + to bootstrap on AIX 5L. + +2003-06-04 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. + + * 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. + +2003-06-04 Eric Botcazou + + PR optimization/11018 + * config/sparc/sparc.c (sparc_v8plus_shift): Use which_alternative + consistently to decide whether the scratch register is really + required. + +2003-06-04 Eric Botcazou + + 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. + +2003-06-03 Richard Henderson + + * unwind.inc (_Unwind_Resume_or_Rethrow): Fix return type. + * unwind.h (_Unwind_Resume_or_Rethrow): Update. + (_Unwind_SjLj_Resume_or_Rethrow): Likewise. + +2003-06-03 Douglas B Rupp + + * Makefile.in (TEXI_GCC_FILES): Remove vms.texi entry. + * doc/gcc.texi: Remove vms.texi section. + * doc/vms.texi: Remove obsolete file. + +2003-06-03 Richard Henderson + + PR target/10673 + * config/i386/i386.c (ix86_split_long_move): Fix base register + mode for XFmode splits for TARGET_64BIT. + +2003-06-02 Kazuhiro Inaoka + + * gcc/config.gcc Add support multilib parts for m32rx processor. + +2003-06-01 Eric Botcazou + + PR target/11044 + * config/i386/i386.md (length attribute): Set length to 4 + for instructions of type "fcmp". + +2003-06-01 Josef Zlomek + + * rtl.def (CONST_DOUBLE): Update comment. + +2003-06-01 Seth Arnold + Aldy Hernandez + + PR10871 + * config/rs6000/rs6000.c (rs6000_stack_info): Do not add + vrsave_size twice. + +2003-05-31 Eric Botcazou + + * doc/install.texi (mips-sgi-irix5): Add missing + HTML
marker. + +2003-05-31 Eric Botcazou + + * doc/md.texi (Machine Constraints): Document + missing SPARC constraints. + +2003-05-31 Eric Botcazou + + * doc/md.texi (Automaton pipeline description): Use + "type" instead of "cpu" as the attribute in the examples. + +2003-05-30 Rainer Orth + + * 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. + +2003-05-29 Gabriel Dos Reis + + * diagnostic.h (output_verbatim): Remove printf attribute. + (verbatim): Likewise. + * diagnostic.c (output_pointer): New function. + (output_format): Use it. Handle %p format specifier. + +2003-05-27 Denis Chertykov + + * 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. + +2003-05-25 Gerald Pfeifer + + * doc/contrib.texi (Contributors): Update Kean Johnston. + +Fri May 23 21:19:31 CEST 2003 Jan Hubicka + Andreas Jaeger + + * i386.h (TARGET_CPU_CPP_BUILTINS): Define __amd64 and __amd64__; + do not use assertion. + +Fri May 23 20:55:39 CEST 2003 Jan Hubicka + + * i386.md (sse_loadss, sse_loadss_1, sse2_loadsd, sse2_loadsd_1): + Rewrite + +2003-05-23 Eric Botcazou + + * doc/install.texi: Remove sparc64-*-*. Add sparc64-*-solaris2*. + Document sparcv9-*-solaris2* as a synonym for sparc64-*-solaris2*. + +2003-05-22 Eric Botcazou + + PR bootstrap/10805 + * doc/install.texi (sparc-sun-solaris2.7): Document bootstrap + failure with Sun assembler 5.0 Alpha 03/27/98. + +2003-03-21 Loren James Rittle + + * config/sparc/freebsd.h (CPP_CPU64_DEFAULT_SPEC): Add -D__sparcv9 + -D__sparc__ to match system compiler convention. + +2003-05-20 Kevin Ryde + Wolfgang Bangerth + + PR c/10355 + * doc/extend.texi: Put a warning into the documentation + of attribute regparm. + +2003-05-20 Ulrich Weigand + + * config/s390/s390.md ("*iordi3_oi"): Do not mark commutative. + ("*iorsi3_oi"): Likewise. + +2003-05-19 John David Anglin + + * pa/milli64.S ($$mulI): Fix typo. + +2003-05-19 Gabriel Dos Reis + + * 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. + +2003-05-19 Nick Clifton + + * 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. + +2003-05-19 Eric Botcazou + + Backport from mainline: + + 2003-05-10 Alexander Aganichev + + * config/i386/i386.h (MODES_TIEABLE_P): Fix typo. + +2003-05-16 Wolfgang Bangerth + + * doc/bugreport.texi: Remove most of the preface of the + bugs section. + +2003-05-16 Nick Clifton + + * config/mcore/mcore.md (jump): Use emit_jump_insn to generate the + jump insn. + +2003-05-15 Gerald Pfeifer + + * doc/invoke.texi (Warning Options): Mark -Wmissing-declarations + as a C only option. + +2003-05-15 Wolfgang Bangerth + + * doc/bugreport.texi: Remove most of the bug reporting + instructions and merge them into bugs.html. + +2003-05-14 Kaveh R. Ghazi + + * sparc.c (print_operand): Fix uninitialized warning. + +2003-05-14 Mark Mitchell + + * version.c: Reset to prerelease format. + * doc/include/gcc-common.texi: Update version number. + +2003-05-13 Release Manager + + * GCC 3.3 Released. + +2003-05-12 Mark Mitchell + + PR other/10745 + * configure.in: Correct detection of GNU ld version number. + * configure: Regenerated. + +2003-05-08 J"orn Rennecke + + * sh.c (gen_block_redirect, split_branches): Use + CODE_FOR_jump_compact instead of CODE_FOR_jump + +2003-05-06 Eric Christopher + + * config/mips/linux.h: Fix typo. + +2003-05-06 Ulrich Weigand + + PR other/10650 + * unwind-dw2.c (uw_update_context_1): Don't set sp as cfa on s390. + (uw_init_context_1): Set initial sp to outer cfa on s390. + +2003-05-06 Mark Mitchell + + PR other/10658 + * gcc.c (process_command): Update copyright date. + +2003-05-06 Bruce Korb + + * inclhack.def: fix up whitespace differences from mainline. + mark fix tests that fail on BSD systems (like mainline). + Fixup the solaris_mutex_init test to cope with Sol. 2.6 (like mainline). + Removed unused SONY commentary (its obsolete anyway). + (svr4_mach_defines): remove i860 machine from comment (like mainline). + * gcc/fixinc/tests/base/pthread.h: solaris_mutex_init fix tests + * gcc/fixinc/tests/base/testing.h: remove ^M chars from some mistake + * gcc/fixinc/tests/base/Xm/Traversal.h: accommodate BSD's sed + * gcc/fixinc/tests/base/sys/stat.h: accommodate BSD's sed + * gcc/fixinc/fixincl.x: regenerated + +2003-05-06 Phil Edwards + + * doc/install.texi (mips-*-*): Add note about libstdc++. + +2003-05-05 Mark Mitchell + Kean Johnston + + * toplev.c (check_global_declarations): Do not warn about unused + static consts. + +2003-05-05 Richard Henderson + + * builtins.c (expand_builtin) : Remove. + : New. + * builtins.def (BUILT_IN_DWARF_FP_REGNUM): Remove. + (BUILT_IN_DWARF_SP_COLUMN): New. + * dwarf2out.c (expand_builtin_dwarf_fp_regnum): Remove. + (expand_builtin_dwarf_sp_column): New. + * except.h: Update to match. + * unwind-dw2.c (execute_stack_op): Correct stack push typo. + (execute_cfa_program): Record location expression address + before extracting length. + (uw_update_context_1): Install old CFA into stack pointer column. + (uw_init_context_1): Set cfa_reg to stack pointer column. + +2003-05-05 David O'Brien + + * config/rs6000/sysv4.h (CPP_OS_FREEBSD_SPEC): Add __ELF__ to mirror + other FreeBSD ports. + (LINK_OS_FREEBSD_SPEC): Mirror conventions on other FreeBSD ports. + +2003-05-05 Jason Merrill + + * stor-layout.c (update_alignment_for_field): Set DECL_ALIGN for + the field. + +2003-05-02 Zack Weinberg + + PR c/10604 + * c-opts.c (c_common_decode_option ): Set + warn_sign_compare for C++ only. + * doc/invoke.texi: Clarify documentation of -Wsign-compare. + +2003-05-03 Falk Hueffner + Gerald Pfeifer + + * doc/contrib.texi (Contributors): Add Zdenek Dvorak, Aldy + Hernandez, and Kazu Hirata. + +2003-05-02 Richard Henderson + + PR c++/10570 + * except.c: Revert 04-01 and 04-02 forced-unwind changes. + * flags.h, toplev.c, doc/invoke.texi: Likewise. + + * unwind-dw2.c (_Unwind_GetCFA): Fix ptr->int conversion warning. + * unwind.inc (_Unwind_DeleteException): Check for null + exception_cleanup. + + * unwind-sjlj.c (_Unwind_SjLj_Resume_or_Rethrow): New. + * unwind.inc (_Unwind_Resume_or_Rethrow): New. + * unwind.h: Declare them. + * libgcc-std.ver (GCC_3.3): Export them. + +2003-05-02 Steven Bosscher + + * tree-inline.c (find_alloca_call): + Use walk_tree_without_duplicates, instead of walk_tree. + (find_builtin_longjmp_call): Ditto. + * c-objc-common.c (c_cannot_inline_fn): Ditto. + +2003-05-02 Gerald Pfeifer + + * doc/contrib.texi (Contributors): Add Daniel Berlin. + +2003-05-01 Rodney Brown + + * rtl.h (subreg_offset_representable_p): Prototype. + +2003-05-01 Roger Sayle + + PR fortran/9974 + * gcse.c (reg_killed_on_edge): New function to test whether the + given reg is overwritten by any instruction queued on an edge. + (bypass_block): Ignore substitutions killed on incoming edges. + Don't bypass outgoing edges that have queued instructions. + +2003-04-30 Andreas Schwab + + * doc/extend.texi (Other Builtins): Enclose multiple word data + type in braces for @deftypefn. + +2003-04-29 Jason Merrill + + PR middle-end/10336 + * jump.c (never_reached_warning): Really stop looking if we reach + the beginning of the function. + +Tue Apr 29 21:07:00 CEST 2003 Jan Hubicka + + * cse.c (count_reg_usage): Revert my previous patch. + +2003-04-29 Alexander Kabaev + + bootstrap/10452 + * gengtype-yacc.y: Improve portability. + +2003-04-29 Zack Weinberg + + * config.gcc: Install obsolete target list for GCC 3.3. + * doc/install.texi: Mention in specific-target instructions + that certain configurations are deprecated. + +2003-04-29 Kriang Lerdsuwanakij + + * c-pragma.c (maybe_apply_renaming_pragma): Fix typo. + * gcc.c (display_help): Likewise. + * toplev.c (f_options): Likewise. + * params.def (PARAM_MAX_INLINE_SCOPE): Likewise. + * config/c4x/c4x.h (TARGET_SWITCHES): Likewise. + * config/mcore/mcore.h (TARGET_SWITCHES): Likewise. + * config/s390/s390.h (TARGET_SWITCHES): Likewise. + * config/v850/v850.h (TARGET_SWITCHES): Likewise. + +2003-04-29 Danny Smith + + * config/i386/mingw32.h (LIBGCC_SPEC): Add libmingwex.a. + Update copyright. + * config/i386/cygwin.h (LIBGCC_SPEC): Add libmingwex.a, for + -mno-cygwin case. + +2003-04-29 J"orn Rennecke + + * varasm.c (default_assemble_visibility): Use assemble_name. + +2003-04-29 David O'Brien + + * config/i386/freebsd64.h (LINK_SPEC): Mirror FreeBSD linker. + * config/rs6000/freebsd.h (LINK_SHLIB_SPEC): New macro. + (SIZE_TYPE): New macro. + * config/i386/freebsd-aout.h (NO_PROFILE_COUNTERS): New macro. + (SET_ASM_OP): New macro. + (HANDLE_SYSV_PRAGMA): New macro. + (ASM_WEAKEN_LABEL): New macro. + +2003-04-28 Mark Mitchell + + PR c++/10180 + * tree-inline.c (expand_call_inline): Call push_srcloc when + encountering EXPR_WITH_FILE_LOCATION. Honor warn_inline. + +2003-04-28 Mike Stump + + * gdbinit.in: Update to reflect new identifier structure. + +2003-04-28 Richard Henderson + + * config/sparc/sparc.c (print_operand): Add 's' to sign-extend. + * config/sparc/sparc.md (const_mulsidi3_v8plus): Fix mode of + integral constant mult operand. + (const_mulsidi3_sp32, const_mulsidi3_sp64): Likewise. + (const_smulsi3_highpart_v8plus): Likewise. + (const_smulsi3_highpart): Likewise. + (const_umulsidi3_sp32): Likewise; sign-extend it in the output. + (const_umulsidi3_sp64, const_umulsidi3_v8plus): Likewise. + (const_umulsi3_highpart_v8plus): Likewise. + (const_umulsi3_highpart): Likewise. + +2003-04-28 David O'Brien + + * config/i386/i386.h (builtin_define): Add __amd64 and __amd64__. + +Mon Apr 28 09:54:56 CEST 2003 Jan Hubicka + + PR c/10308 + * reload.c (find_reloads_address_1): Reload plus at the place of + index register. + +2003-04-26 Richard Henderson + + * config/ia64/ia64.c (ia64_compute_frame_size): Allow inline asm + to clobber ar.pfs and ar.unat. + (ia64_expand_prologue): Force alloc instruction if ar.pfs saved; + fix test for spilling ar.pfs to the stack. + +2003-04-26 Stephane Carrez + + * doc/install.texi (Binaries): Mention binaries for HC11/HC12. + +2003-04-26 Stephane Carrez + + * doc/extend.texi (Function Attributes): Document "near" and "far" + for 68HC11 and 68HC12. + +2003-04-25 Bob Wilson + + * config/xtensa/linux.h (TARGET_OS_CPP_BUILTINS): Back out previous + addition of __PIC__ and __pic__ macros. + * config/xtensa/xtensa.h: Clean up indentation. + +2003-04-25 Bob Wilson + + * config/xtensa/linux.h (TARGET_OS_CPP_BUILTINS): Remove definition of + _GNU_SOURCE. Add definitions of __PIC__ and __pic__. + (SUBTARGET_CPP_SPEC): Define. + (LIB_SPEC): Delete. + * config/xtensa/xtensa-protos.h (xtensa_declare_object): Delete. + * config/xtensa/xtensa.c (xtensa_declare_object): Delete. + * config/xtensa/xtensa.h (CPP_SPEC, SUBTARGET_CPP_SPEC, EXTRA_SPECS): + Define. + (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL): Delete. + (ASM_OUTPUT_ALIGNED_BSS, BSS_SECTION_ASM_OP): Define. + +2003-04-25 Richard Henderson + + PR opt/10315 + * config/rs6000/rs6000.c (rs6000_emit_move): Only elide proper + checks during reload; use validize_mem instead of adjust_address. + +Fri Apr 25 15:43:23 CEST 2003 Jan Hubicka + + * emit-rtl.c (subreg_hard_regno): Check that register is + representable. + * reload.c (reload_inner_reg_of_subreg): When register is not + representable, reload the whole thing. + (find_reloads): Likewsie. + * rtlanal.c (subreg_representable_p): New function. + +Sun Apr 20 18:23:18 CEST 2003 Richard Henderson + + (backported to 3.3 by Jan Hubicka) + + * config/ia64/ia64.md (UNSPECV_SETJMP_RECEIVER): New. + (builtin_setjmp_receiver): Delay call to ia64_reload_gp + until after reload. + + * emit-rtl.c (try_split): Handle 1-1 splits of call insns properly. + + * config/ia64/ia64.c (TARGET_FUNCTION_OK_FOR_SIBCALL): New. + (ia64_gp_save_reg): Remove. + (struct ia64_frame_info): Move to the beginning of the file; + add reg_save_gp. + (ia64_expand_call): Rearrange for new call patterns. + (ia64_reload_gp): New. + (ia64_split_call): New. + (ia64_compute_frame_size): Allocate reg_save_gp. + (ia64_expand_prologue): Save reg_save_gp. + (ia64_expand_epilogue): Don't restore gp. + (ia64_hard_regno_rename_ok): Remove R4 hack. + (ia64_function_ok_for_sibcall): New. + (ia64_output_mi_thunk): Set reload_completed, no_new_pseudos; + call try_split on sibcall pattern. + * config/ia64/ia64-protos.h: Update. + * config/ia64/ia64.md (call_nogp, call_value_nogp, sibcall_nogp): + Rename from nopic versions. Confiscate 2nd argument to call as + a marker. + (call_pic, call_value_pic, sibcall_pic): Remove. + (call_gp, call_value_gp, sibcall_gp): New. + (builtin_setjmp_setup): Remove. + (builtin_setjmp_receiver): Call ia64_reload_gp. + +2003-04-24 John David Anglin + + PR opt/8705 + * gcse.c (try_replace_reg): On a successful substitution of a constant + into a single set, try to simplify the source of the set. + * loop.c (scan_loop): Don't try to optimize a MODE_CC set with a + constant source. + +2003-04-24 Alexander Kabaev + + bootstrap/10453 + * config/sparc/sparc.md (umulsidi3, mulsidi3): Avoid using + const_umulsidi3_sp32 and const_mulsidi3_sp32 on 64bit targets + where they might be not present. Use their _sp64 equivalent + instead. + +2003-04-23 Richard Henderson + + PR opt/8300 + * toplev.c (rest_of_compilation): Delay no_new_pseudos until + after initialize_uninitialized_subregs; update reg info assuming + new pseudos were created. + +2003-04-23 Olivier Hainque + + * config/pa/pa.md (extv, extzv): FAIL if the bitfield length is zero. + +2003-04-23 James A Morrison + + * invoke.texi: Eliminate extra white-space caused by @gccoptlist{ + on its own line. + Ensure there are two spaces between each pair of options and add + @gol where appropriate. + +2003-04-23 Ulrich Weigand + + * config/s390/s390.c (s390_expand_cmpstr): Disable CLC loop. + +2003-04-22 Devang Patel + + * cpptrad.c (_cpp_replacement_text_len): Add check for macro parameter count. + (_cpp_copy_replacement_text): Same. + +2003-04-22 Richard Henderson + + PR 8866 + * rtl.h (MEM_NOTRAP_P): New. + (MEM_COPY_ATTRIBUTES): Copy it. + * rtlanal.c (may_trap_p): Check it. + * expr.c (do_tablejump): Set it. + + * cfgrtl.c (try_redirect_by_replacing_jump): Revert last three changes. + +2003-04-22 David Turner + + * gbl-ctors.h: Add special license exception. + * libgcc2.h: Likewise. + * tsystem.h: Likewise. + * gcov-io.h: Likewise. + +2003-04-21 Mark Mitchell + + * Makefile.in (calls.o): Depend on except.h. + * calls.c: Include except.h. + (emit_call_1): Call note_eh_region_may_contain_throw if + appropriate. + * except.c (eh_region): Add may_contain_throw. + (expand_eh_region_end_cleanup): Do not include handler code when + it cannot be reached. + (note_eh_region_may_contain_throw): New function. + * except.h (note_eh_region_may_contain_throw): New function. + +2003-04-21 Mark Mitchell + + * config/i386/winnt.c (i386_pe_mark_dllimport): Revert previous + changes. + +2003-04-21 Mark Mitchell + + * config/i386/winnt.c (i386_pe_mark_dllimport): Make the new RTL + have the same form as the old RTL. + +2003-04-18 Mark Mitchell + + * cfgrtl.c (try_redirect_by_replacing_jump): Create a basic block + for orphaned jump tables. + +2003-04-20 John David Anglin + + PR/8705 + * pa.md (movccfp): New expander. + (setccfp0, setccfp1): Rename to movccfp0 and movccfp1, respectively. + Reverse fcmp conditions. + +2003-04-20 Marek Michalkiewicz + + * config/avr/avr.md (*cmpqi_sign_extend): Handle negative values + of operand 1 correctly. + +2003-04-19 John David Anglin + + * cfgrtl.c (try_redirect_by_replacing_jump): Remove unused variables. + * flow.c (life_analysis): Fix warning. + +2003-04-18 Gerald Pfeifer + + * doc/contrib.texi (Contributors): Prefer "bug fix" over "bugfix". + Add Segher Boessenkool. + +2003-04-18 Alexander Sotirov + + PR c/9177 + * c-decl.c (c_expand_body): Don't garbage collect the function + body if we are going to dump it later. + +2003-04-18 Eric Botcazou + + PR optimization/7675 + * c-typeck.c (build_external_ref): Set the DECL_NONLOCAL flag + on VAR_DECL, PARM_DECL and FUNCTION_DECL from within + nested functions if they refer to declarations from parent functions. + * stmt.c (expand_decl): Don't put automatic variables in registers + if the DECL_NONLOCAL flag is set. + +2003-04-17 Janis Johnson + + * doc/sourcebuild.texi (Test Suites): Document support for testing + binary compatibility (moved from testsuite/README.compat). + +2003-04-17 Simon Law + + * doc/include/gpl.texi: Fix double-spacing after "MA" to match + the one provided by the FSF. + +2003-04-17 Gerald Pfeifer + + * doc/install.texi (Binaries): Update URL and list of platforms + provided by ftp.thewrittenword.com. + +2003-04-17 Eric Botcazou + + * doc/invoke.texi (inline-limit): Fix pasto. + +2003-04-16 Mark Mitchell + + PR middle-end/8866 + * cfgtrl.c (try_redirect_by_replacing_jump): Do not delete + jumptables. + +2003-04-16 John David Anglin + + PR/10271 + * pa-protos.h (function_arg): Remove last argument. + * pa.c (function_arg): Likewise. Use CUMULATIVE_ARGS struct instead. + * pa.h (struct hppa_args): Add member incoming. + (INIT_CUMULATIVE_ARGS, INIT_CUMULATIVE_INCOMING_ARGS): Initialize + member incoming. + (FUNCTION_ARG): Revise call to function_arg. + (FUNCTION_INCOMING_ARG): Delete. + +2003-04-15 J"orn Rennecke + + PR target/9594: + * sh.c (barrier_align): Also recognize stuff_delay_slot as + an indicator that a barrier was created by branch splitting. + + merge from mainline: + + 2003-03-05 J"orn Rennecke + + * sh.h (OVERRIDE_OPTIONS): For TARGET_SHMEDIA, the minimum value + for align_jumps is 4. + + (SECONDARY_INPUT_RELOAD_CLASS): If reloading a PLUS into FPUL, + use GENERAL_REGS. + + 2003-03-03 J"orn Rennecke + + * sh.h (OVERRIDE_OPTIONS): Set default values for align_loops + and align_jumps if not set. + Force align_jumps to be at least 2. + When relaxing, force align_functions to be at least the maximum of + align_loops, align_jumps and 4. + * sh.c (find_barrier, barrier_align): Honour align_jumps_log. + (sh_loop_align): Honour align_loops_log. + + * sh.md (length attribute): Use prev_nonnote_insn instead of PREV_INSN + to check for indirect_jump_scratch. + (indirect_jump_scratch): Add second set. + * sh.c (output_far_jump): Use prev_nonnote_insn instead of PREV_INSN + when looking for indirect_jump_scratch. + Extract scratch register taking new structure of indirect_jump_scratch + into account. + (gen_block_redirect): Set INSN_SCOPE for indirect_jump_scratch. + +2003-04-15 James A. Morrison + + * invoke.texi (Spec Files): Wrap if-exists-else example. + (MCore): Remove duplicate @itemx entries and @opindex entries. + +2003-04-15 Ulrich Weigand + + * unwind.inc (_Unwind_Backtrace): New function. + * unwind.h (_Unwind_Backtrace): Declare it. + * libgcc-std.ver (_Unwind_Backtrace): Export it. + +2003-04-15 Jason Merrill + + PR middle-end/10336, c++/10401 + * jump.c (never_reached_warning): Also stop looking if we reach the + beginning of the function. + +2003-04-15 Kaveh R. Ghazi + + PR target/10338 + PR bootstrap/10198 + PR bootstrap/10140 + * fixinc/gnu-regex.c (regerror): Use mempcpy not __mempcpy. + +2003-04-15 Jakub Jelinek + + * config/rs6000/rs6000.h (EPILOGUE_USES): Use register 2, + instead of TOC_REGISTER in epilogue in + current_function_calls_eh_return functions. + +2003-04-14 Hans-Peter Nilsson + + PR target/10377 + * 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. + +Mon Apr 14 16:14:37 CEST 2003 Jan Hubicka + + PR opt/10024 + * cfgrtl.c (force_nonfallthru_and_redirect): Use unchecked_make_edge. + +2003-04-14 Kriang Lerdsuwanakij + + * doc/contrib.texi (Contributors): Correct my entry. + +2003-04-12 Stephane Carrez + + * config/m68hc11/m68hc11-protos.h + (m68hc11_eq_compare_operator): Declare + * config/m68hc11/m68hc11.h (PREDICATE_CODES): Register new predicate. + * config/m68hc11/m68hc11.c (m68hc11_eq_compare_operator): New predicate + (d_register_operand): Check the operand mode. + (hard_addr_reg_operand): Likewise. + +2003-04-12 Stephane Carrez + + * config/m68hc11/m68hc11.md ("decrement_and_branch_until_zero"): New + pattern for dbcc/ibcc generation for 68HC12. + ("doloop_end"): New pattern. + ("m68hc12_dbcc_dec_hi"): New pattern for dbeq/dbne. + ("m68hc12_dbcc_inc_hi"): New pattern for ibeq/ibne. + ("m68hc12_dbcc_dec_qi"): New pattern. + ("m68hc12_dbcc_inc_qi"): New pattern. + (split): Add split for the above when we can't use dbcc/ibcc due to + reloading. + (peephole2): Add peephole2 to generate the above when possible. + +2003-04-12 Stephane Carrez + + * config/m68hc11/m68hc11.md ("bitcmpqi" split): No need to test the + mode of operand 0. + (peephole2 optimize const load): Likewise for operand 2. + ("*rotlhi3_with_carry"): Change pattern to a const 1 rotate which + clobbers CC_REGNUM. + ("*rotrhi3_with_carry"): Likewise. + (ashift:DI 1 split): Update pattern to create the above rotate. + (lshiftrt:DI 1 split): Likewise. + +2003-04-12 Stephane Carrez + + * config/m68hc11/m68hc11.md (SOFT_Z_REGNUM): New constant. + ("tstqi_z_used" split): Use it. + ("cmphi_z_used"): Likewise. + ("bitcmpqi_z_used"): Likewise; also use SP_REGNUM constant. + ("cmpqi_z_used"): Likewise. + +2003-04-12 Mark Mitchell + + PR c++/7910 + * config/i386/winnt.c (i386_pe_mark_dllimport): Fix thinko. + +2003-04-12 Stephane Carrez + + * config/m68hc11/m68hc11.h (TARGET_SWITCHES): Fix -mnominmax option; + recognize -mnorelax. + (reg_class): Add Z_OR_S_REGS to represent soft registers with Z + (REG_CLASS_NAMES): Add its name. + (REG_CLASS_CONTENTS): Define its content. + +2003-04-12 Stephane Carrez + + * config/m68hc11/larith.asm (memcpy): Use ARG macro to access stack + parameters so that offsets are valid for far definition. + (__mulsi3): Likewise and use ret to return. + (___adddi3, ___subdi3, ___notdi2, ): Don't use it to save the result. + +2003-04-11 Geoffrey Keating + + * doc/extend.texi (Empty Structures): New. + +2003-04-11 Richard Henderson + + PR c++/10202 + * expr.c (expand_expr): Use COMPLETE_OR_UNBOUND_ARRAY_TYPE_P + not COMPLETE_TYPE_P for re-invoking layout_decl. + +2003-04-11 Simon Law + + * doc/bugreport.texi: Fix paragraph breaking between sections + in preparation for TeXinfo's paragraph indentation fixes. + * doc/extend.texi: Ditto. + * doc/invoke.texi: Ditto. + * doc/objc.texi: Ditto. + * doc/gcov.texi: Wrap 'gcov' in @command{}. + * doc/invoke.texi (Darwin Options): Add a preamble. + +2003-04-11 Richard Henderson + + PR c/10201 + * expr.c (expand_expr): Move DECL_RTL frobbing ... + * stor-layout.c (layout_decl): ... here. + +2003-04-11 John David Anglin + + * doc/install.texi (hppa): Update links for HP-UX patches. Revise + notes on linker selection and configuration for 64-bit HP-UX port. + * doc/invoke.texi (hppa): Remove hppa text from description for + -ffunction-sections and -fdata-sections. Document -static, -nolibdld + and -threads options. + + * pa-hpux10.h (LIB_SPEC): Add link options to resolve dependency of + libc.a on libdld.sl when -static is specified and -nolibdld is not + specified. + * pa64-hpux.h (LIB_SPEC): Likewise. + * pa-hpux11.h (LIB_SPEC): Likewise. + (LINK_SPEC): Add __gcc_plt_call as an undefined symbol when -shared + is not specified. + +2003-04-08 Jonathan Wakely + + * doc/extend.texi (Template Instantiation): Refer to ISO standard, + not Working Paper. + * doc/invoke.texi (C++ Dialect Options): Same. + +Fri Apr 11 00:12:14 CEST 2003 Jan Hubicka + + PR inline-asm/8803 + * function.c (instantate_virtual_regs): Verify that all ASM statements + match after the virutal regs instantiation. + +2003-04-10 Steve Ellcey + + * ia64-protos.h (addp4_optimize_ok): New. + * ia64.c (addp4_optimize_ok): New. + * ia64.md (*ptr_extend_plus_1): Use addp4_optimize_ok. + (*ptr_extend_plus_2): Ditto. + +2003-04-10 Steve Ellcey + + * expr.c (expand_assignment): Extend offset_rtx with convert_to_mode + not with convert_memory_address. + (store_constructor): Ditto, and same for copy_size_rtx. + (expand_expr): Ditto. + +2003-04-10 Ulrich Weigand + + * config/s390/s390.c (larl_operand): Do not allow symbols + marked with '@'. + (s390_encode_section_info): Mark symbols with forced 1-byte + alignment with '@'. + (s390_strip_name_encoding): Strip '@'. + (legitimize_pic_address): Handle symbols that are not valid + LARL operands in 64-bit mode. + +2003-04-10 Andrew Haley + + * tree-inline.c (inlinable_function_p): Disable inlining for + synchronized methods. + +2003-04-09 Alexandre Oliva + + * config/fp-bit.c (unpack_d): Handle pair of doubles with + different signs correctly. + +2003-04-08 Richard Henderson + + PR target/9886 + * config/ia64/ia64.md (cmovdi_internal): Use 'n' not 'i' constraints. + (cmovsi_internal): Likewise. + +2003-04-07 Matt Kraai + + * doc/install.texi: Use @command and @samp for single- and + multi-word commands respectively. + * doc/makefile.texi: Likewise. + * doc/sourcebuild.texi: Likewise. + +2003-04-07 Christian Ehrhardt + Richard Henderson + + PR c/9516 + * expr.c (safe_from_p): Rearrange to avoid deep recursion in + favour of looping and tail recursion for TREE_LIST and binops. + +2003-04-07 Glen Nakamura + + PR opt/8634 + * explow.c (maybe_set_unchanging): Don't flag non-static const + aggregate type initializers with RTX_UNCHANGING_P. + +2003-04-07 Richard Henderson + + PR opt/8634 + * function.c (purge_addressof_1): Don't try arithmetics for + unchanging memories. + +2003-04-07 Janis Johnson + + * doc/sourcebuild.texi (Test Suites): Document testing support for + gcov and profile-directed optimizations; describe gcc.misc-tests. + +2003-04-07 Eric Botcazou + + * doc/rtl.texi (Comparison operations): Update to + record the allowed comparison modes. + +Mon Apr 7 22:13:38 CEST 2003 Jan Hubicka + + PR target/10077 + * i386.md (movsi_1): Fix SSEMOV alternative. + +Mon Apr 7 15:56:30 CEST 2003 Jan Hubicka + + PR opt/10024 + Revert Zack's change + * cfglayout.c (cfg_layout_redirect_edge): + Redirect any branch edges unified with the fallthru one. + * cfgrtl.c (force_nonfallthru_and_redirect): Do not special + case fallthru edges when called via cfglayout.c + +2003-04-07 James A Morrison + + * doc/extend.texi (Darwin Pragmas): Fix spelling of Mac OS. + +2003-04-05 Kaveh R. Ghazi + + * c-decl.c (set_save_expr_context): Prototype. + +2003-04-05 David Edelsohn + + * config/rs6000/rs6000.h (RTX_COSTS): Halve Power multiply costs. + * config/rs6000/rs6000.md: Correct Power4 multiply latency. + +2003-04-05 Zack Weinberg + + PR optimization/10024 + * cfgrtl.c (force_nonfallthru_and_redirect): If e is the edge + we want, use it. + +2003-04-05 Gerald Pfeifer + + PR bootstrap/10267 + * doc/install.texi (*-*-solaris2): /bin/ksh is not just recommended + for configuring. + +2003-04-04 Kaveh R. Ghazi + + * c-decl.c (set_save_expr_context): Use traditional-style function + definition. + +2003-04-04 Gerald Pfeifer + + * doc/contrib.texi (Contributors): Add entries for Wolfgang + Bangerth, DJ Delorie, Christian Ehrhardt, Christopher Faylor, + Nathanael Nerode, Diego Novillo, Hartmut Penner, Volker Reichelt, + Danny Smith, and Ulrich Weigand. + Update Kriang Lerdsuwanakij and fix a typo in Janis Johnson's + entry. + +2003-04-04 Zack Weinberg + + PR bootstrap/10216 + * configure.in: Check whether it is necessary to link against + libm to use ldexp. + * configure: Regenerate. + * Makefile.in: Add LDEXP_LIB substitution variable. + +2003-04-03 Jason Merrill + + PR c/10175 + * jump.c (never_reached_warning): Revert patch of 2002-11-02. + Look backwards for a line note. + +2003-04-02 Mike Stump + + * doc/extend.texi (PowerPC AltiVec Built-in Functions): Split up + some to avoid faulting makeinfo --html. + +2003-04-02 Richard Henderson + + * libgcc-std.ver (_Unwind_GetCFA): New. + * unwind-dw2.c (_Unwind_GetCFA): New. + * unwind-sjlj.c (_Unwind_GetCFA): New. + * unwind.h: Declare it. + +2003-04-02 Mike Stump + + * doc/install.texi (Specific): Update pointers to apple.com. + +2003-04-01 Jan Hubicka + + PR inline-asm/8088 + * i386.c (ix86_hard_regno_mode_ok): Return 0 for MMX/SSE registers + when MMX/SSE is not available. + +2003-04-02 Richard Henderson + + * except.c (sjlj_find_directly_reachable_regions): Recognize when + must-not-throw region has been deleted. + +2003-04-02 Richard Henderson + + * dwarf2out.c (output_call_frame_info): Ignore fde->nothrow as an + optimization when flag_exceptions not enabled. + +2003-04-01 Richard Henderson + + * except.c (convert_from_eh_region_ranges_1): Smash REG_EH_REGION + notes for nothrow calls if flag_forced_unwind_exceptions. + (build_post_landing_pads): Mind flag_forced_unwind_exceptions. + (sjlj_find_directly_reachable_regions): Likewise. + (reachable_handlers): Likewise. + (can_throw_external): Likewise. + (collect_one_action_chain): Record cleanups after catch-all and + must-not-throw if flag_forced_unwind_exceptions. + * flags.h (flag_forced_unwind_exceptions): Declare. + * toplev.c (flag_forced_unwind_exceptions): New. + (lang_independent_options): Add it. + * doc/invoke.texi: Add it. + +2003-04-01 Geoffrey Keating + + * unwind-dw2-fde-darwin.c (DESTRUCTOR_MAY_BE_CALLED_LIVE): New. + (live_image_destructor): Reset image to initial state. + (examine_objects): Set DESTRUCTOR_MAY_BE_CALLED_LIVE. + +2003-04-01 Dale Johannesen + + * cse.c (count_reg_usage): Fix handling of REG_EQUAL notes. + (Zdenek Dvorak's fix from 3.4 branch) + +2003-04-01 Ulrich Weigand + + * config/s390/s390.c (s390_fixup_clobbered_return_reg): + Do nothing if __builtin_return_address was not used. + +2003-04-01 David Edelsohn + + * config/rs6000/rs6000.c (function_arg_pass_by_reference): + Return true for variable sized types. + (rs6000_va_arg): Handle variable sized types passed by reference + on non-SVR4 ABI. + +2003-03-31 Mark Mitchell + + PR c/9936 + * c-decl.c (grokdeclarator): Clear SAVE_EXPR_CONTEXT for + variably-sized arrays in parameters. + (set_save_expr_context): New function. + (c_expand_body): Use it, via walk_tree. + +2003-03-31 Stephane Carrez + + * config/m68hc11/m68hc11.c (hard_reg_operand): Check the mode. + +2003-03-31 Stephane Carrez + + * config/m68hc11/m68hc11.c (m68hc11_gen_movhi): Don't rely on REG_WAS_0 + notes as they are boggus. + (m68hc11_gen_movqi): Likewise. + +2003-03-31 Stephane Carrez + + * config/m68hc11/m68hc11.c (expand_prologue): For an interrupt handler + save the soft registers after the frame pointer so that gdb can unwind + the frame more easily. + (expand_epilogue): Likewise in opposite order; allow to use X register + as scratch if the return value is by reference. + +2003-03-31 Jason Merrill + + PR java/10145 + * stor-layout.c (update_alignment_for_field): Respect + DECL_USER_ALIGN for zero-length bitfields, too. + * c-decl.c (finish_struct): Don't set DECL_ALIGN for normal + fields. + +2003-03-30 Kaveh R. Ghazi + + PR other/6955 + * collect2.c (collect_wait): Use WCOREDUMP and fix output message. + * system.h (WCOREDUMP, WCOREFLG): Define if necessary. + +2003-03-30 Richard Henderson + + PR c/10083 + * config/alpha/alpha.md (umuldi3_highpart): Change to expander; + don't zero_extend const inputs. + +2003-03-29 Gerald Pfeifer + + * doc/contrib.texi: Add Eric Botcazou and Roger Sayle. + Uniformly use bugfix instead of bug fix. + +2003-03-29 Gerald Pfeifer + + PR doc/895 + * ONEWS: Remove those items that already appear in the EGCS + release notes on our web pages. + +2003-03-29 Alan Modra + + * 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: - 2002-08-01 Richard Henderson + 2003-02-28 Bob Wilson + * config.gcc (xtensa-*-linux*): Add t-slibgcc-elf-ver to tmake_file. - * integrate.c (copy_rtx_and_substitute): Squash MEM_EXPR when it - refers to a subroutine parameter. +2003-02-27 Joel Sherrill -2003-02-03 Eric Botcazou + PR 9638/other + * config/i386/i386.c (DEFAULT_PCC_STRUCT_RETURN): Ensure the + this constant defaults to 1. - PR ice-on-legal-code/9493 - * cfgcleanup.c (try_forward_edges): Check for null insn. +2003-02-28 Richard Sandiford -2003-02-03 Franz Sirl - Eric Botcazou + * config/mips/mips.md: Disable the movstrsi define_split. - PR wrong-code/9492 - Backport following patches: +2003-02-28 Richard Sandiford - 2002-09-16 Richard Henderson + * config/mips/mips.h (CRT_CALL_STATIC_FUNCTION): Wrap in + #ifndef __mips16. - * emit-rtl.c (set_mem_attributes_minus_bitpos): Adjust SIZE - as well as OFFSET for BITPOS. +2003-02-27 Geert Bosch - 2002-09-08 Jan Hubicka + * toplev.c (print_version): Add indentation for GGC heuristics and + output after printing version information. - * emit-rtl.c (set_mem_attributes_minus_bitpos): Fix array_ref - handling. +2003-02-27 James E Wilson - 2002-07-29 Richard Henderson + PR bootstrap/9255 + * combine.c (simplify_comparison): Require integral mode when + permuting SUBREG with AND. - * 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-02-27 Steve Ellcey - 2002-07-25 Richard Henderson + * config/ia64/hpux.h (STARTFILE_PREFIX_SPEC): Remove. - * emit-rtl.c (set_mem_attributes): Fix size and alignment thinkos - in ARRAY_REF of DECL_P case. +2003-02-27 Alan Modra - 2002-07-21 Richard Henderson + * config/rs6000/rs6000.md: Add TI constant splitter. - * 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-02-26 Jan Hubicka - 2002-06-03 Dan Nicolaescu + * expr.c (emit_group_store): Fix crash when converting single + register into complex register. - * alias.c (nonoverlapping_memrefs_p): Fix off by one error. +2003-02-26 Michael Matz -2003-02-03 Steve Ellcey + * ra-colorize.c (merge_moves): Fix list handling. - * config/pa/pa64-hpux.h (INIT_ENVIRONMENT): New. +2003-02-26 John David Anglin -2003-02-01 Jakub Jelinek + * 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. - PR preprocessor/9465 - * tradcpp.c (fixup_newlines): Use memchr instead of strchr. +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. - (get_last_nonnote_insn): New function. -2003-01-31 Jan Hubicka +2003-01-31 Ulrich Weigand - PR c/9506 - * i386.c (override_options): Use DEFAULT_PCC_STRUCT_RETURN. + * regclass.c (record_reg_classes): Fix incorrect argument + to EXTRA_ADDRESS_CONSTRAINT macro. -2003-01-30 Andreas Schwab +2003-01-31 Ulrich Weigand - * 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. + * 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 + 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 @@ -122,7 +3646,7 @@ 2003-01-29 Joel Sherrill PR bootstrap/9293 - * config/m68k/t-crtstuff: Replace spaces with tabs, add + * config/m68k/t-crtstuff: Replace spaces with tabs, add $(MULTILIB_CFLAGS) as compiler option and multilib crtbegin/end.o. 2003-01-29 Joel Sherrill @@ -132,18 +3656,115 @@ 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, uninstall-cpp, installdirs, install-common) + (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-collect2) - (uninstall): Prepend $(DESTDIR) to destination paths in all - (un)installation commands. + (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. @@ -153,82 +3774,215 @@ * 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/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-28 Gerald Pfeifer - Backport patches - - 2002-10-04 Loren J. Rittle +2003-01-26 Alexandre Oliva - * gcc/ginclude/stddef.h: Support the FreeBSD 5 typedef system. + * 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. - 2002-08-01 Stan Shebs - Andreas Tobler + * 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. - * 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. + * 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. -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 + * optabs.c (expand_binop) : Return xtarget if we haven't + been able to move the result to target. - * combine.c (nonzero_bits): Revert 2003-01-25 change. - (num_sign_bit_copies): Likewise. + * expr.c (emit_group_store): Initialize dst with CONST0_RTX + for the appropriate mode. -2003-01-27 Volker Reichelt + * calls.c (emit_library_call_value_1): Handle return values + in a PARALLEL. - * doc/passes.texi: Fix typo. + * rtl.c (get_mode_alignment): Moved to... + * stor-layout.c: ... here. -2003-01-25 Bruce Korb + * print-rtl.c (print_rtx): Don't print MEM details in + GENERATOR_FILEs. - * fixinc/fixfixes.c(wrap_fix): the wrapper guard must be a function - of *both* the file name and the fix name. +2003-01-26 Michael Hayes -2003-01-25 Eric Botcazou - Christian Ehrhardt - - PR optimization/9279 - - Merge from mainline: - - 2002-07-10 Roger Sayle - - PR c/2454 - * combine.c (nonzero_bits): LOAD_EXTEND_OP should only apply - to SUBREGs of MEMs. (num_sign_bit_copies): Likewise. + * 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. - PR fortran/9258 - * global.c (struct allocno): Add no_stack_reg. - (global_conflicts): Set no_stack_reg. - (find_reg): Use it. +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 -2003-01-24 John David Anglin + * loop.c (emit_prefetch_instructions): Do conversion at right place in + RTL chain. - * 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. + * 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 @@ -237,9 +3991,6 @@ regs->nip. Fix rt_sigreturn frame layout. Add support for newer kernels. - * config/rs6000/rs6000.c (rs6000_binds_local_p): New functiion. - (rs6000_encode_section_info): Use it. - 2003-01-23 Volker Reichelt PR other/7341 @@ -247,6 +3998,7 @@ Change @code to @command for gcov command. * gcc.texi: Adjust title of gcov section. + Adjust copyright. * gcov.texi: Likewise. 2003-01-23 Volker Reichelt @@ -254,36 +4006,221 @@ 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-19 Roger Sayle +2003-01-20 Richard Henderson + + PR opt/7154 + * stmt.c (expand_asm_operands): Validize memory operands. + +2003-01-20 Richard Henderson + + PR opt/8848 + * ifcvt.c (noce_process_if_block): Correct arguments to + modified_between_p for no-else-block case. + +2003-01-20 John David Anglin + + * ifcvt.c (noce_emit_store_flag): Don't emit store flag if mode of x + is not a scalar int mode. + +2003-01-20 Kazu Hirata + + * config/h8300/h8300.c (notice_update_cc): Don't assume that + recog_data.operands[0] is always associated with cc0. + +2003-01-19 Stephane Carrez + + * config/m68hc11/m68hc11.c (stack_push_word, stack_pop_word, + z_reg, z_reg_qi): Declare static and GTY(). + (da_reg): Remove. + (create_regs_rtx): Don't create da_reg. + ("gt-m68hc11.h"): Include for GTY roots. + (m68hc11_autoinc_compatible_p): Remove. + (autoinc_mode): Declare prototype. + (m68hc11_make_autoinc_notes): Likewise. + * config/m68hc11/m68hc11.h (ix_reg, iy_reg, d_reg): Declare extern + and GTY() here. + (m68hc11_compare_op0, m68hc11_compare_op1): Likewise. + (m68hc11_soft_tmp_reg): Likewise. + * config/m68hc11/m68hc11-protos.h: Remove above declarations. + +2003-01-18 Roger Sayle * config/pa/pa.md (muldi3): Avoid invalid sharing of SUBREG RTXs. -2003-01-19 John David Anglin +2003-01-10 Geoffrey Keating - * pa-linux.h (DWARF2_UNWIND_INFO, INCOMING_RETURN_ADDR_RTX, - DWARF_FRAME_RETURN_COLUMN): Delete defines. - (FUNCTION_OK_FOR_SIBCALL): Define to 1. + * varasm.c (struct constant_descriptor_rtx): Remove unused + `label' field. -2003-01-17 Jim Wilson + * ggc-page.c (ggc_collect): Avoid overflow computing + min_expand. - * dbxout.c (dbxout_fptype_value): New. - (dbxout_type, case COMPLEX_TYPE): Call it. Use 'R' instead of 'r'. +2002-12-20 Geoffrey Keating + + * integrate.c (output_inline_function): Don't hold private + pointers to 'struct function' over GC calls. + +2003-01-17 Alexandre Oliva + + * config/mips/mips.h: Don't use #elif. Reported by Kaveh + R. Ghazi. + +2003-01-16 Kaz Kojima + + * config/sh/sh.c (sh_initialize_trampoline): Emit rotrdi3_mextr + instead of rotldi3_mextr. + +2003-01-16 Stephane Carrez + + * config/m68hc11/m68hc11.c (m68hc11_check_z_replacement): Fix handling + 68HC12 pre/post inc/dec side effects. + +2003-01-16 Stephane Carrez + + * config/m68hc11/m68hc11.h (MASK_M6812): Define. + +2003-01-16 Stephane Carrez + + * config/m68hc11/m68hc11.c (expand_prologue): Use push/pop to + allocate 4-bytes of locals on 68HC11. + (expand_epilogue): Likewise. + (m68hc11_memory_move_cost): Increase cost of HI/QI soft registers. + +2003-01-15 John David Anglin + + * som.h (SUPPORTS_WEAK, SUPPORTS_ONE_ONLY, MAKE_DECL_ONE_ONLY, + ASM_WEAKEN_LABEL, GTHREAD_USE_WEAK): Define. + * pa.h (TARGET_SOM_SDEF): Define. + * pa-hpux11.h (TARGET_SOM_SDEF): Define. + +2003-01-15 Stephane Carrez + + * config/m68hc11/m68hc11.h (ASM_SPEC): Handle -m68hcs12; Pass -mshort + and -mshort-double to the assembler to specify the ABI. + (LINK_SPEC): Likewise. + (CPP_SPEC): Pass HCS12 specific define. + (MASK_M68S12): New define. + (TARGET_M68S12): Likewise. + (TARGET_SWITCHES): New options -m68hcs12 and -m68S12. + (TARGET_VERSION): Update. + * config/m68hc11/m68hc12.h (CPP_SPEC): Pass HCS12 specific define. + (LINK_SPEC): Update. + (ASM_SPEC): Update. + * config/m68hc11/m68hc11.c (m68hc11_asm_file_start): Update. + * doc/invoke.texi (M68hc1x Options): Document -m68hcs12. + +2003-01-15 John David Anglin + + * gengtype-lex.l (malloc, realloc): Move defines after include of + system.h. 2003-01-15 Stephane Carrez * config/m68hc11/m68hc11.md ("return"): Use emit_jump_insn to emit the return code. +2003-01-15 Josef Zlomek + + * cfganal.c (set_edge_can_fallthru_flag): Clear the EDGE_CAN_FALLTHRU + flag before setting it. + +2003-01-15 Josef Zlomek + + Segher Boessenkool + + * predict.c (real_inv_br_prob_base): New variable. + (propagate_freq): Use multiply by reciprocal instead of + division. Don't divide by 1.0 at all. + (estimate_bb_frequencies): Similar. + +2003-01-15 Alexandre Oliva + + * configure.in (libgcc_visibility): Force disabled on IRIX 6 too. + * configure: Rebuilt. + + * config/mips/mips.h (CRT_CALL_STATIC_FUNCTION): Define so as + to set $gp before the call. + +2003-01-10 Andrew Haley + + * config/i386/linux64.h (MD_FALLBACK_FRAME_STATE_FOR): Rename + registers to be in correct order. Add rip. + +2003-01-14 Denis Chertykov + + * config/ip2k/ip2k.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove. + (VALID_MACHINE_TYPE_ATTRIBUTE): Remove. + + * config/ip2k/ip2k.c (ip2k_attribute_table): New table of + attributes. + (TARGET_ATTRIBUTE_TABLE): New macro. + (valid_machine_type_attribute): Remove. + (valid_machine_decl_attribute): Remove. + (ip2k_handle_progmem_attribute): New function. + (ip2k_handle_fndecl_attribute): New function. + +2003-01-14 Eric Botcazou + + PR target/8870, PR target/9195 + + Backport from mainline: + + 2003-01-10 Richard Henderson + + * combine.c (make_compound_operation): Use SCALAR_INT_MODE_P, + not INTEGRAL_MODE_P when widening extensions. + +2003-01-13 Alexandre Oliva + + * aclocal.m4 (gcc_AC_PROG_GNAT): Don't try to prepend + ${ac_tool_prefix} to ADAC or CC. Protect them from word + splitting. + * configure: Rebuilt. + +2003-01-12 Kaveh R. Ghazi + + * unwind-dw2-fde.h (last_fde): Mark parameter with __attribute__ + ((__unused__)). + 2003-01-12 Alan Modra * expr.c (expand_expr ): Correct recursive call args. +2003-01-11 Jan Hubicka + + PR target/9068 + * i386.c (output_fp_compare): Fix typo + 2003-01-10 Josef Zlomek * jump.c (next_nonnote_insn_in_loop): New function. @@ -291,15 +4228,33 @@ next_nonnote_insn. (duplicate_loop_exit_test). Likewise. -2003-01-10 Josef Zlomek +2003-01-08 Jan Hubicka - * Makefile.in (optabs.o): Add dependencies on basic-block.h and - hard-reg-set.h. + PR target/8213 + * i386.c (ix86_expand_int_movcc): Fix RTL sharing problem. + +2003-01-09 Kazu Hirata + + * config/h8300/h8300.md (*extzv_1_r_h8300): Correct the insn + length. + (*extzv_1_r_h8300hs): Likewise. + (*extzv_1_r_inv_h8300): Likewise. + (*extzv_1_r_inv_h8300hs): Likewise. + +2003-01-09 Josef Zlomek + + * Makefile.in (optabs.o): Add dependency on basic-block.h. * basic-block.h (control_flow_insn_p): Fuction was exported. * cfgbuild.c (control_flow_insn_p): Fuction was made non-static. * optabs.c (emit_libcall_block): Emit REG_LIBCALL and REG_RETVAL notes only when the region is contained in a single basic block. +2003-01-09 Josef Zlomek + + * Makefile.in (PARTITION_H): New. + (BASIC_BLOCK_H): Added hard-reg-set.h and $(PARTITION_H). + * basic-block.h: Include hard-reg-set.h. + 2003-01-09 Eric Botcazou PR inline-asm/8832 @@ -320,16 +4275,67 @@ an empty element, do not advance the pointer to unfilled fields if there are pending initializers. +2003-01-09 Kaz Kojima + + * config/sh/sh.h (CASE_VECTOR_MODE): Use SImode for a + non-optimizing compile. + (ASM_OUTPUT_ADDR_VEC_ELT): Use .long for a non-optimizing + compile. + +2003-01-09 Andreas Jaeger + + * unwind-dw2-fde.h (last_fde): Revert last patch. + +2003-01-08 Danny Smith + + PR optimization/8750 + * config/i386/i386.c (ix86_expand_prologue): Don't allow + scheduling pass to move insns across __alloca call. + +2003-01-08 Jeff Sturm + + PR target/9210 + * config/rs6000/rs6000.c (rs6000_elf_encode_section_info): + Set SYMBOL_REF_FLAG on local data sym_ref. + +2003-01-08 Jan Hubicka + + PR target/8322 + * i386.c (ix86_init_mmx_sse_builtins): Constify arguments of loads. + * xmmintrin.h (_mm_load*_si128. _mm_store*_si128): Add casts. + + PR target/7782 + * reload1.c (delete_output_reload): Avoid repeated attempts + to delete insn. + + * cselib.c (cselib_current_insn_in_libcall): New static variable. + (new_elt_loc_list, cselib_process_insn, cselib_init): Keep track on whether + we are inside libcall. + * cselib.h (elt_loc_list): Add in_libcall. + * gcse.c (do_local_cprop): Do not copy propagate using insns + in libcalls. + 2003-01-07 Janis Johnson PR other/8947 * doc/invoke.texi (-malign-double): Explain that the option breaks binary compatibility. -2003-01-07 Benjamin Kosnik - Sunil Davasam +2003-01-07 Richard Henderson - PR libstdc++/9076 + * alias.c (find_base_value): Only use new_reg_base_value shortcut + if the register is set once. + +2003-01-07 Sylvain Pion + + * config/i386/i386.c (ix86_init_mmx_sse_builtins): + __builtin_ia32_ldmxcsr and __builtin_ia32_stmxcsr are SSE, not MXX. + * config/i386/i386.md (ldmxcsr, stmxcsr): SSE, not MMX. + +2003-01-07 Benjamin Kosnik + Sunil Davasam + + PR libstdc++/9076 * unwind-dw2.c (execute_cfa_program): DW_CFA_undefined, DW_CFA_same_value, read next and ignore. @@ -337,31 +4343,186 @@ * cfganal.c (flow_call_edges_add): Don't crash on noreturn call. -2003-01-01 Neil Booth +2003-01-06 Aldy Hernandez - PR preprocessor/8880 - * gcc.c (cpp_unique_options): Handle -fshort-wchar later so it - overrides any target CPU specs. + Segher Boessenkool -2002-12-28 John David Anglin + * 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. - * 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-01-06 Bruce Korb -2002-12-21 Eric Botcazou + * fixinc/fixfixes.c(wrap_fix): the wrapper guard must be a function + of *both* the file name and the fix name. - PR optimization/8599 - * doloop.c (doloop_modify_runtime): Fix loop count computation - for preconditioned unrolled loops. +2003-01-06 Richard Henderson -2002-12-21 Eric Botcazou + * 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 optimization/8599 - * doloop.c (doloop_modify_runtime): Revert 2002-11-22 change. - * loop.c (loop_invariant_p): Likewise. +2003-01-05 Andreas Jaeger + + * unwind-dw2-fde.h (last_fde): Add unused attribute for obj. + +2003-01-05 John David Anglin + + * pa64-hpux.h (JCR_SECTION_NAME): Define. + (PA_INIT_FRAME_DUMMY_ASM_OP): Check EH_FRAME_SECTION_NAME instead of + USE_EH_FRAME_REGISTRY when defining. + +2003-01-04 John David Anglin + + * config.gcc (hppa*64*-*-hpux11*): Define extra_parts. Don't use + collect2. + * pa-hpux11.h (LDD_SUFFIX, PARSE_LDD_OUTPUT): Undefine. + (HAS_INIT_SECTION, LD_INIT_SWITCH, LD_FINI_SWITCH): Define. + * pa64-hpux.h (HP_INIT_ARRAY_SECTION_ASM_OP, + GNU_INIT_ARRAY_SECTION_ASM_OP, HP_FINI_ARRAY_SECTION_ASM_OP, + GNU_FINI_ARRAY_SECTION_ASM_OP): Define. + (CTORS_SECTION_ASM_OP, DTORS_SECTION_ASM_OP): Define when not using + elfos.h. + (EH_FRAME_IN_DATA_SECTION): Delete define. + (HAS_INIT_SECTION, LD_INIT_SWITCH, LD_FINI_SWITCH): Undefine. + (STARTFILE_SPEC): Use crtbegin.o. + (ENDFILE_SPEC): Use crtend.o. + (INIT_SECTION_ASM_OP, FINI_SECTION_ASM_OP, CRT_CALL_STATIC_FUNCTION, + SUPPORTS_INIT_PRIORITY, PA_CXA_FINALIZE_STUB, PA_INIT_FINI_HACK, + PA_INIT_FRAME_DUMMY_ASM_OP, PA_JV_REGISTERCLASSES_STUB, + DTOR_LIST_BEGIN): Define. + * pa.c (TARGET_ASM_CONSTRUCTOR): Define. + (pa_asm_out_constructor, pa_asm_out_destructor): New functions. + * som.h (SUPPORTS_INIT_PRIORITY): Delete define. + +2003-01-02 Eric Christopher + + * config/mips/mips.md (movdf_internal2): Fix constraints. + +2003-01-03 Gerald Pfeifer + + * doc/install.texi (Configuration): Fix markup for reference to + gcc/config.gcc. + +2003-01-02 Kazu Hirata + + * config/h8300/h8300.c (stack_pointer_operand): New. + (const_int_gt_2_operand): Likewise. + (const_int_ge_8_operand): Likewise. + * config/h8300/h8300.md (a splitter): Likewise. + (a peephole2): Likewise. + * config/h8300/h8300-protos.h: Add prototypes for the new + functions above. + +2003-01-02 Neil Booth + + * gccbug.in: Update for new categories. + +2002-12-31 Tom Tromey + + * doc/install.texi (Testing): Fixed typo. + +2002-12-31 Jerry Quinn + + * gcc/doc/invoke.texi (Optimization Options): Clean up -O flag + descriptions. + +2002-12-31 Jerry Quinn + + * gcc/doc/invoke.texi (Optimization Options): List the options + enabled by each -O flag. + +2002-12-31 David Edelsohn + + * config/rs6000/rs6000.h (WIDEST_HARDWARE_FP_SIZE): Define. + +2002-12-31 Gerald Pfeifer + + * doc/install.texi (Configuration): Explicitly refer + gcc/config.gcc for a list of cpu models. + +2002-12-30 Joseph S. Myers + + * doc/gcc.texi, doc/gccint.texi: Update last modification dates. + +2002-12-30 Tom Tromey + + * doc/install.texi (Testing): Mention Jacks. + +2002-12-30 Joseph S. Myers + + * doc/service.texi: Uncomment and update FAQ link. + +2002-12-28 Joseph S. Myers + + * doc/cpp.texi, doc/gcc.texi, doc/gccint.texi, doc/install.texi: + Use @copying. + +2002-12-28 Joseph S. Myers + + * configure.in: Increase makeinfo version requirement to 4.[2-9]. + * configure: Regenerate. + * doc/install.texi: Update Texinfo version requirement. + +2002-12-27 Joseph S. Myers + + * doc/include/texinfo.tex: Update to version 2002-12-26.16. + +2002-12-26 Joseph S. Myers + + * doc/standards.texi, doc/invoke.texi: Point to 3.3 version of + c99status.html. + +2002-12-26 Kazu Hirata + + * config/h8300/h8300.h (IDENT_ASM_OP): End with a tab. + +2002-12-23 Larin Hennessy + + * doc/install.texi: Remove i386-*-isc, i860-*-bsd, + m68k-altos-sysv, m68k-isi-bsd, m68k-sony-bsd entries. + * doc/invoke.texi: Remove AMD 29K, ARM RISC/iX, Clipper, Convex, + DG/UX entries. + * doc/md.texi: Remove AMD 29K entries. + * doc/trouble.texi: Remove Alliant, DG/UX, Iris 4.0.5F, GAS + 1.38.1, NewsOS, RT PC, WE32K entries. + +2002-12-23 Aldy Hernandez + + PR/8763 + * config/rs6000/altivec.md (mulv4sf3): Rewrite to add -0.0 vector. + (altivec_vspltisw_v4sf): Name pattern. + (altivec_vslw_v4sf): New pattern. + +2002-12-23 Joseph S. Myers + + * doc/include/gcc-common.texi: Clear DEVELOPMENT. + +2002-12-23 David Edelsohn + + PR middle-end/8784 + * expr.c (expand_assignment): Apply special treatment to + ARRAY_TYPE. + +2002-12-21 Kazu Hirata + + * config/h8300/h8300.md (zero_extendqisi2): Correct the + length. + +2002-12-19 Devang Patel + + * config/darwin.h (TARGET_OPTION_TRANSLATE_TABLE): Add support for -dynamic. + (CPP_SPEC): Define __STATIC__ and __DYNAMIC__ depending on -dynamic. + (LINK_SPEC): Pass -dynamic to linker. + * config/rs6000/darwin.h: Reject conflicting -static and -dynamic. + +2002-12-19 Kazu Hirata + + * config/h8300/h8300.md (pushqi_h8300): Don't push the stack + pointer. + (pushqi_h8300hs): Likewise. + (pushhi_h8300): Likewise. + (pushhi_h8300hs): Likewise. 2002-12-19 Eric Botcazou @@ -369,13 +4530,186 @@ * loop.c (maybe_eliminate_biv): Kill REG_EQUAL notes mentioning the biv when eliminating. -2002-12-17 Jakub Jelinek +2002-12-19 Aldy Hernandez - 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. + PR 8553 + * config/rs6000/altivec.md ("absv8hi2"): Add & to clobbered + registers. + ("absv16qi2"): Same. + ("absv4si2"): Same. + ("absv4sf2"): Same. + ("altivec_abss_v16qi"): Same. + ("altivec_abss_v8hi"): Same. + ("altivec_abss_v4si"): Same. -2002-12-12 John David Anglin +2002-12-19 Ulrich Weigand + + * config/s390/s390.md ("*tsthiCCT", "*tsthiCCT_cconly", + "*tstqiCCT", "*tstqiCCT_cconly"): New insns. + +2002-12-18 Aldy Hernandez + + * config/rs6000/altivec.h (vec_cmplt macro): Reverse arguments in + macro. + (vec_cmplt C++ functions): Reverse arguments. + +2002-12-17 Kazu Hirata + + * doc/c-tree.texi: Restore deliberate spelling mistakes. + +2002-12-17 Kazu Hirata + + * doc/c-tree.texi: Fix typos and follow spelling conventions. + * doc/cpp.texi: Likewise. + * doc/extend.texi: Likewise. + * doc/gty.texi: Likewise. + * doc/install.texi: Likewise. + * doc/invoke.texi: Likewise. + * doc/md.texi: Likewise. + * doc/passes.texi: Likewise. + * doc/rtl.texi: Likewise. + * doc/sourcebuild.texi: Likewise. + * doc/tm.texi: Likewise. + +2002-12-17 Jerry Quinn + + * doc/invoke.texi: Minor spelling and grammar fixes. + +2002-12-16 Mark Mitchell + + * version.c (version_string): Mark as prerelease. + +2002-12-13 John David Anglin + + * pa.c (output_millicode_call): Correct typo. + (output_call): Likewise. + +2002-12-13 Alexandre Oliva + + * config/mn10300/mn10300.c (print_operand) : Check + operand's range. Print value directly, without aid from + output_address. + : New. + : Make sure argument to fprintf has the right type. + * config/mn10300/mn10300.h (OK_FOR_T): New macro. + (EXTRA_CONSTRAINT): Adjust. + * config/mn10300/mn10300.md: Add new all-QImode pattern for + bclr. Use %U for immediate operands of bset and bclr. + (iorqi3): New expand, with insns for AM33 and mn10300. + +2002-12-13 J"orn Rennecke + + * sh.c (sh_register_operand): New function. + (prepare_move_operands): Use it. + * sh.h (PREDICATE_CODES): Add entry for sh_register_operand. + * sh.md (movsi_media, movsi_media_nofpu): Allow stores of 0. + (movqi_media, movhi_media, movdi_media, movdi_media_nofpu): Likewise. + (movdf_media, movdf_media_nofpu, movv4sf_i, movsf_media): Likewise. + (movsf_media_nofpu, movv2hi_i, movv4hi_i, movv8qi_i): Likewise. + (movv2si_i): Likewise. + +2002-12-13 Jim Wilson + + * doc/extend.texi (Complex Numbers): Update info on debug info. + +2002-12-13 Kazu Hirata + + * config/h8300/h8300.md (addhi3_h8300): Remove the last + alternative. + +2002-12-12 Devang Patel + + * doc/invoke.texi: Document Darwin linker options, -bundle + -bind_at_load, -all_load and -arch_errors_fatal + +2002-12-12 Jim Wilson + + * dbxout.c (dbxout_fptype_value): New. + (dbxout_type, case COMPLEX_TYPE): Call it. Use 'R' instead of 'r'. + +2002-12-12 Kazu Hirata + + * c-decl.c: Fix a comment typo. + * cfg.c: Likewise. + * cfgcleanup.c: Likewise. + * cfglayout.c: Likewise. + * cfgrtl.c: Likewise. + * c-typeck.c: Likewise. + * dominance.c: Likewise. + * dwarf2asm.c: Likewise. + * dwarfout.c: Likewise. + * expmed.c: Likewise. + * expr.c: Likewise. + * final.c: Likewise. + * flow.c: Likewise. + * function.c: Likewise. + * gcc.c: Likewise. + * genautomata.c: Likewise. + * integrate.c: Likewise. + * loop.c: Likewise. + * loop.h: Likewise. + * output.h: Likewise. + * profile.c: Likewise. + * ra.h: Likewise. + * reload1.c: Likewise. + * reload.c: Likewise. + * sched-rgn.c: Likewise. + * stmt.c: Likewise. + * tree.h: Likewise. + * vmsdbgout.c: Likewise. + +2002-12-12 Kazu Hirata + + * config/h8300/h8300.md: Add a new peephole2. + +2002-12-12 Kazu Hirata + + * config/h8300/h8300.md (a peephole2): Accept a constant + that's accepted by CONST_OK_FOR_J. + +2002-12-12 Kazu Hirata + + * config/h8300/h8300.h (CONST_OK_FOR_J): New. + (CONST_OK_FOR_LETTER_P): Use CONST_OK_FOR_J. + * config/h8300/h8300.md (*addhi_h8300): Add a new alternative. + (*addhi_h8300hs): Likewise. + +2002-12-12 J"orn Rennecke + + * sh.c (reg_class_from_letter): No longer const. Add 'e' entry. + (sh_register_move_cost): Add clause for SImode fp-fp moves. + Increase cost for moves involving multiple general purpose registers. + * sh.h (OVERRIDE_OPTIONS): Set reg_class_from_letter['e'] according to + TARGET_FMOVD. + (HARD_REGNO_MODE_OK): Allow V2SFmode and V4SFmode in general purpose + registers, and SImode in fp registers, for ! TARGET_SHMEDIA. + (enum reg_class reg_class_from_letter): No longer const. + (SECONDARY_OUTPUT_RELOAD_CLASS): Use REGCLASS_HAS_FP_REG / + REGCLASS_HAS_GENERAL_REG. + Handle SImode moves from/to fp registers. + ! TARGET_SHMEDIA && TARGET_FMOVD. + (SECONDARY_INPUT_RELOAD_CLASS): Use REGCLASS_HAS_FP_REG. + * sh.md (movsi_ie): Add alternatives to move from / to fp regisyters. + +2002-12-12 Andreas Schwab + + * config/ia64/ia64.c (ia64_hpux_asm_file_end): Fix typo in last + change and some warnings. + +2002-12-12 Kazu Hirata + + * doc/md.texi (pushm): Fix a typo. + +2002-12-12 Alexandre Oliva + + * config/mips/mips.c (mips_output_conditional_branch): Support + PIC-safe out-of-range branch and branch-likely. + * config/mips/mips.md (attr length): PIC-safe out-of-range + branches are longer. + ("jump"): Support PIC-safe out-of-range-for-branch jumps. Remove + unused code to support indirect jumps. + +2002-12-11 John David Anglin * pa.h (BIGGEST_ALIGNMENT): Change 32-bit value to 64 bits. (MAX_PARM_BOUNDARY, STACK_BOUNDARY): Express in terms of @@ -383,11 +4717,201 @@ (PREFERRED_STACK_BOUNDARY): Express in terms of STACK_BOUNDARY. (FUNCTION_BOUNDARY): Express in terms of BITS_PER_WORD. +2002-12-11 Kazu Hirata + + * doc/invoke.texi: Correct dump file names. + +2002-12-09 Steve Ellcey + + * config/ia64/ia64.c (ia64_hpux_asm_file_end): Don't send stripped + name to globalize_label or assemble_name. + +2002-12-11 J"orn Rennecke + + * sh.h (REG_CLASS_HAS_GENERAL_REG): Only true for SIBCALL_REGS + if not TARGET_SHMEDIA. + +2002-12-11 J"orn Rennecke + + * sh.h (REG_CLASS_HAS_FP_REG): New. + (REGISTER_MOVE_COST) Use it. Put body into a function and + move it into: + * sh.c (sh_register_move_cost). + * sh-protos.h (sh_register_move_cost): Declare. + + * sh.c (sh_expand_builtin): Abort for unexpected nop values. + (sh_adjust_cost): Always return a value. + +2002-12-11 J"orn Rennecke + + * sh.h (REG_CLASS_HAS_GENERAL_REG): New. + (REGISTER_MOVE_COST): Use it. + +2002-12-11 Richard Henderson + + * tree.h (MODULE_LOCAL_P): Kill. + * varasm.c (default_binds_local_p_1): Use decl_visibility instead. + +2002-12-11 Kazu Hirata + + * config/h8300/h8300.md (two define_peephole2): New. + +2002-12-11 Kazu Hirata + + * config/h8300/h8300.h (CONST_OK_FOR_J): Remove. + (CONST_OK_FOR_K): Likewise. + (CONST_OK_FOR_M): Likewise. + (CONST_OK_FOR_LETTER_P): Do not use the above macros. + +2002-12-11 Neil Booth + + * c-common.c (builtin_define_type_max): Handle unsigned + types too. + 2002-12-10 Janis Johnson PR other/8882 * doc/tm.texi (PUSH_ARGS): Remove misplaced line. +2002-12-10 Devang Patel + + * config/darwin.h(LINK_SPEC): Add darwin specific linker options. + * doc/invoke.texi: Add new "Darwin Options" section. + +2002-12-10 Jim Wilson + + * rs6000.h (RETURN_IN_MEMORY): If ABI_V4, then TFmode is returned in + memory. + +2002-12-10 Andrew Haley + + * cse.c (cse_insn): Don't cse past a basic block boundary. + +2002-12-10 Jakub Jelinek + + * config/linux.h (LIB_SPEC): If -pthread, add -lpthread even if + -shared. + * config/alpha/linux-elf.h (LIB_SPEC): Likewise. + * config/alpha/linux.h (LIB_SPEC): Likewise. + * config/arm/linux-elf.h (LIB_SPEC): Likewise. + * config/pa/pa-linux.h (LIB_SPEC): Likewise. + * config/sparc/linux.h (LIB_SPEC): Likewise. + * config/sparc/linux64.h (LIB_SPEC): Likewise. + +2002-12-09 Larin Hennessy + + * doc/invoke.texi: Document UltraSparc III option. + +2002-12-09 Richard Henderson + + * config/i386/i386.h (TARGET_CPU_CPP_BUILTINS): Define + __tune_pentium2__ and __tune_pentium3__ as necessary. + +2002-12-09 Richard Henderson + + * target.h (gcc_target): Add cannot_force_const_mem. + * target-def.h (TARGET_CANNOT_FORCE_CONST_MEM): New. + (TARGET_INITIALIZER): Add it. + * varasm.c (force_const_mem): Fail if cannot_force_const_mem. + * expr.c (emit_move_insn): Be prepared for force_const_mem to fail. + * reload1.c (reload): Likewise. + * hooks.c (hook_bool_rtx_false): New. + * hooks.h: Declare it. + + * config/i386/i386.c (ix86_cannot_force_const_mem): New. + (TARGET_CANNOT_FORCE_CONST_MEM): New. + (ix86_expand_move): Remove de-const-pooling hack. + +2002-12-09 Jan Hubicka + + * toplev.c (dump_file): Fix order to match reality. + +2002-12-08 Geoffrey Keating + + * config/rs6000/rs6000.md (load_multiple): Use adjust_address_nv. + (store_multiple): Likewise. + +2002-12-09 John David Anglin + + * pa/fptr.c (__canonicalize_funcptr_for_compare): Don't canonicalize + function pointers in page 0. + +2002-12-09 Steve Ellcey + + * config/ia64/hpux.h (TARGET_STRUCT_ARG_REG_LITTLE_ENDIAN): Remove + definition + (MEMBER_TYPE_FORCES_BLK): Move. + * config/ia64/ia64.c (ia64_function_arg): Use PARALLEL to pass + aggregate arguments. + (ia64_function_value): Use PARALLEL to return aggregate values. + +2002-12-09 Steve Ellcey + + * doc/tm.texi (FUNCTION_ARG_REG_LITTLE_ENDIAN): Remove definition. + * defaults.h (FUNCTION_ARG_REG_LITTLE_ENDIAN): Remove definition. + * calls.c (store_unaligned_arguments_into_pseudos) Remove + FUNCTION_ARG_REG_LITTLE_ENDIAN. + * stmt.c (expand_return): Ditto. + * expr.c (move_block_from_reg): Ditto. + (copy_blkmode_from_reg): Ditto. + * expmed.c (store_bit_field): Ditto. + +2002-12-09 Svein E. Seldal + + * config.gcc: Added tic4x-* target as an alias to c4x-* + +2002-12-08 Jan Hubicka + + * i386.c (ix86_expand_int_movcc): Use force_operand instead of + constructing insn directly. + +2002-12-07 Kazu Hirata + + * config/h8300/h8300.md (*iorhi_shift_8): New. + +2002-12-06 Bernd Schmidt + + * doc/invoke.texi: Document FRV port options. + * doc/md.texi: Document FRV register classes. + +2002-12-07 Gerald Pfeifer + + * doc/install.texi (Configuration): Improve description of cases + where `make distclean` may fail; clarify --with-gnu-as; fix grammar. + +2002-12-06 Dhananjay Deshpande + + * gcc/config/sh/sh.c (calc_live_regs): Save fpscr only if target has + FPU. + (push): Generate push_fpscr. + (pop): Generate pop_fpscr. + * gcc/config/sh/sh.md : Add define_expand "push_fpscr", "pop_fpscr". + (fpu_switch): Add alternative to push fpscr. Enable for TARGET_SH3E. + +2002-12-06 J"orn Rennecke + + * sh.c (dump_table): DImode pool constants need only 32 bit alignment. + DFmode alignment depends on TARGET_FMOVD && TARGET_ALIGN_DOUBLE. + +2002-12-06 J"orn Rennecke + + * sh.md (movdi_i): Name. Remove inappropriate comment. + +2002-12-06 J"orn Rennecke + Merged from basic improvements branch (excerpt): + + 2002-11-19 Kaz Kojima + * config/sh/sh.h (SH_DBX_REGISTER_NUMBER): Handle PR_MEDIA_REG. + +2002-12-06 Jakub Jelinek + + * expr.c (expand_expr) : Never modify exp in place. + +2002-12-05 John David Anglin + + * pa32-linux.h (CANONICALIZE_FUNCPTR_FOR_COMPARE_LIBCALL): Move define. + * pa.h (CANONICALIZE_FUNCPTR_FOR_COMPARE_LIBCALL): To here. + 2002-12-05 Dale Johannesen * tree.c (unsafe_for_reeval): Consider callee child of CALL_EXPR. @@ -398,14 +4922,76 @@ PROFILE_HOOK. * config/i386/mingw32.h (SUBTARGET_PROLOGUE): Don't undef. -2002-12-05 Nick Clifton +2002-12-05 Aldy Hernandez - * config/fr30/fr30.h (GO_IF_LEGITIMATE_ADDRESS): Check for frame - pointer and arg pointer by examining the register number. + * config/rs6000/spe.h (__ev_mwlufi): Remove. + (__ev_mwlufia): Remove. + (__ev_mwlumfaaw): Remove. + (__ev_mwlusfaaw): Remove. + (__ev_mwlumfanw): Remove. + (__ev_mwlusfanw): Remove. -2002-12-05 Matthias Klose +2002-12-05 Kazu Hirata - * doc/invoke.texi: Remove last reference to -a. + * config/h8300/h8300.md (*andorsi3_shift_8): New. + +2002-12-05 Kazu Hirata + + * config/h8300/h8300.c (shift_alg_si): Optimize ashift:HI and + lshiftrt:SI by 28, 29, and 30 bits when !TARGET_H8300. + (get_shift_alg): Return optimal assembly instructions for the + shifts mentioned above. + +2002-12-04 Kazu Hirata + + * config/h8300/h8300.c (h8300_init_once): Do not use loop to + implement ashiftrt:HI by 13 bits on H8S. + +2002-12-04 John David Anglin + + * pa/fptr.c (__canonicalize_funcptr_for_compare): New file and function. + * pa.md (canonicalize_funcptr_for_compare): Output library call to + canonicalize_funcptr_for_compare_libfunc on TARGET_ELF32. + * pa32-linux.h (CANONICALIZE_FUNCPTR_FOR_COMPARE_LIBCALL, + CTOR_LIST_BEGIN): New defines. + * pa/t-linux (LIB2FUNCS_EXTRA): New define. + (fptr.c): Add make rules. + +2002-12-04 Geoffrey Keating + + * combine.c (combine_simplify_rtx): Add new canonicalizations. + * doc/md.texi (Insn Canonicalizations): Document new + canonicalizations for multiply/add combinations. + * config/rs6000/rs6000.md: Add and modify floating add/multiply + patterns to ensure they're used whenever they can be. + +2002-12-04 Kazu Hirata + + * config/h8300/h8300.c: Update the comments related to shifts. + +2002-12-04 Chris Demetriou + + * config/mips/mips.md (get_fnaddr): Correct length attribute. + +2002-12-04 Kazu Hirata + + * config/h8300/h8300.md (*extzv_8_8): New. + (*extzv_8_16): Likewise. + +2002-12-04 Jason Merrill + + PR c++/8461, c++/8625 + * integrate.c (copy_decl_for_inlining): Handle explicit invisible + references. + * tree-inline.c (initialize_inlined_parameters): Likewise. + + * tree.c (variably_modified_type_p): Just return an error_mark_node. + +2002-12-04 Chris Demetriou + + * config/mips/mips.md (get_fnaddr): Avoid placing an "la" + macro instruction in a branch delay slot, to avoid assembler + warnings. 2002-12-04 Eric Botcazou @@ -413,22 +4999,115 @@ * c-semantics (genrtl_scope_stmt): Do not output inlined nested functions that contain no code. -2002-12-04 Jakub Jelinek +2002-12-04 Jan Hubicka - * fold-const.c (associate_trees): Only optimize NEGATE_EXPR in one - of the operands into MINUS_EXPR if code is PLUS_EXPR. + * cfgrtl.c (force_nonfallthru_and_redirect): Allow abnormal edge + to be forced into nonfallthru. + +2002-12-03 Jason Thorpe + + * config/t-netbsd (USER_H): Set to $(EXTRA_HEADERS). + +2002-12-03 Aldy Hernandez + + * config/rs6000/spe.md (*movv1di_const0): New pattern. + +2002-12-03 Richard Henderson + + * libgcc-std.ver: Inherit GCC_3.3 from GCC_3.0. + +2002-12-03 Hans-Peter Nilsson + + * bitmap.c (bitmap_ior_and_compl, bitmap_union_of_diff): + Initialize tmp.using_obstack to 0. + +2002-12-03 Andreas Schwab + + * config/m68k/m68k.h (EH_RETURN_DATA_REGNO): Define. + (EH_RETURN_STACKADJ_RTX): Define. + (EH_RETURN_HANDLER_RTX): Define. + (ASM_PREFERRED_EH_DATA_FORMAT): Define. + * config/m68k/m68k.c (m68k_save_reg): New function. Handle eh + registers and don't save fixed registers. + (m68k_output_function_prologue): Use it. + (use_return_insn): Likewise. + (m68k_output_function_epilogue): Likewise. + +2002-12-03 Kazu Hirata + + * config/h8300/h8300.c (single_one_operand): Fix a warning. + (single_zero_operand): Likewise. + +2002-12-02 Kazu Hirata + + * config/h8300/h8300.c (dosize): Replace argument op with + sign. + (h8300_output_function_prologue): Update the call to dosize. + (h8300_output_function_epilogue): Likewise. 2002-12-02 Bob Wilson - * config/xtensa/xtensa.c (xtensa_emit_call): Use a static buffer. - * config/xtensa/xtensa.h (MAX_WCHAR_TYPE_SIZE): Delete. + * config/xtensa/xtensa.h: Delete ifndefs with nothing inside them. + +2002-12-02 Craig Rodrigues + + * configure.in: Use "missing" script to generate warning if + flex or bison programs not found, instead of invoking "false". + * configure: Rebuilt. + +2002-12-02 Jan Hubicka + + * unroll.c (copy_loop_body): Copy CONST_OR_PURE_CALL_P. + +2002-12-02 Jan Hubicka + + * i386.c (ix86_expand_int_movcc): Avoid overflow. + +2002-12-02 Kazu Hirata + + * config/h8300/h8300.c (dosize): Output r7/er7 instead of sp. + (push): Likewise. + (pop): Likewise. + (h8300_output_function_prologue): Likewise. + (h8300_output_function_epilogue): Likewise. + +2002-12-02 J"orn Rennecke + + * expmed.c (store_bit_field): Use int_mode_for_mode to find + corresponding mode of non-integer mode, unless it is VOIDmode. + +2002-12-02 Kazu Hirata + + * config/h8300/h8300.md (stm_h8300s_2): New. + (stm_h8300s_3): Likewise. + (stm_h8300s_4): Likewise. + (five define_peephole2): Likewise. + +2002-12-02 Kazu Hirata + + * ra-build.c: Fix a comment typo. + +2002-12-01 Kazu Hirata + + * config/h8300/h8300.c (h8300_output_function_prologue): + Remove variable idx. + (h8300_output_function_epilogue): Likewise. + +2002-12-01 Zack Weinberg + + * config/frv/xm-frv.h: Delete, unnecessary. + +2002-12-01 Kazu Hirata + + * config/h8300/h8300.md: Add comments for define_peephole2. 2002-12-01 Mark Mitchell * builtin-types.def (BT_SIZE): Use size_type_node. * builtins.c (fold_builtin): Make the builtin strlen returns a size_t, not a sizetype. - * c-common.c (c_alignof): Use size_type_node, not c_size_type_node. + * 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. @@ -436,23 +5115,364 @@ * c-format.c (T_ST): Use size_type_node, not c_size_type_node. * tree.h (TI_SIZE_TYPE): New enumeral. (size_type_node): Likewise. - -2002-11-26 Neil Booth - PR preprocessor/8524 - * cpplib.c (run_directive): Remove previous kludge to _Pragma. - Add a new one in its place, which hopefully works. - (skip_rest_of_line): Change test for bottom-of-context-stack. +2002-11-30 John David Anglin -2002-11-26 David Edelsohn + * cfg.c (dump_flow_info): Use max_reg_num () to determine the largest + pseudo register number plus 1. - * 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. +2002-11-29 Hans-Peter Nilsson - PR 8362 - * config/rs6000/rs6000.c (rs6000_outout_load_multiple): New function. - * config/rs6000/rs6000.md (ldmsi[3-8]): New patterns. + * cpplib.c (_cpp_test_assertion): Default *value to 0. + + * cppexp.c (num_part_mul): Initialize result.unsignedp, to 1. + +2002-11-29 Ulrich Weigand + + * config/s390/t-crtstuff: New target makefile fragment. + * config.gcc [s390-*-linux, s390x-*-linux]: Use it. + +2002-11-29 Kazu Hirata + + * config/h8300/h8300.md (movsi_h8300hs): Change the order of + alternatives to correct the length when the memory operand is + either pre_dec or post_inc. + +2002-11-29 Kazu Hirata + + * config/h8300/h8300.md (an anonymous pattern): Give an + internal name *tst_extzv_bitqi_1_n. + Accept bit_operand instead of bit_memory_operand. + Do not accept bit tests with the MSB. + (*tst_extzv_memqi_1_n): New. + +2002-11-28 Kazu Hirata + + * config/h8300/h8300.c (h8300_eightbit_constant_address_p): + Fix a comment typo. + (h8300_tiny_constant_address_p): Likewise. + +2002-11-28 Michael Matz + + * doc/passes.texi: Mention the other register allocator. + +2002-11-28 Kazu Hirata + + * config/h8300/h8300.md (6 new peephole2 patterns): New. + +2002-11-28 Jakub Jelinek + + * config.gcc (x86_64-*-linux*) [tmake_file]: Remove i386/t-crtstuff. + * config/t-linux (CRTSTUFF_T_CFLAGS_S): Add $(CRTSTUFF_T_CFLAGS). + * config/i386/t-linux64 (CRTSTUFF_T_CFLAGS): Define. + +2002-11-28 Kazu Hirata + + * config/h8300/h8300.c (h8300_and_costs): New. + * config/h8300/h8300.h (RTX_COSTS): Use h8300_and_costs. + * config/h8300/h8300-protos.h: Add a prototype for + h8300_and_costs. + +2002-11-27 Zack Weinberg + + * config/rs6000/rs6000.c (altivec_init_builtins): Make the + pointer argument in the prototypes of the following builtins + be (const TYPE *) rather than (TYPE *): + + __builtin_altivec_ld_internal_4sf + + __builtin_altivec_ld_internal_4si + + __builtin_altivec_ld_internal_8hi + + __builtin_altivec_ld_internal_16qi + + __builtin_altivec_lvsl + + __builtin_altivec_lvsr + + __builtin_altivec_lvebx + + __builtin_altivec_lvehx + + __builtin_altivec_lvewx + + __builtin_altivec_lvxl + + __builtin_altivec_lvx + + __builtin_altivec_dst + + __builtin_altivec_dstt + + __builtin_altivec_dstst + + __builtin_altivec_dststt + +2002-11-27 Kaveh R. Ghazi + + * except.c (default_exception_section): Move variable into the + scope where it is used. + +2002-11-27 Krister Walfridsson + + * config.gcc (*-*-netbsd[2-9]*, *-*-netbsdelf[2-9]*): Test for + correct version. + +2002-11-27 Kazu Hirata + + * config/h8300/h8300.h (OK_FOR_U): Remove extra parentheses. + +2002-11-27 Kazu Hirata + + * config/h8300/h8300.c (h8300_shift_costs): New. + * config/h8300/h8300.h (RTX_COSTS): Use h8300_shift_costs. + * config/h8300/h8300-protos.h: Add a prototype for + h8300_shift_costs. + +2002-11-27 Jim Wilson + + * config/rs6000/spe.md (spu_evsplatfi, spu_evsplati): Swap operands + in output template. + +2002-11-27 Casper S. Hornstrup + + * config/i386/i386.h (DLL_IMPORT_EXPORT_PREFIX): Define. + * config/i386/winnt.c (i386_pe_dllexport_name_p): Use + DLL_IMPORT_EXPORT_PREFIX, not '@'. + (i386_pe_dllimport_name_p): Likewise. + (i386_pe_mark_dllexport): Likewise. + (i386_pe_mark_dllimport): Likewise. + (i386_pe_encode_section_info): Likewise. + (i386_pe_strip_name_encoding): Likewise. + +2002-11-27 Richard Henderson + + * mkmap-symver.awk (BEGIN): Set sawsymbol false. + (nm && NF == 3): Set sawsymbol true. + (END): Exit if no symbols seen. + (output): Fix map syntax error if no globals for the version. + +2002-11-27 Jan Hubicka + + * builtins.def (DEF_C99_BUILTIN): Fix. + +2002-11-26 Andrew Haley + + * unwind-sjlj.c (_Unwind_FindEnclosingFunction): Rename + from_Unwind_Find_Enclosing_Function. + * unwind-dw2.c (_Unwind_FindEnclosingFunction): Likewise. + * config/ia64/unwind-ia64.c (_Unwind_FindEnclosingFunction): Likewise. + * libgcc-std.ver (_Unwind_FindEnclosingFunction): Rename from + _Unwind_Find_Enclosing_Function, export @@GCC_3.3. + * unwind.h (_Unwind_FindEnclosingFunction): Add. + +2002-11-26 Hartmut Penner + + * config/s390/s390.c (390_output_constant_pool): Set alignment + before label in 64 bit mode, behind otherwise. + +2002-11-26 Richard Henderson + + * c-common.c (handle_visibility_attribute): Accept "default". + * tree.h (enum symbol_visibility): New. + (decl_visibility): Declare. + * target.h (gcc_target.visibility): Take visibility arg as integer. + * varasm.c (default_assemble_visibility): Likewise. + (decl_visibility): New. + (maybe_assemble_visibility): Use it. + * output.h (default_assemble_visibility): Update prototype. + * config/rs6000/rs6000.c (rs6000_assemble_visibility): Take + visibility arg as integer. + * doc/extend.texi: Document default visibility. + +2002-11-26 Kazu Hirata + + * config/h8300/h8300.c: Adjust spacing. + * config/h8300/h8300.h: Likewise. + +2002-11-26 Richard Henderson + + * hooks.c (hook_bool_void_false, hook_void_tree_int, + hook_void_FILEptr_constcharptr): Rename so that the return + type is first. + (hook_int_tree_tree_1, hook_void_tree, hook_void_tree_treeptr, + hook_bool_tree_false): New. + * hooks.h: Update. + * langhooks-def.h: Update for renames. + * target-def.h: Likewise. + * tree.c (default_comp_type_attributes, + default_set_default_type_attributes, default_insert_attributes, + default_function_attribute_inlinable_p, + default_ms_bitfield_layout_p): Remove. + * tree.h: Update. + +2002-11-26 John David Anglin + + * pa-protos.h (function_value): New prototype. + * pa.c (function_value): Use a PARALLEL to return small aggregates on + TARGET_64BIT. + * pa.h (FUNCTION_VALUE): Use function_value. + * pa.md (call_value_internal_symref, call_value_internal_reg_64bit, + call_value_internal_reg, sibcall_value_internal_symref, + sibcall_value_internal_symref_64bit): Remove =rf constraint on return + value. + +2002-11-26 John David Anglin + + * expr.c (gen_group_rtx, emit_group_move): New functions. + * expr.h (gen_group_rtx, emit_group_move): Prototype. + * function.c (expand_function_start): Use gen_group_rtx to create a + PARALLEL rtx to hold the return value when the real return rtx is a + PARALLEL. + (expand_function_end): Use emit_group_move to move the return value + from a PARALLEL to the real return registers. + * rtl.h (REG_FUNCTION_VALUE_P): Allow function values to be returned + in PARALLELs. + +2002-11-26 Jason Thorpe + + * config/t-libc-ok: Fix typo. + +2002-11-26 Jakub Jelinek + + * configure.in: Move AC_CANONICAL_SYSTEM and AC_ARG_PROGRAM back + before AC_PROG_CC. + * configure: Rebuilt. + +2002-11-26 Nathan Sidwell + + * c-decl.c: (start_struct): Commonize flag setting. + +2002-11-26 Jason Thorpe + + * config/rs6000/rs6000.h (RS6000_CPU_CPP_ENDIAN_BUILTINS): New. + * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Use + RS6000_CPU_CPP_ENDIAN_BUILTINS. + * config/rs6000/netbsd.h (RS6000_CPU_CPP_ENDIAN_BUILTINS): Redefine. + +2002-11-26 Hartmut Penner + + * config/s390/s390.md (literal_pool_64, literal_pool_31 ): New + insns. + * config/s390/s390.c (struct machine_function): Introduction of + struct machine_function. + (s390_output_symbolic_const): Use of cfun. + (s390_optimize_prolog): Likewise. + (s390_fixup_clobbered_return_reg): Likewise. + (s390_frame_info): Likewise. + (s390_emit_prologue, s390_emit_epilogue): Likewise. + (s390_init_machine_status): New function. + (override_options): call s390_init_machine_status. + * config/s390/s390-protos.h (s390_output_constant_pool): Changed + prototype. + +2002-11-26 Jakub Jelinek + + * varasm.c (output_constant_pool): For pool constants in mergeable + section ensure each constant is padded to multiple of entity size. + +2002-11-26 Jakub Jelinek + + * varasm.c (default_exception_section): Move to... + * except.c (default_exception_section): ... here. Make + .gcc_except_table read-only if it is not expected to have any + dynamic relocations and linker handles it. + * dwarf2out.c (default_eh_frame_section): Make .eh_frame read-only + if it is not expected to have any dynamic relocations and linker + handles it. + * configure.in (HAVE_LD_RO_RW_SECTION_MIXING): Check what ld does + when linking read-only and read-write sections together. + * configure, config.in: Rebuilt. + * crtstuff.c (EH_FRAME_SECTION_CONST): Define. + (__EH_FRAME_BEGIN__, __FRAME_END__): Add it. + +2002-11-25 Aldy Hernandez + + * config/rs6000/spe.h (__ev_create_sfix32_fs): Change macro into + new function. + (__ev_create_ufix32_fs): Same. + (__ev_get_sfix32_fs_internal): New. + (__ev_get_sfix32_fs): Define to use function. + (__ev_get_ufix32_fs_internal): New. + (__ev_get_ufix32_fs): Define to use function. + (__ev_get_upper_ufix32_fs): Call __ev_get_ufix32_fs. + (__ev_get_lower_ufix32_fs): Same. + (__ev_get_upper_sfix32_fs): Call __ev_get_sfix32_fs. + (__ev_get_lower_sfix32_fs): Same. + (__ev_set_sfix32_fs_internal): New. + (__ev_set_ufix32_fs_internal): New. + (__ev_set_sfix32_fs): Call __ev_set_sfix32_fs_internal. + (__ev_set_ufix32_fs): Call __ev_set_ufix32_fs_internal. + (__ev_set_upper_sfix32_fs): Call function. + (__ev_set_lower_sfix32_fs): Same. + (__ev_set_upper_ufix32_fs): Same. + (__ev_set_lower_ufix32_fs): Same. + +2002-11-25 Douglas B Rupp + + * gcc.c (do_spec_1): Reset delete_this_arg to zero. + +2002-11-25 Jason Thorpe + + * config/elfos.h (HANDLE_SYSV_PRAGMA): Define as 1. + * config/interix.h (HANDLE_SYSV_PRAGMA): Likewise. + * config/linux-aout.h (HANDLE_SYSV_PRAGMA): Likewise. + * config/lynx-ng.h (HANDLE_SYSV_PRAGMA): Likewise. + * config/lynx.h (HANDLE_SYSV_PRAGMA): Likewise. + * config/netbsd.h (HANDLE_SYSV_PRAGMA): Likewise. + * config/openbsd.h (HANDLE_SYSV_PRAGMA: Likewise. + * config/alpha/elf.h (HANDLE_SYSV_PRAGMA): Likewise. + * config/arm/netbsd.h (HANDLE_SYSV_PRAGMA): Likewise. + * config/cris/aout.h (HANDLE_SYSV_PRAGMA): Likewise. + * config/d30v/d30v.h (HANDLE_SYSV_PRAGMA): Likewise. + * config/frv/frv.h (HANDLE_SYSV_PRAGMA): Likewise. + * config/i386/djgpp.h (HANDLE_SYSV_PRAGMA): Likewise. + * config/i386/i386-interix.h (HANDLE_SYSV_PRAGMA): Likewise. + * config/i386/vxi386.h (HANDLE_SYSV_PRAGMA): Likewise. + * config/ia64/ia64.h (HANDLE_SYSV_PRAGMA): Likewise. + * config/m88k/m88k.h (HANDLE_SYSV_PRAGMA): Likewise. + * config/mmix/mmix.h (HANDLE_SYSV_PRAGMA): Likewise. + * config/rs6000/aix.h (HANDLE_SYSV_PRAGMA): Likewise. + * config/rs6000/darwin.h (HANDLE_SYSV_PRAGMA): Likewise. + * config/sparc/linux-aout.h (HANDLE_SYSV_PRAGMA): Likewise. + * config/sparc/vxsparc64.h (HANDLE_SYSV_PRAGMA): Likewise. + * config/stormy16/stormy16.h (HANDLE_SYSV_PRAGMA): Likewise. + * config/alpha/osf.h (HANDLE_SYSV_PRAGMA): Don't undef before + defining. + * config/i386/sco5.h (HANDLE_SYSV_PRAGMA): Likewise. + * config/mips/iris5.h (HANDLE_SYSV_PRAGMA): Likewise. + +2002-11-25 Dave Pitts + + * gcc/fixinc/mkfixinc.sh: add i370-*-openedition to bypass fixinc list + +2002-11-25 Kazu Hirata + + * config/h8300/h8300.md (an anonymous pattern): New. + +2002-11-25 Richard Henderson + + * alias.c (find_base_value): Use new_reg_base_value if it's live. + (copying_arguments): Make boolean. + +2002-11-25 Jason Thorpe + + * gcc.c (static_spec_functions): Add if-exists-else spec + function. + (if_exists_else_spec_function): New function. + * doc/invoke.texi: Document the if-exists-else spec function. + + * config/netbsd-elf.h (NETBSD_STARTFILE_SPEC): For -static, use + "%:if-exists-else(crtbeginT%O%s crtbegin%O%s)". + +2002-11-25 Jason Thorpe + + * config.gcc (powerpc-*-netbsd*): Replace "svr4.h" with + "netbsd.h netbsd-elf.h" in tm_file. Set tmake_file to + "${tmake_file} rs6000/t-netbsd". + * config/rs6000/netbsd.h: Rewrite. + * config/rs6000/t-netbsd: New file. + +2002-11-25 Kazu Hirata + + * config/h8300/h8300.md (an anonymous pattern): Relax the + condition for the pattern. + +2002-11-25 Aldy Hernandez + + * config/rs6000/rs6000.h (enum rs6000_builtins): Remove evmwlssf, + evmwlsmf, evmwlssfa, evmwlsmfa, evmwlssfaaw, evmwlsmfaaw, + evmwlssfanw, evmwlsmfanw. + + * config/rs6000/rs6000.c (bdesc_2arg): Same. + + * config/rs6000/spe.md: Same for patterns. 2002-11-25 Christian Ehrhardt @@ -460,61 +5480,92 @@ * fold-const.c (extract_muldiv): Don't propagate division unless both arguments are multiples of C. -2002-11-24 Eric Botcazou +2002-11-25 Andrew Haley - PR optimization/8275 + * 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. - Merge from mainline: - 2002-09-19 Dale Johannesen +2002-11-24 Kazu Hirata - * combine.c (make_extraction): Don't create - invalid subreg. + * config/h8300/h8300.c (h8300_init_once): Fix a typo in the + target help message. -2002-11-23 Marek Michalkiewicz +2002-11-24 Jason Thorpe - 2002-09-26 Theodore A. Roth - * config/avr/avr.c: Eliminate use of _PC_ in pc relative insns. - * config/avr/avr.md: Ditto. + * config.gcc (*-*-netbsd*1.[7-9]*, *-*-netbsd*[2-9]*): Set + extra_parts to "crtbegin.o crtend.o crtbeginS.o crtendS.o + crtbeginT.o". + (arm*-*-netbsd*, i[34567]86-*-netbsd*, m68k*-*-netbsd*) + (ns32k-*-netbsd*, sparc-*-netbsd*, vax-*-netbsd*): Set extra_parts + to "" for a.out configurations. + * config/t-netbsd (CRTSTUFF_T_CFLAGS): Set to "-fPIC". -2002-11-23 Eric Botcazou +2002-11-24 Jason Thorpe - PR c/8588 - * optabs.c (expand_binop): Convert CONST_INTs in shift - operations too. + * config/alpha/netbsd.h (CPP_SUBTARGET_SPEC): Just use + NETBSD_CPP_SPEC directly. + (SUBTARGET_EXTRA_SPECS): Remove netbsd_cpp_spec. Add + netbsd_endfile_spec. + (ENDFILE_SPEC): Use %(netbsd_endfile_spec). -2002-11-23 Eric Botcazou +2002-11-24 Jason Thorpe - PR c/8518 - * c-decl.c (duplicate_decls): Outline the second definition - of an extern inline function in all cases. + * config/netbsd-elf.h (STARTFILE_SPEC): Rename to + NETBSD_STARTFILE_SPEC. + (STARTFILE_SPEC): Redefine in terms of NETBSD_STARTFILE_SPEC. + (ENDFILE_SPEC): Likewise. + * config/netbsd.h (LIB_SPEC, LIBGCC_SPEC): Likewise. -2002-11-22 Eric Botcazou +2002-11-24 Andreas Schwab - PR c/8439 - * recog.c (validate_replace_rtx_1) [PLUS]: Simplify only - if there is something new to be simplified. + * Makefile.in (install-driver): Remove versioned link before + trying to create it. -2002-11-22 Toon Moene + * config/m68k/m68k.c: Fix typo in last change defining + TARGET_ASM_CAN_OUTPUT_MI_THUNK. - * c-decl.c (c_init_decl_processing): Move generation of - decls for g77_integer_type_node and friends from here ... - * c-common.c (c_common_nodes_and_builtins): ... to here. +2002-11-23 Kazu Hirata -2002-11-22 Eric Botcazou + * 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)). - PR optimization/8599 +2002-11-22 Dale Johannesen - Merge from mainline: - 2002-11-04 Dale Johannesen + * toplev.c (rest_of_compilation): Fix comments. - * doloop.c (doloop_modify_runtime): Fix loop count computation - for unrolled loops. - * loop.c (loop_invariant_p): Support calling from unroller. +2002-11-22 Geoffrey Keating + + * aclocal.m4 (ac_cv_func_mmap_dev_zero): Darwin does not + allow mmap from /dev/zero. Don't make decisions for the host + based on presence or absence of /dev/zero on the build machine. + (ac_cv_func_mmap_anon): Darwin does have working MMAP_ANON. + (AC_FUNC_MMAP_FILE): Darwin does have mmap of a file. + * configure: Regenerate. 2002-11-22 Daniel Jacobowitz - * config/sh/sh.md (ashrdi3+1, ashrdi3+2): Predicate on - reload_completed. + * gcc.c (make_relative_prefix, split_directories) + (free_split_directories): Removed. + +2002-11-22 Daniel Jacobowitz + + * configure.in: Set insn=nop for DWARF-2 tests on ARM. + * configure: Regenerated. + +2002-11-22 Kazu Hirata + + * config/h8300/h8300.c (compute_a_shift_length): Fix the insn + length computation when xor.l is output. + +2002-11-21 Jim Wilson + + * config/rs6000/rs6000.c (function_arg): Set inner mode of SPE + vectors to SI. 2002-11-21 Bob Wilson @@ -525,38 +5576,518 @@ (xtensa_emit_move_sequence): Use xtensa_copy_incoming_a7. * config/xtensa/xtensa.md (movdi, movsf, movdf): Ditto. -2002-11-19 Release Manager +2002-11-21 Jan Hubicka - * GCC 3.2.1 Released. + * i386-protos.h (x86_64_sign_extended_value): Fix prototype. + * i386.c (x86_64_general_operand, x86_64_szext_general_operand, + x86_64_nonmemory_operand, x86_64_movabs_operand, + x86_64_szext_nonmemory_operand, x86_64_immediate_operand, + ix86_expand_int_movcc): Update call of x86_64_sign_extended_value. + (local_symbolic_operand): Do not care the 64bit limits. + (x86_64_sign_extended_value): Remove allow_rip support. + (legitimate_pic_address_disp_p): Handle all cases allowed + with RIP addressing. + (legitimate_address_p): Use legitimate_pic_address_disp_p for PIC. + (legitimize_pic_address): Reorganize. + * i386.h (EXTRA_CONSTRAINT): Update call of x86_64_sign_extended_value. -2002-11-19 Release Manager +2002-11-21 Jason Thorpe - * GCC 3.2.1 Released. + * config.gcc (arm*-*-netbsdelf*): Enable configuration. + * config/arm/netbsd-elf.h: New file. -2002-11-18 Release Manager +2002-11-21 Jason Thorpe - * GCC 3.2.1 Released. + * 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. -Sat Nov 16 02:54:29 CET 2002 Jan Hubicka +2002-11-21 Nick Clifton - * jump.c (tablejump_p): New. - * cfgcleanup.c (try_optimize_cfg): Do not merge blocks across tablejump. - * rtl.h (tablejump_p): Declare. + * config/fr30/fr30.md (movsf_constant_store): Move code to + detect 0.0 into fr30.c. + * config/fr30/fr30-protos.h (fr30_const_double_is_zero): + Prototype. + * config/fr30/fr30.c (fr30_const_double_is_zero): New + function. Return true if the rtx is 0.0. -2002-11-16 Graham Stott +2002-11-21 Jason Thorpe - * flow.c (life_analysis): Update LABEL_NUSES before purging - dead jumptables. + * config/arm/elf.h (ASM_SPEC, LINK_SPEC): Pass -EL + if -mlittle-endian is specified. + +2002-11-21 Richard Earnshaw + + PR optimization/2903 + * arm.md (anddi_notzesidi_di): Operand 2 is inverted not operand 1. + (anddi_notsesidi_di): Likewise. + +2002-11-21 Kazu Hirata + + * config/h8300/h8300.c (print_operand): Use + h8300_eightbit_constant_address_p and + h8300_tiny_constant_address_p. + (h8300_adjust_insn_length): Likewise. + * config/h8300/h8300.h (EIGHTBIT_CONSTANT_ADDRESS_P): Remove. + (TINY_CONSTANT_ADDRESS_P): Likewise. + (OK_FOR_U): Use eightbit_constant_address_p. + +2002-11-21 Ulrich Weigand + + * config/s390/libgcc-libc.ver: Add multilib support. + * config/s390/linux.h (MULTILIB_DEFAULT): Define. + * config/s390/t-linux64 (MULTILIB_OPTIONS, MULTILIB_DIRNAMES, + MULTILIB_OSDIRNAMES, LIBGCC, INSTALL_LIBGCC, + EXTRA_MULTILIB_PARTS): Define. + +2002-11-21 Richard Earnshaw + + * arm.c (arm_get_frame_size): A leaf function does not need its + stack padding to an aligned boundary if it has no frame. + (thumb_get_frame_size): Likewise. + +2002-11-20 Steve Ellcey + + * emit-rtl.c (gen_reg_rtx): Simplify mapping of Complex type + to component type using GET_MODE_INNER. + * expr.c (emit_move_insn_1): Ditto. + * optabs.c (expand_binop): Ditto. + (expand_unop): Ditto. + (expand_complex_abs): Ditto. + +2002-11-20 Douglas B Rupp + + * hwint.h (HAVE___INT64): Fix typo (was HAVE__INT64). + +2002-11-20 DJ Delorie + + * config/stormy16/stormy16.c (s16builtins, + xstormy16_init_builtins, xstormy16_expand_builtin): New. + * config/stormy16/stormy16.md (divmodhi4, sdivlh, udivlh): New. + +2002-11-20 Hans-Peter Nilsson + + * Makefile.in (RUN_GEN, VALGRIND_DRIVER_DEFINES): New variables. + (DRIVER_DEFINES): Add $(VALGRIND_DRIVER_DEFINES). + (executing gencheck, genconfigs, genconditions, genflags, + gencodes, genconstants, genemit, genrecog, genopinit, genextract, + genpeep, genattr, genattrtab, genoutput, gengenrtl, genpreds, + gengtype, genprotos): Prepend $(RUN_GEN). + * configure.in: Move host compiler tests before --enable-checking + tests. + (--enable-checking=valgrind): New. + * config.in, configure: Regenerate. + * cppfiles.c [!ENABLE_VALGRIND_CHECKING] (VALGRIND_DISCARD): + Define as empty. + (read_include_file): When doing the mmap+1 trick, + valgrind-annotate the byte after the mmap:ed area as readable. + (purge_cache): Remove above annotation. + * gcc.c (execute) [ENABLE_VALGRIND_CHECKING]: Arrange to prepend + VALGRIND_PATH -q to each command. + + * ggc-common.c [!ENABLE_VALGRIND_CHECKING] (VALGRIND_DISCARD): + Define as empty. + (ggc_realloc): Update valgrind annotations. + * ggc-page.c [!ENABLE_VALGRIND_CHECKING] (VALGRIND_DISCARD): + Define as empty. + (alloc_anon, free_page, ggc_alloc, poison_pages): Add machinery to + valgrind-annotate memory. + +2002-11-20 Ulrich Weigand + + * recog.c (constrain_operands): Prefer exact match over reloadable + EXTRA_MEMORY_CONSTRAINT or EXTRA_ADDRESS_CONSTRAINT. + + * reload.c (find_reloads): Always reload EXTRA_ADDRESS_CONSTRAINT + operands in Pmode. + +2002-11-20 Eric Botcazou + + PR c/8518 + * c-decl.c (duplicate_decls): Outline the second definition + of an extern inline function in all cases. + +2002-11-20 Richard Sandiford + + * stor-layout.c (place_field): Update rli->offset as well as + rli->bitpos. + +2002-11-20 Richard Sandiford + + * sched-deps.c (sched_analyze): Check HARD_REGNO_CALL_PART_CLOBBERED. + +2002-11-20 Richard Sandiford + + * config/sh/sh.md (udivsi3): Don't put udivsi3_i4_media instructions + into a libcall block. + (divsi3): Likewise divsi3_i4_media. + +2002-11-20 Richard Sandiford + + * global.c (find_reg): Check HARD_REGNO_NREGS before kicking + out another register. + +2002-11-20 Jakub Jelinek + + * combine.c (force_to_mode): Only replace with (not Y) if all bits in fuller_mask + (not just mask) are set in C. + +2002-11-19 Andreas Jaeger + + * loop.c (record_giv): Initialize not_replaceable. + (check_final_value): Likewise. + +2002-11-19 Kazu Hirata + + * config/h8300/h8300.c (h8300_init_once): Replace 1 with + MASK_H8300S. + +2002-11-19 Vijay L. Khuspe + + * config/h8300/h8300.c (h8300_init_once): Allow -mn switch + only if -mh or -ms present. + (h8300_eightbit_constant_address_p): Support the normal mode. + (h8300_tiny_constant_address_p): Likewise. + * config/h8300/h8300.h (TARGET_NORMAL_MODE): New. + (POINTER_SIZE): Add 16 bit pointer for the normal mode. + (Pmode): Evaluate to HImode for the normal mode. + (SIZE_TYPE): Evaluate to unsigned int for normal mode. + (PTRDIFF_TYPE): Evaluate to int for the normal mode. + (ASM_WORD_OP): Evaluate to word for the normal mode. + * config/h8300/h8300.md (tablejump_normal_mode): New. + (indirect_jump_normal_mode): New. + * config/h8300/t-h8300 (MULTILIB_OPTIONS): Pass -mn option to + directory. + (MULTILIB_DIRNAMES): Create target dependent directory + 'normal'. + (MULTILIB_EXCEPTIONS): Don't turn on -mn on H8/300. + * doc/invoke.texi (gccoptlist): Describe the new switch -mn. + +2002-11-19 Jan Hubicka + + * i386.md (length_immediate): Do not refer to insn address. + (jcc*, jmp patterns): Compute length explicitly. + +2002-11-19 Eric Botcazou + + PR c/8588 + * optabs.c (expand_binop): Convert CONST_INTs in shift + operations too. + +2002-11-19 Roger Sayle + + * gcse.c (gcse_emit_move_after): Correct typo in REG_EQUAL note. + +2002-11-19 Kazu Hirata + + * config/h8300/h8300.md (an anonymous pattern): Relax the + condition to accept the same operands and/or subregs. + +2002-11-19 Daniel Jacobowitz + + * config/sh/sh.c (gen_shl_and): Revert previous patch. + * config/sh/sh.md (ashrdi3+1, ashrdi3+2): Predicate on + reload_completed. + +2002-11-19 Kazu Hirata + + * config/h8300/h8300.c (print_operand): Update the use of + EIGHTBIT_CONSTANT_ADDRESS_P. + (h8300_adjust_insn_length): Likewise. + (h8300_eightbit_constant_address_p): Check if the given rtx is + a variable with __attribute__((eightbit_data)). + * config/h8300/h8300.h (OK_FOR_U): Update the use of + EIGHTBIT_CONSTANT_ADDRESS_P. + +2002-11-19 Gerald Pfeifer + + * doc/contrib.texi (Contributors): Add self as second contact in + addition to Jeff Law. + +2002-11-19 Andreas Jaeger + + * tree-inline.c: Move prototpyes of find_alloca_call_1 and + find_alloca_call to right place. + +2002-11-19 Kazu Hirata + + * cppfiles.c: Fix formatting. + +2002-11-19 Jason Thorpe + + * gcc.c (The Specs Language): Document spec functions. + (static_spec_functions, lookup_spec_function) + (eval_spec_function, handle_spec_function) + (if_exists_spec_function, alloc_args): New. + (execute): Abort if processing_spec_function is true. + (do_spec_1): Hand off spec to handle_spec_function if %: + is encountered. If processing_spec_function is true, + end any pending argument when the end of the string is reached. + (main): Use alloc_args to allocate the initial argument vector. + * gcc.h (struct spec_function): New. + (lang_specific_spec_functions): New extern. + + * config/netbsd-elf.h (STARTFILE_SPEC): Add if-exists(crti%O%s). + (ENDFILE_SPEC): Add if-exists(crtn%O%s). + * config/alpha/netbsd.h (ENDFILE_SPEC): Likewise. + + * doc/invoke.texi: Document spec functions. + + * cppspec.c (lang_specific_spec_functions): New. + * gccspec.c: Likewise. + +2002-11-18 Steve Ellcey + + * config/ia64/hpux_longdouble.h (FIXUNS_TRUNCTFSI2_LIBCALL): New. + (FIXUNS_TRUNCTFDI2_LIBCALL): New. + (fixunstfsi_libfunc): Change. + (fixunstfdi_libfunc): Change. + (sdiv_optab): Don't zero out SImode handler. + (udiv_optab): Don't zero out SImode handler. + (smod_optab): Don't zero out SImode handler. + (umod_optab): Don't zero out SImode handler. + +2002-11-18 Neil Booth + + PR preprocessor/8524 + * cpplib.c (run_directive): Remove previous kludge to _Pragma. + Add a new one in its place, which hopefully works. + (skip_rest_of_line): Change test for bottom-of-context-stack. + +2002-11-18 Jan Hubicka + + * i386.md (addqi_1_slp): Fix output template. + (subqi_1_slp): Fix type. + +2002-11-17 Jan Hubicka + + * calls.c (alloca_call_p): New global function. + * tree.h (alloca_call_p): New. + * tree-inline.c (inlinable_function_p): Do not inline when + function calls alloca. + (find_alloca_call, find_alloca_call_1): New functions. + +2002-11-18 Kazu Hirata + + * config/h8300/h8300.md (*andorqi3): Use bor between bld and + bst. Update the insn length. + (*andorhi3): Likewise. + (*andorsi3): Likewise. + +2002-11-18 Richard Sandiford + + * config/sh/sh-protos.h (sh_mark_label): Declare. + * config/sh/sh.c (sh_mark_label): New function, taken from + movdi_const, but fixing the case when the address has an addend. + * config/sh/sh.md (movdi_const, movdi_const_32bit): Use it. + +2002-11-18 Richard Sandiford + + * config/sh/sh.c (pool_node): New field: part_of_sequence_p. + (add_constant): Set it. + (dump_table): Don't reorder a constant if part_of_sequence_p. + (machine_dependent_reorg): Assume that float constants will + stay in their original order if used as a sequence. + +2002-11-18 Richard Sandiford + + * config/sh/sh.c (calc_live_regs): Update check for PIC liveness + in compact code. + +2002-11-18 Richard Sandiford + + * config/sh/sh.md (initialize_trampoline): Do not force the + trampoline address into R0_REGS here. + +2002-11-17 Kazu Hirata + + * df.c: Fix formatting. + +2002-11-17 Kazu Hirata + + * config/h8300/h8300.md (two anonymous patterns): Fix insn + lengths. + +2002-11-17 Daniel Jacobowitz + + * sh.c (gen_shl_and): Don't create a zero_extend if the operand + is not an arith_reg_operand. + +2002-11-17 Graham Stott + + * real.c (real_to_decimal): Fix buffer overrun when buffer size + is smaller than representation. + +2002-11-17 Kazu Hirata + + * builtins.c: Fix formatting. + +2002-11-16 Kazu Hirata + + * config/h8300/h8300.md (two anonymous patterns): Fix typos. + +2002-11-16 Kazu Hirata + + * config/h8300/h8300.md: Fix formatting. + +2002-11-16 Kazu Hirata + + * config/h8300/h8300.md: Replace spaces with tabs. + * config/h8300/t-h8300: Remove a trailing empty line. + +2002-11-16 Kazu Hirata + + * tlink.c: Fix formatting. + +2002-11-16 David Edelsohn + + PR 8362 + * config/rs6000/rs6000.c (rs6000_outout_load_multiple): New function. + * config/rs6000/rs6000.md (movti_string): Remove output modifier + when scratch register never needed. + (ldmsi[3-8]): New patterns. + +2002-11-16 Kazu Hirata + + * hard-reg-set.h: Follow spelling conventions. + * real.c: Likewise. + * target.h: Likewise. + +2002-11-16 Jakub Jelinek + + * config/i386/x86-64.h (MCOUNT_NAME): Change into string literal. + +2002-11-16 Kazu Hirata + + * optabs.c: Fix formatting. + +2002-11-16 Jan Hubicka + + * athlon.md, k6.md, pentium.md, ppro.md: Handle shift1, rotate1 + * i386.md (attribute type): Add type shift1 and rotate1. + (*_slp): Rewrite to have just two operands to avoid reload problems. + +2002-11-15 Kazu Hirata + + * config/h8300/h8300.md (4 anonymous patterns): New. + +2002-11-15 Geoffrey Keating + + * params.def (GGC_MIN_HEAPSIZE): Fix GGC_ALWAYS_COLLECT problem. + * doc/invoke.texi: Correct description of what needs to be done to + force collection at every ggc_collect call. + +2002-11-15 Ulrich Weigand + + * config/s390/s390.c (optimization_options): Set + flag_asynchronous_unwind_tables to 1 by default. + +2002-11-15 Ulrich Weigand + + * config/s390/s390.h (ASM_PREFERRED_EH_DATA_FORMAT): Define. + +2002-11-15 Jan Hubicka + + * i386-protos.h (x86_function_profiler): New function + * i386.h (MCOUNT_NAME): New. + (PROFILE_COUNT_REGISTER): New. + (FUNCTION_PROFILER): Move offline to ... + * i386.c (x86_function_profiler) ... here; fix 64bit support + * beos-elf.h (FUNCTION_PROFILER): Kill. + (MCOUNT_NAME): New. + * freebsd-aout.h (FUNCTION_PROFILER): Kill. + (MCOUNT_NAME): New. + (PROFILE_COUNT_REGISTER): New. + * linux.h (FUNCTION_PROFILER): Kill. + (MCOUNT_NAME): New. + * x86-64.h (FUNCTION_PROFILER): Kill. + (MCOUNT_NAME): New. + * freebsd.h (FUNCTION_PROFILER): Kill. + (MCOUNT_NAME): New. + +2002-11-14 Jeroen Dobbelaere + + * config/arm/arm.h (EXPAND_BUILTIN_VA_ARG, + FUNCTION_ARG_PASS_BY_REFERENCE): Define. + * config/arm/arm.c (arm_va_arg, + arm_function_arg_pass_by_reference): New. + * config/arm/arm-protos.h: Add prototypes. + +2002-11-14 Kazu Hirata + + * gthr-single.h: Fix formatting. + +2002-11-14 Zack Weinberg + + * tree.c (tree_vec_elt_check_failed): New function. + * tree.h (TREE_VEC_ELT_CHECK): New checking macro. + (TREE_VEC_ELT): Use it. + + * tree-inline.c (optimize_inline_calls): Don't copy a + zero-length vector. + +2002-11-14 Gabriel Dos Reis + + * diagnostic.c (sorry): Don't repeat "sorry, unimplemented" text. + +2002-11-14 Jakub Jelinek + + * varasm.c (output_addressed_constants) [MINUS_EXPR]: Clear reloc if + both operands contain local relocations. + (categorize_decl_for_section): Don't use mergeable sections if + initializer has any relocations. + +2002-11-14 Kazu Hirata + + * gthr-vxworks.h: Fix formatting. 2002-11-13 Janis Johnson * doc/install.texi (Testing): Document extra Java testing. * doc/sourcebuild.texi (Test Suites): Document libgcj testing. +2002-11-13 John David Anglin + + * pa64-hpux.h (LINK_SPEC): Move "+Accept TypeMismatch" switch to the + beginning of the spec. + (LDD_SUFFIX, PARSE_LDD_OUTPUT): Delete. + (LD_INIT_SWITCH, LD_FINI_SWITCH): Define but don't enable. Add comment + regarding problems with global constructors when using GNU ld. + +2002-11-13 Kazu Hirata + + * gthr-solaris.h: Fix formatting. + +2002-11-13 Kazu Hirata + + * gthr-posix.h: Fix formatting. + +2002-11-12 Kazu Hirata + + * config/h8300/h8300.md (*andorsi3): New. + 2002-11-12 Franz Sirl * doc/install.texi (powerpc-*-linux-gnu*): Update binutils requirement. +2002-11-12 Kazu Hirata + + * config/h8300/h8300.c (tiny_constant_address_p): Parenthesize + expressions appropriately. + +2002-11-12 Kazu Hirata + + * gthr-win32.h: Fix formatting. + +2002-11-12 Kazu Hirata + + * config/h8300/h8300.c (single_one_operand): Correctly compute + mask when mode is SImode. + (single_zero_operand): Likewise. + * config/h8300/h8300.md (two new anonymous insns): New. + 2002-11-12 Gerald Pfeifer * doc/contrib.texi (Contributors): Use GCJ instead of gcj to refer @@ -567,9 +6098,25 @@ Sat Nov 16 02:54:29 CET 2002 Jan Hubicka * config/mips/t-iris6 (MULTILIB_OSDIRNAMES): Restore old directories. -2002-11-11 Janis Johnson +2002-11-11 Zack Weinberg - * doc/contrib.texi: Merge in the list from the libstdc++ web pages. + * params.def (ggc-min-expand, ggc-min-heapsize): New parameters. + * doc/invoke.texi: Document them. + + * ggc-page.c: Include params.h. Remove definitions of + GGC_MIN_EXPAND_FOR_GC, GGC_MIN_LAST_ALLOCATED. Replace + GGC_POISON with ENABLE_GC_CHECKING in ifdefs, delete #define. + (init_gcc): Don't set G.allocated_last_gc here. + (ggc_collect): Use PARAM_VALUE (GGC_MIN_HEAPSIZE) and + PARAM_VALUE (GGC_MIN_EXPAND) to decide whether or not to + perform collection. + * ggc-simple.c: Similarly. + * Makefile.in (ggc-common.o, ggc-simple.o): Add $(PARAMS_H) to + dependencies. + +2002-11-11 Kazu Hirata + + * gthr-dce.h: Fix formatting. 2002-11-11 Franz Sirl @@ -577,11 +6124,13 @@ Sat Nov 16 02:54:29 CET 2002 Jan Hubicka * stmt.c (tail_recursion_args): Handle DECL_MODE differing from the mode of DECL_RTL case. -2002-11-11 Neil Booth +2002-11-11 Janis Johnson - PR preprocessor/4890 - * tradcpp.c (output_line_command): When leaving a file, - system_include_depth has not yet been decremented. + * doc/contrib.texi: Merge in the list from the libstdc++ web pages. + +2002-11-11 Jan Hubicka + + * i386.c (construct_container): Fix handling of SSE_CLASS. 2002-11-10 Joel Sherrill @@ -590,48 +6139,188 @@ Sat Nov 16 02:54:29 CET 2002 Jan Hubicka (crtn.o): Use this... ($(T)crtn.o): ... instead. -2002-11-10 Ralf Corsepius +2002-11-10 Eric Botcazou - * config/mips/mips.md (movdi_usd): Use %z1 in place of %1. + PR c/8439 + * recog.c (validate_replace_rtx_1) [PLUS]: Simplify only + if there is something new to be simplified. -2002-11-11 Graham Stott - Jan Hubicka - - PR 8502 - * cfgrtl.c (try_redirect_by_replacing_jump): Do not kill computed - jumps post reload. - -2002-11-08 H.J. Lu - - Fix c/5351 and optimization/7591. - - * calls.c (store_one_arg): Remove ATTRIBUTE_UNUSED on - variable_size. Mark any slots used for the argument as in-use - only if we can't pass all arguments to a library call in - registers. - -2002-11-07 H.J. Lu - - Fix bootstrap/8146 and - gcc.c-torture/execute/20020307-2.c with -march=i686. +2002-11-10 H.J. Lu * calls.c (PUSH_ARGS_REVERSED): Define only if not defined. * expr.c (PUSH_ARGS_REVERSED): Likewise. * config/i386/i386.h (PUSH_ARGS_REVERSED): Set to 1. -2002-11-04 Aldy Hernandez +2002-11-10 Zack Weinberg - Fix c/8252. + * config/rs6000/sysv4.h: Define NO_IMPLICIT_EXTERN_C here... + * config/rs6000/linux.h, config/rs6000/linux64.h, + config/rs6000/windiss.h: ... not here. - * config/rs6000/rs6000.c (rs6000_legitimate_address): Disallow - vectors from PRE_INC/DEC. +2002-11-10 Jason Thorpe -2002-11-06 Richard Henderson + * config/mips/netbsd.h (TARGET_OS_CPP_BUILTINS): Define + __ABICALLS__ if TARGET_ABICALLS. - PR optimization/7520 - * cfganal.c (flow_active_insn_p): New. - (forwarder_block_p): Use it. +2002-11-10 Jan Hubicka + + * i386.h (MIN_UNITS_PER_WORD): Define to 8 for x86-64 libgcc. + +2002-11-10 Joseph S. Myers + + * c-decl.c (grokdeclarator): Make error for duplicate type + qualifiers into a pedwarn, disabled for C99. + +2002-11-10 Hans-Peter Nilsson + + * config/mmix/mmix.h (FUNCTION_ARG_CALLEE_COPIES): Define the same + as FUNCTION_ARG_PASS_BY_REFERENCE. + +2002-11-09 John David Anglin + + * pa.h (STARTING_FRAME_OFFSET): Change offset for TARGET_64BIT to 16. + + * config.gcc (hppa*64*-*-linux*): Shorten lines in tm_file define. + (hppa*64*-*-hpux11*): Likewise. Use elfos.h with gas. + * pa.c (output_millicode_call): Use symbol difference rather than + $PIC_pcrel$0 when using HP assembler. + * pa64-hpux.h (TARGET_GAS): Define to 1 or 0 depending on whether or + not elfos.h (i.e., gas) is being used. + (ASM_FILE_START, STRING_ASM_OP, TEXT_SECTION_ASM_OP, + DATA_SECTION_ASM_OP, BSS_SECTION_ASM_OP, ASM_OUTPUT_ALIGNED_COMMON, + ASM_OUTPUT_ALIGNED_LOCAL, GLOBAL_ASM_OP, ASM_DECLARE_FUNCTION_NAME, + ASM_OUTPUT_EXTERNAL, ASM_OUTPUT_EXTERNAL_LIBCALL, + ASM_OUTPUT_INTERNAL_LABEL, ASM_GENERATE_INTERNAL_LABEL): Define when + using elfos.h. + (TARGET_ASM_GLOBALIZE_LABEL): Undefine when using elfos.h. + (DWARF2_ASM_LINE_DEBUG_INFO): Delete. + (ASM_FILE_START): Add standard .SPACE and .SUBSPA defines when not + using elfos.h. + (TEXT_SECTION_ASM_OP, READONLY_DATA_SECTION_ASM_OP, DATA_SECTION_ASM_OP, + BSS_SECTION_ASM_OP): New HP style defines when not using elfos.h. + (TARGET_ASM_NAMED_SECTION, MAKE_DECL_ONE_ONLY, ASM_WEAKEN_LABEL): + Don't define when not using elfos.h. + (ASM_DECLARE_RESULT): Don't define. + * doc/install.texi (hppa*-hp-hpux*): Remove statement that HP assembler + doesn't work on hppa64-hp-hpux11. + (hppa*-hp-hpux11): Update. + +2002-11-09 Jason Thorpe + + * config/mips/netbsd.h (SUBTARGET_ASM_SPEC): Don't pass -KPIC + to the assembler if -mno-abicalls was specified. + +2002-11-09 John David Anglin + + * pa-linux.h (PREFERRED_DEBUGGING_TYPE, DWARF2_ASM_LINE_DEBUG_INFO, + ASM_OUTPUT_DEF): Delete. + +2002-11-09 Neil Booth + + * c-opts.c (COMMAND_LINE_OPTIONS): Fix -Wimplicit. + +2002-11-08 Dale Johannesen + + * dbxout.c (dbxout_type): Fix stabs info for vector types. + +2002-11-08 Neil Booth + + PR preprocessor/8497 + PR preprocessor/8501 + * cpptrad.c (scan_out_logical_line): A '#' from a macro doesn't + start a directive. In assembler, #NUM is not a line directive. + +2002-11-08 Neil Booth + + * cppmain.c (cpp_preprocess_file): Loop to pop any -included + buffers. + +2002-11-08 Kazu Hirata + + * config/h8300/h8300.md (two anonymous test insns): New. + +2002-11-08 Jan Hubicka + + * jump.c (mark_jump_label): Handle subregs of label_refs. + +2002-11-07 David Mosberger + + * config/ia64/crtend.asm: Include "auto-host.h". + [HAVE_INITFINI_ARRAY]: Invoke __do_global_ctors_aux via .init_array. + * config/ia64/crtbegin.asm: Similarly. + * config/ia64/t-ia64 (crtbegin.o): Include from current directory. + (crtend.o, crtbeginS.o, crtendS.o): Likewise. + + * aclocal.m4 (gcc_AC_INITFINI_ARRAY): New. + * configure.in: Use it if --enable-initfini-array not specified. + * doc/install.texi (Configuration): Document --enable-initfini-array. + * configure, config.in: Rebuild. + +2002-11-07 Jason Thorpe + + * config/arm/arm-protos.h (arm_get_frame_size) + (thumb_get_frame_size): New prototypes. + * config/arm/arm.c (arm_get_frame_size) + (thumb_get_frame_size): New functions. + (use_return_insn, arm_output_epilogue, arm_output_function_epilogue) + (arm_compute_initial_elimination_offset, arm_expand_prologue): Use + arm_get_frame_size. + (thumb_expand_prologue, thumb_expand_epilogue): Use + thumb_get_frame_size. + * config/arm/arm.h (PREFERRED_STACK_BOUNDARY): Define. + (machine_function): Add frame_size member. + (THUMB_INITIAL_ELIMINATION_OFFSET): Use thumb_get_frame_size. + +2002-11-07 Richard Earnshaw + + * arm.c (bit_count): Make argument unsigned long. Return unsigned. + Adjust code to use portable unsigned bit manipulation. + (insn_flags, tune_flags): Change type to unsigned. + (struct processors): Make flags unsigned long. + (arm_override_options): Change type of count and current_bit_count + to unsigned. + +2002-11-07 Richard Earnshaw + + * arm/elf.h (TYPE_OPERAND_FMT): Prefix type with %. + +2002-11-07 J"orn Rennecke + + * sh.h (DWARF_FRAME_RETURN_COLUMN): Use DWARF_FRAME_REGNUM. + +2002-11-07 Jan Hubicka + + * reg-stack.c (compensate_edge): Fix sanity check. + +2002-11-05 Geoffrey Keating + + * config.gcc: Don't create crtbegin, crtend on Darwin; do create + crt2.o. Rearrange t-darwin makefiles. + * crtstuff.c [OBJECT_FORMAT_MACHO]: Delete. + * unwind-dw2-fde-darwin.c: New. + * unwind-dw2-fde-glibc.c: Correct comment. + * unwind-dw2-fde.c (__register_frame_info_bases) + [DWARF2_OBJECT_END_PTR_EXTENSION]: Clear fde_end. + (classify_object_over_fdes): Use last_fde. + (add_fdes): Likewise. + (linear_search_fdes): Likewise. + * unwind-dw2-fde.h (struct object) + [DWARF2_OBJECT_END_PTR_EXTENSION]: Add fde_end field. + (last_fde): New. + * config/darwin.h (STARTFILE_SPEC): Include crt2.o not crtbegin.o. + (ENDFILE_SPEC): No crtend.o. + * config/t-darwin: New. + * config/i386/t-darwin: Delete. + * config/darwin-crt2.c: New. + * config/rs6000/t-darwin: Delete contents duplicated in t-rs6000 + or config/t-darwin. + +2002-11-06 David Edelsohn + + PR target/8480 + * config/rs6000/rs6000.md (movdi_internal64): Discourage + FPR to FPR moves. 2002-11-06 Janis Johnson @@ -639,20 +6328,172 @@ Sat Nov 16 02:54:29 CET 2002 Jan Hubicka 2002-11-06 David O'Brien - * config/sparc/freebsd.h: Fix typo. + * config/sparc/freebsd: Fix typo. + +2002-11-06 John David Anglin + + * pa64-hpux.h (LDD_SUFFIX, PARSE_LDD_OUTPUT): Define. + +2002-11-06 Alexandre Oliva + + * config/mips/mips.md (call_value_multiple_internal2): Use dla for + non-SImode addresses. 2002-11-05 Bob Wilson * config/xtensa/elf.h (LIB_SPEC): Add "-lhal". +2002-11-05 John David Anglin + + * pa64-hpux.h (LIB_SPEC): Fix p and pg options. + (STARTFILE_SPEC): Remove p and pg options. + +2002-11-05 Andrew Haley + + * fold-const.c (fold): Don't transform (a0 op compound(a1,a2)) + to (compound(a1,a0 op a2)) if a0 or a1 have side effects. + +2002-11-05 Richard Sandiford + + * config/mips/mips.h (CANNOT_CHANGE_MODE_CLASS): Move comment to... + * config/mips/mips.c (mips_cannot_change_mode_class): ...here. + +2002-11-04 Dale Johannesen + + * doloop.c (doloop_modify_runtime): Fix loop count computation + for unrolled loops. + * loop.c (loop_invariant_p): Support calling from unroller. + +2002-11-04 Ulrich Weigand + + * config/s390/s390.c (s390_decompose_address): Use arg_pointer_rtx + for comparison. + 2002-11-04 Aldy Hernandez - Backport patch to fix PR c/8451. + * hard-reg-set.h (REG_CANNOT_CHANGE_MODE_P): New. - 2002-04-25 Richard Henderson + * config/rs6000/rs6000.h (CLASS_CANNOT_CHANGE_MODE_P): Remove. + (CLASS_CANNOT_CHANGE_MODE): Remove. + (CANNOT_CHANGE_MODE_CLASS): New. - * expmed.c (extract_bit_field): Fall through to generic code rather - than aborting on subreg special case. + * config/alpha/alpha.h: Same. + + * config/ia64/ia64.h: Same. + + * config/mips/mips.h: Same. + + * config/s390/s390.h: Same. + + * config/sh/sh.h: Same. + + * config/pa/pa64-regs.h: Same. + + * config/sh/sh-protos.h (sh_cannot_change_mode_class): Add prototype. + + * config/sh/sh.c (sh_cannot_change_mode_class): New. + + * config/mips/mips-protos.h (mips_cannot_change_mode_class): Add + prototype. + + * config/mips/mips.c (mips_cannot_change_mode_class): New. + + * doc/tm.texi (Register Classes): Remove + CLASS_CANNOT_CHANGE_MODE and CLASS_CANNOT_CHANGE_MODE_P. + Document CANNOT_CHANGE_MODE_CLASS. + + * reload.c (push_reload): Use CANNOT_CHANGE_MODE_CLASS. + (push_reload): Same. + + * simplify-rtx.c (simplify_subreg): Same. + + * reload1.c (choose_reload_regs): Same. + + * recog.c (register_operand): Same. + + * regrename.c (mode_change_ok): Change to use new + CANNOT_CHANGE_MODE_CLASS infrastructure. + + * regclass.c (cannot_change_mode_set_regs): New. + Declare subregs_of_mode. + (regclass): Use subregs_of_mode. + Remove references to reg_changes_mode. + (init_reg_sets_1): Remove class_can_change_mode and + reg_changes_mode code. + (invalid_mode_change_p): New. + (dump_regclass): Use invalid_mode_change_p instead of + class_can_change_mode. + (regclass): Same. + (record_operand_costs): Do not set reg_changes_mode. + + * local-alloc.c (struct qty): Remove changes_mode field. + (alloc_qty): Remove changes_mode initialization. + (update_qty_class): Remove set of changes_mode. + (find_free_reg): Use subregs_of_mode. + + * global.c (find_reg): Use subregs_of_mode info. + + * rtl.h (cannot_change_mode_set_regs): New prototype. + (invalid_mode_change_p): Same. + (REG_CANNOT_CHANGE_MODE_P): New macro. + + * flow.c (mark_used_regs): Calculate subregs_of_mode. Remove + REG_CHANGES_MODE. + (life_analysis): Clear subregs_of_mode. + + * combine.c (subst): Pass class to CLASS_CANNOT_CHANGE_MODE_P. + Remove use of CLASS_CANNOT_CHANGE_MODE. + (simplify_set): Same. + (gen_lowpart_for_combine): Calculate subregs_of_mode. Remove + REG_CHANGES_MODE. + + * regs.h: Add extern for subregs_of_mode; + Include hard-reg-set and basic-block. + (REG_CHANGES_MODE): Delete. + +2002-11-03 John David Anglin + + * jump.c (never_reached_warning): Don't set contains_insn until the + first line note is seen. + +2002-11-03 David Edelsohn + + * config/rs6000/rs6000.md (movti_string): Use string instructions. + +2002-11-03 Roger Sayle + + PR c/7128 + * c-typeck.c (c_expand_asm_operands): Defend against + error_mark_nodes in the output argument to avoid ICE. + +2002-11-03 Eric Botcazou + + PR middle-end/8408 + * genrecog.c (preds): Handle ADDRESSOF. + (validate_pattern): Mark it as an lvalue. + +2002-11-02 David Edelsohn + + * config/rs6000/rs6000.c (rs6000_override_options): Use string + instructions when optimizing for size. + +2002-11-02 Kazu Hirata + + * config/h8300/h8300.h: Fix comment typos. + * config/h8300/h8300.md: Likewise. + * config/h8300/lib1funcs.asm: Likewise. + +2002-11-02 Gerald Pfeifer + + Revert this change: + + *doc/install.texi (Installing GCC: Configuration): Clarify + the only supported ways to configure gcc. + +2002-11-01 Kazu Hirata + + * config/h8300/h8300.md (anonymous and:QI pattern): Use 'n' + instead of 'O' for the constraint for the second operand. 2002-11-01 Mark Mitchell @@ -663,12 +6504,62 @@ Sat Nov 16 02:54:29 CET 2002 Jan Hubicka 2002-11-01 David O'Brien * config/sparc/freebsd.h (CPP_CPU64_DEFAULT_SPEC): Define __arch64__. + (TRANSFER_FROM_TRAMPOLINE): Reformat. Add comment. -2002-11-01 David O'Brien +2002-11-01 Kazu Hirata - * config/sparc/freebsd.h (TRANSFER_FROM_TRAMPOLINE): Define - __enable_execute_stack function. + * config/h8300/h8300.h (CAN_ELIMINATE): Simplify. + +2002-11-01 Toshiyasu Morita + + * config/h8300/h8300.h (OPTIMIZATION_OPTIONS): New. + +2002-11-01 Steve Ellcey + + * config/ia64/ia64.h (MASK_INLINE_DIV_LAT): Remove. + (MASK_INLINE_DIV_THR): Remove. + (TARGET_INLINE_DIV_LAT): Remove. + (TARGET_INLINE_DIV_THR): Remove. + (TARGET_INLINE_DIV): Remove. + (MASK_INLINE_FLOAT_DIV_LAT): New macro. + (MASK_INLINE_FLOAT_DIV_THR): New macro. + (MASK_INLINE_INT_DIV_LAT): New macro. + (MASK_INLINE_INT_DIV_THR): New macro. + (TARGET_INLINE_FLOAT_DIV_LAT): New macro. + (TARGET_INLINE_FLOAT_DIV_THR): New macro. + (TARGET_INLINE_INT_DIV_LAT): New macro. + (TARGET_INLINE_INT_DIV_THR): New macro. + (TARGET_INLINE_FLOAT_DIV): New macro. + (TARGET_INLINE_INT_DIV): New macro. + * config/ia64/ia64.md (divsi3): Change to use new macros. + (modsi3): Ditto. + (udivsi3): Ditto. + (umodsi3): Ditto. + (divsi3_internal): Ditto. + (divdi3): Ditto. + (moddi3): Ditto. + (udivdi3): Ditto. + (umoddi3): Ditto. + (divdi3_internal_lat): Ditto. + (divdi3_internal_thr): Ditto. + (divsf3): Ditto. + (divsf3_internal_lat): Ditto. + (divsf3_internal_thr): Ditto. + (divdf3): Ditto. + (divdf3_internal_lat): Ditto. + (divdf3_internal_thr): Ditto. + (divtf3): Ditto. + (divtf3_internal_lat): Ditto. + (divtf3_internal_thr): Ditto. + * config/ia64/ia64.c (ia64_override_options): Change + to check new macros for conflicts in settings. + * doc/invoke.texi (-minline-divide-min-latency): Remove. + (-minline-divide-max-throughput): Remove. + (-minline-float-divide-min-latency): New. + (-minline-float-divide-max-throughput): New. + (-minline-int-divide-min-latency): New. + (-minline-int-divide-max-throughput): New. 2002-11-01 Richard Earnshaw (rearnsha@arm.com) @@ -676,24 +6567,203 @@ Sat Nov 16 02:54:29 CET 2002 Jan Hubicka * arm.c (use_return_insn): Don't use a return insn if there are saved integer regs, but LR is not one of them. -Thu Oct 31 18:31:22 CET 2002 Jan Hubicka +2002-11-01 Jan Hubicka + + * expr.c (emit_move_insn): Use SCALAR_FLOAT_MODE_P + * machmode.h (SCALAR_FLOAT_MODE_P): New macro. + +2002-10-31 Nathanael Nerode + + PR optimization/6162 + * doc/md.texi: Document restriction on commutative operand + specification. + +2002-10-31 Eric Christopher + + * explow.c (convert_memory_address): Use shallow_copy_rtx. + +2002-10-31 Steve Ellcey + + * expmed.c (store_bit_field): Check FUNCTION_ARG_REG_LITTLE_ENDIAN. + +2002-10-31 Steve Ellcey + + * config/ia64/hpux.h (MEMBER_TYPE_FORCES_BLK): Set for non-floats. + +Thu Oct 31 Dale Johannesen + + * config/rs6000/darwin.h: Correct formatting in previous. + +Thu Oct 31 Dale Johannesen + + * config/rs6000/darwin.h: Enable -falign-xxx options. + +2002-10-31 Jan Hubicka * i386.c (override_options): Set defaults for flag_omit_frame_pointer, flag_asynchronous_unwind_tables, flag_pcc_struct_return. * i386.c (optimization_options): Set flag_omit_frame_pointer, flag_asynchronous_unwind_tables, flag_pcc_struct_return to 2. Do not clear -momit-leaf-frame-pointer when profiling. - (ix86_frame_pointer_required): Frame pointer is allways required when + (ix86_frame_pointer_required): Frame pointer is always required when profiling. +2002-10-31 Jan Hubicka + + * i386.md (negdf2_ifs_rex64): Don't allow GPR operand. + +2002-10-31 J"orn Rennecke + + * sh.h (binary_logical_operator): Declare. + * sh.c (binary_logical_operator): New function. + * sh.md (xordi3+1): New combiner splitter pattern. + +2002-10-31 David O'Brien + + * config/sparc/freebsd.h (TRANSFER_FROM_TRAMPOLINE): Define + __enable_execute_stack function. + +2002-10-30 Aldy Hernandez + + * c-common.c: Add GTY to vector_type_node_list. + +2002-10-30 John David Anglin + + * pa-linux.h (ASM_OUTPUT_EXTERNAL_LIBCALL): Define. + * pa-protos.h (attr_length_millicode_call, attr_length_call, + pa_init_machine_status): Declare new global functions. + * pa.c (void copy_fp_args, length_fp_args, get_plabel): Declare and + implement new functions. + (attr_length_millicode_call, attr_length_call): Implement. + (total_code_bytes): Change type to long. + (pa_output_function_prologue): Compute total_code_bytes on TARGET_64BIT. + Reset counter if flag_function_sections. + (output_deferred_plabels): Set output alignment to 3 for TARGET_64BIT. + (output_cbranch): Move call to gen_label_rtx. + (output_millicode_call): Rewrite adding long TARGET_64BIT call, expose + delay slot in all variants, shorten pc-relative calls. + (output_call): Rewrite adding long TARGET_64BIT call, improved delay + slot usage and exposure, various new call variants, and shortened + sequences for some variants on TARGET_PA_20. + Miscellaneous format changes. + * pa.h (total_code_bytes): Change type to long. + (MASK_LONG_CALLS, TARGET_LONG_CALLS, TARGET_LONG_ABS_CALL, + TARGET_LONG_PIC_SDIFF_CALL, TARGET_LONG_PIC_PCREL_CALL): Define. + (TARGET_SWITCHES): Add "-mlong-calls" and "-mno-long-calls" options. + (EXTRA_CONSTRAINT, GO_IF_LEGITIMATE_ADDRESS, + LEGITIMIZE_RELOAD_ADDRESS): Don't use long floating point loads and + stores on TARGET_ELF32. + *pa.md (define_delay): Allow insns in delay on TARGET_PORTABLE_RUNTIME. + (unnamed patterns for mulsi3, divsi3, udivsi3, modsi3, umodsi3 and + canonicalize_funcptr_for_compare expanders): Calculate attribute length + attr_length_millicode_call(). + (call_internal_symref, call_value_internal_symref): Clobber register 1. + Calculate attribute length using attr_length_call(). + (call_internal_reg_64bit, call_value_internal_reg_64bit): Move gp load + to delay slot. + (sibcall, sibcall_value): Rewrite. + (sibcall_internal_symref, sibcall_value_internal_symref): Clobber + register 1. Use attr_length_call(). + (sibcall_internal_symref_64bit, sibcall_value_internal_symref_64bit): + New patterns. + (unamed pattern for canonicalize_funcptr_for_compare): Rewrite. + * som.h (MEMBER_TYPE_FORCES_BLK): Define. + * t-pa64 (TARGET_LIBGCC2_CFLAGS): Add "-mlong-calls". + * doc/invoke.texi (mlong-calls): Document. + +2002-10-30 Roger Sayle + + * fold-const.c (fold_binary_op_with_conditional_arg): Improve + handling of cases where one or both branches of the conditional + have void type, i.e. throw an exception or don't return. + (fold): Only apply (and undo) type conversion to the non-void + branches of a COND_EXPR. + 2002-10-30 Mark Mitchell + PR c++/8333 * varasm.c (asm_output_aligned_bss): Do not call ASM_GLOBALIZE_LABEL. -2002-10-29 Janis Johnson +2002-10-30 David Edelsohn + Torbjorn Granlund - * doc/invoke.texi (-profile-arcs): Remove references to -a and -ax. + * config/rs6000/rs6000.md (load_toc_v4_PIC_1): Use preferred form + for addressibility. + (load_toc_v4_PIC_1b): Same. + +2002-10-30 Kazu Hirata + + * config/h8300/h8300.c (h8300_eightbit_constant_address_p): + Truncate the addresses for H8/300 using HImode. + +2002-10-29 Hans-Peter Nilsson + + * toplev.c (rest_of_type_compilation): Return early in case of + errors. + (check_global_declarations): Don't call debug_hooks->global_decl + in case of errors. + +2002-10-28 Andreas Bauer + + * doc/c-tree.texi (Tree overview): Fix typos. + +2002-10-29 Phil Edwards + + * Makefile.in (gnucompare*): Only record bad comparisons + if there really was a bad comparison. + +2002-10-29 Jan Hubicka + + * i386.h (CONST_DOUBLE_OK_FOR_LETTER_P): Remove 'H' + * i386.md (movsf*, movdf*): Use 'C' instead of 'H' + * md.texi (machine dependent constraints): Document 'C' + + * simplify-rtx.c (simplify_subreg): Fix const_int->vector subregging. + + * i386.c (ix86_expand_vector_move): Fix. + + * i386.c (ix86_expand_builtin): Use sse2_maskmovdqu_rex64. + * i386.md (sse2_maskmovdqu_rex64): New pattern + + PR target/8322 + * xmmintrin.h (_mm_stream_pi, _mm_stream_pd): Fix cast. + (ix86_init_mmx_sse_builtins): Fix type. + +2002-10-29 Jason Thorpe + + * gthr-posix.h: Include for feature tests. + (sched_get_priority_max, sched_get_priority_min) + (pthread_getschedparam, pthread_setschedparam): Only use + if _POSIX_THREAD_PRIORITY_SCHEDULING is defined. + (__gthread_objc_thread_set_priority): Don't treat all non-zero + returns from sched_get_priority_max and sched_get_priority_min + as an error. + +2002-10-29 Kazu Hirata + + * config/h8300/h8300.h (TARGET_DEFAULT): Make it + MASK_QUICKCALL. + +2002-10-29 Kazu Hirata + + * config/h8300/h8300.c (h8300_eightbit_constant_address_p): New. + (h8300_tiny_constant_address_p): Likewise. + * config/h8300/h8300.h (EIGHTBIT_CONSTANT_ADDRESS_P): Use + h8300_eightbit_constant_address_p. + (TINY_CONSTANT_ADDRESS_P): Use h8300_tiny_constant_address_p. + * config/h8300/h8300-protos.h: Add the prototypes for the two + new functions. + +2002-10-29 Kazu Hirata + + * reload1.c (update_eliminables): Unconditionally check if + frame_pointer_needed has changed. + +2002-10-29 Jan Hubicka + + * toplev.c (rest_of_compilation): Reorganize way reg_scan is called + before final pass. 2002-10-29 Eric Botcazou @@ -701,20 +6771,110 @@ Thu Oct 31 18:31:22 CET 2002 Jan Hubicka * expr.c (expand_expr) [PLUS]: Don't use simplify_binary_operation; check for zero operands explicitly. -2002-10-21 Dale Johannesen +2002-10-29 Richard Sandiford - 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. + * config/mips/mips.md (extv, extzv, insv): Set size of referenced + memory after adjusting to BLKmode. -Sun Oct 27 10:12:27 CET 2002 Jan Hubicka +2002-10-29 Kazu Hirata + + * config/h8300/h8300.h (MASK_*): New. + (TARGET_*): Use MASK_*. + +2002-10-28 Jason Thorpe + + * config.gcc (*-*-netbsd*): Add NETBSD_ENABLE_PTHREADS to + tm_defines if pthreads are enabled. + * config/netbsd.h (LIB_SPEC): Only support the -pthread option + if NETBSD_ENABLE_PTHREADS is defined. + +2002-10-28 Kazu Hirata + + * ChangeLog.1: Fix typos. + * cse.c: Fix a comment typo. + * reload1.c: Likewise. + +2002-10-27 Hans-Peter Nilsson + + * fixinc/inclhack.def (libc1_G_va_list): Correct test_text. + * fixinc/tests/base/_G_config.h: New file. + +2002-10-27 Kazu Hirata + + * combine.c: Fix comment formatting. + * loop.c: Likewise. + * real.c: Likewise. + * regclass.c: Likewise. + * regmove.c: Likewise. + * regrename.c: Likewise. + * reg-stack.c: Likewise. + * reload1.c: Likewise. + * reload.c: Likewise. + * reload.h: Likewise. + * unroll.c: Likewise. + +2002-10-27 Kazu Hirata + + * reload1.c (reload): Fix a comment typo. + +2002-10-27 Jan Hubicka * linux64.h (DEFAULT_PCC_STRUCT_RETURN): Define. - PR target/6890 - * xmmintrin.h (_MM_TRANSPOSE4_PS): New. +2002-10-27 Zdenek Dvorak + + * Makefile.in (dwarf2out.o): Add dependendcy on hashtab.h. + * dwarf2out.c: Include hashtab.h. + (is_main_source): New static variable. + (attr_checksum, die_checksum): Modified to handle die references. + (same_loc_p, same_dw_val_p, same_attr_p, same_die_p, same_die_p_wrap, + unmark_all_dies, htab_cu_hash, htab_cu_eq, htab_cu_del, check_duplicate_cu, + record_comdat_symbol_number): New static functions. + (output_comp_unit, compute_section_prefix, is_type_die, break_out_includes, + mark_dies, unmark_dies, dwarf2out_start_source_file): Modified. + * toplev.c (rest_of_decl_compilation): Call of dwarf2out_decl for type + declarations added. + +2002-10-26 Kazu Hirata + + * config/h8300/h8300.c (initial_offset): Change to + h8300_initial_elimination_offset. + * config/h8300/h8300.h (INITIAL_ELIMINATION_OFFSET): Use + h8300_initial_elimination_offset. + * config/h8300/h8300-protos.h: Update the prototype. + +2002-10-26 Hans-Peter Nilsson + + * config/mmix/mmix.h (LIBCALL_VALUE): Use + MMIX_RETURN_VALUE_REGNUM, not MMIX_OUTGOING_RETURN_VALUE_REGNUM. + (FUNCTION_VALUE_REGNO_P): Similar, but move code to... + * config/mmix/mmix.c (mmix_function_value_regno_p): New. + * config/mmix/mmix-protos.h: Remove needless ifdefs on TREE_CODE + and RTX_CODE. + (mmix_function_value_regno_p): Declare. + + * config/mmix/mmix.md ("fixuns_truncdfdi2"): Replace unsigned_fix, + invalid for floating point mode result, with fix. + +2002-10-25 Mike Stump + + Fixes gcc.dg/warn-1.c. + * c-typeck.c (warn_for_assignment): Don't print argument number, if zero. + +2002-10-26 Jan Hubicka + + * toplev.c (dump_file_index): Add DFI_ce3. + (dump_file_info): Likewise. + (rest_of_compilation): Run first ifcvt pass before tracer. + +2002-10-25 Steve Ellcey + + * config/ia64/hpux.h (BITS_BIG_ENDIAN): Remove. + +2002-10-25 Richard Henderson + + * real.c (real_to_decimal): If the >1 tens reduction loop results + in a negative exponent, fall into the <1 pten computation. 2002-10-25 Zack Weinberg @@ -722,11 +6882,137 @@ Sun Oct 27 10:12:27 CET 2002 Jan Hubicka * 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. + TYPE_SIZE and TYPE_SIZE_UNIT. (copy_tree_r): Copy types if they are variably modified. - * hooks.c (hook_tree_bool_false): New. - * hooks.h: Prototype it. +2002-10-25 Ulrich Weigand + + * config/s390/s390.md: Remove old-style peepholes. + +2002-10-25 Ulrich Weigand + + * config/s390/s390.c (s390_decompose_address): Do not range check the + displacement if base or index is the argument pointer register. + +2002-10-24 Hans-Peter Nilsson + + PR other/3337 + PR bootstrap/6763 + PR bootstrap/8122 + * fixinc/inclhack.def (libc1_G_va_list): New fix. + * fixinc/fixincl.x: Regenerate. + * config/i386/linux.h: Move MD_FALLBACK_FRAME_STATE_FOR inside + ifndef IN_LIBGCC2. Wrap it together with signal.h and + sys/ucontext.h inclusion in ifndef USE_GNULIBC_1. + * configure.in (gcc_AC_CHECK_DECLS): Check vasprintf too. + * config.in, configure: Regenerate. + +2002-10-24 Igor Shevlyakov + + * varasm.c (struct rtx_const): Array size 16 for V16QImode. + +2002-10-24 Richard Henderson + + * config/i386/i386.c (x86_output_mi_thunk): Fix x86_64 pic jump. + +2002-10-24 Kazu Hirata + + * config/h8300/h8300.c (initial_offset): Simplify by using + round_frame_size. + +2002-10-24 Marek Michalkiewicz + + * doc/install.texi (avr): Update required binutils version. + +2002-10-24 Theodore A. Roth + + * doc/install.texi: Point avr users at more up-to-date information. + +2002-10-24 Ulrich Weigand + + * config/s390/s390.md (movdi, movsi, movhi, movqi): Add peepholes2 + to pull operands out of the literal pool where possible. + +2002-10-24 Denis Chertykov + + * config/avr/avr.c (init_cumulative_args): Test fntype for zero. + +2002-10-24 Steve Ellcey + + * expr.c (convert_move): If unsignedp is less then zero there + is no equivalent code. + +2002-10-24 Zack Weinberg + + * tree.def: Delete mention of nonexistent ARRAY_TYPE fields. + +2002-10-24 Ulrich Weigand + + * config/s390/s390.h: Rework comments; re-sort target macro definitions + according to the sequence they are defined in the manual. + (POINTER_BOUNDARY): Remove. + +2002-10-24 Kazu Hirata + + * config/h8300/h8300.c (round_frame_size): Replace 8 with + BITS_PER_UNIT. + +2002-10-24 Kazu Hirata + + * config/h8300/h8300.h (EIGHTBIT_CONSTANT_ADDRESS_P): Make it + 64-bit safe. + (TINY_CONSTANT_ADDRESS_P): Likewise. + +2002-10-24 Richard Henderson + + * config/ia64/ia64.c (TARGET_ASM_CAN_OUTPUT_MI_THUNK): True. + (ia64_output_mi_thunk): Rewrite to use rtl, and to handle the + vcall offset. + +2002-10-24 Richard Henderson + + PR opt/7944 + * reload.c (find_reloads_toplev): Mode of X is not important + when simplifying subregs of constants. + +2002-10-24 Richard Sandiford + + * config.gcc (mips64vr-*-elf*, mips64vrel-*-elf*): Add + MIPS_MARCH_CONTROLS_SOFT_FLOAT=1 to $tm_defines. + * config/mips/mips.c (MIPS_MARCH_CONTROLS_SOFT_FLOAT): Default to 0. + (override_options): Base default setting of MASK_SOFT_FLOAT on -march + if MIPS_MARCH_CONTROLS_SOFT_FLOAT. + +2002-10-24 Richard Sandiford + + * optabs.c (expand_binop): Don't reuse the shift target in the + middle of shift sequences. + +2002-10-23 Ziemowit Laski + + * objc/objc-act.c (get_static_reference): Remove unneeded + TYPE_BINFO initialization. + (get_object-reference): Likewise. + (build_constructor): Tighten precondition check. + (finish_message_expr): Likewise. + +2002-10-23 Jakub Jelinek + + * config/i386/i386.c (local_symbolic_operand): Move LABEL_REF test + after CONST test. + +2002-10-23 Steve Ellcey + + * config/ia64/ia64.c (hfa_element_mode): Don't allow 128 bit floats + in HFAs. + +2002-10-23 Richard Henderson + + * config/alpha/alpha.c (TARGET_ASM_CAN_OUTPUT_MI_THUNK): True. + (alpha_output_mi_thunk_osf): Handle vcall_offset. + +2002-10-23 Zack Weinberg + * langhooks.h (struct lang_hooks_for_tree_inlining): Add var_mod_type_p. * langhooks-def.h: Default for tree_inlining.var_mod_type_p is @@ -738,48 +7024,479 @@ Sun Oct 27 10:12:27 CET 2002 Jan Hubicka and only if' checks to merely 'if'. * tree.h: Prototype variably_modified_type_p. + * tree-inline.c (walk_tree): #undef WALK_SUBTREE_TAIL at end. + +2002-10-23 Ulrich Weigand + + * config/s390/linux.h (CC1_SPEC, CC1PLUS_SPEC): Remove. + * config/s390/s390.c (optimization_options): Disable -fcaller-saves. + + * config/s390/s390-protos.h (fp_operand): Remove. + * config/s390/s390.c (fp_operand): Remove. + * config/s390/s390.md ("movdi"): Replace fp_operand by FP_REG_P. + ("*movdi_lhi", "*movdi_lli", "*movdi_larl"): Likewise. + ("movsi", "*movsi_lhi", "*movsi_lli"): Likewise. + (movdi_31, movdf_31 splitters): Likewise. + + * config/s390/s390.h (IEEE_FLOAT): Remove. + (TARGET_FLOAT_FORMAT): Define in terms of TARGET_IEEE_FLOAT. + (INT_REGNO_P): Rename to ... + (GENERAL_REGNO_P): ... this. + (FLOAT_REGNO_P): Rename to ... + (FP_REGNO_P): ... this. + (ADDR_REGNO_P): New macro. + (GENERAL_REG_P, ADDR_REG_P, FP_REG_P, CC_REG_P): New macros. + (REGNO_OK_FOR_DATA_P, REGNO_OK_FOR_FP_P): Remove. + (DATA_REG_P, FP_REG_P, ADDRESS_REG_P): Likewise. + (HARD_REGNO_NREGS): Adapt to macro renaming. + (HARD_REGNO_MODE_OK): Likewise. + +2002-10-23 David Edelsohn + Geoff Keating + + * config/rs6000/rs6000.c (rs6000_register_move_cost): New function. + (rs6000_memory_move_cost): New function. + * config/rs6000/rs6000-protos.h: Declare them. + * config/rs6000/rs6000.h: Use them. + +2002-10-23 Ulrich Weigand + + * libgcc2.c (__udiv_w_sdiv): Use attribute ((always_inline)) when + inlining it into other libgcc2 routines. + (__udivmoddi4): Likewise. + +2002-10-22 Nathanael Nerode + + * doc/sourcebuild.texi (Test Suites): Improve. + +2002-10-22 Stan Shebs + + * config/rs6000/rs6000.c (rs6000_output_mi_thunk): Add missing + case for Darwin. + 2002-10-22 Jim Wilson * config/i386/i386.md (subdi3_1): Add call to ix86_binary_operator_ok. -2002-10-15 Jim Wilson +2002-10-23 Jan Hubicka - PR target/6981 - * config/i386/i386.md (adddi3_1): Add call to ix86_binary_operator_ok. + PR other/8289 + * xmmintrin.h: Add const to the argument of loads. -2002-10-24 Richard Henderson + * i386.md (pushv2di): New pattern. + PR target/6890 + * xmmintrin.h (_MM_TRANSPOSE4_PS): New. - PR opt/7944 - * reload.c (find_reloads_toplev): Use simplify_gen_subreg; mode - of X is not important when simplifying subregs of constants. +2002-10-22 Richard Henderson -2002-10-23 Robert Lipe + * 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.gcc (i[34567]86-*-sco3.2v5*): Fix tm_file. + * 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. -2002-10-23 Roger Sayle + * 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. - 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. + * 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. -2002-10-23 Ulrich Weigand + * config/s390/s390.c (s390_output_mi_thunk): Rename from + s390_output_mi_vcall_thunk. + (TARGET_ASM_OUTPUT_MI_THUNK): Remove. + (TARGET_ASM_CAN_OUTPUT_MI_THUNK): New. + + * config/vax/vax.c (vax_output_mi_thunk): Static; add vcall_offset. + (TARGET_ASM_OUTPUT_MI_THUNK, TARGET_ASM_CAN_OUTPUT_MI_THUNK): New. + * config/vax/vax-protos.h: Update. + * config/vax/vax.h (ASM_OUTPUT_MI_THUNK): Remove. + +2002-10-23 Jan Hubicka + + * i386.c (standard_sse_constant_p): Accept vector and integer zeros too. + * i386.h (EXTRA_CONSTRAINT): Recognize 'C' + * i386.md (movti_internal): Use 'C' + + * xmmintrin.h (_mm_cmplt_epi*): New. + +2002-10-22 Ulrich Weigand * config/s390/s390.md ("*movdi_64"): Fix op_type attribute. ("*movdf_64"): Likewise. ("*lshrdi3_64"): Likewise. + ("blockage"): Add length attribute. + ("lit"): Likewise. -2002-10-21 Matthias Klose +2002-10-22 Jan Hubicka - * 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 `;'. + * 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. -Sat Oct 19 15:49:14 CEST 2002 Jan Hubicka + (contains_128bit_aligned_vector_p): Undo accidental checkin. + +2002-10-22 Eric Christopher + + * config/sparc/sparc.h: Add #error. + +2002-10-22 Ulrich Weigand + + * config.gcc [s390-*-linux]: Remove s390/t-linux from tmake_file. + [s390x-*-linux*]: Likewise. + * config/s390/t-linux: Remove. + * config/s390/s390.h: Include fixdfdi.h when building libgcc2. + +2002-10-22 Jan Hubicka + + * i386.c (builtin_description): Add IX86_BUILTIN_PUNPCKHQDQ128. + (ix86_expand_builtin): Fix MASKMOVDQU expasion. + * i386.h (ix86_builtins): Add IX86_BUILTIN_PUNPCKHQDQ128. + * i386.md (mmx_punpck?dq): Simplify. + (sse2_pubpcklqdq): Fix. + (sse2_pubpckhqdq): New. + * xmmintrin.h (_mm_unpackhi_epi32): New. + + * xmmintrin.h (_mm_cvt*, _mm_stream_pd): Fix prototypes. + (_mm_shufflehi_epi16, _mm_shufflelo_epi16): Fix typo. + +2002-10-22 Nathan Sidwell + + PR c++/7209 + * fold_const.c (fold_binary_op_with_conditional_arg): Always + build compound_expr if we used save_expr. + +2002-10-22 Alan Modra + + * output.h (SECTION_NOTYPE): Define. + * varasm.c (default_section_type_flags_1): Set SECTION_NOTYPE for + init array sections. + (default_elf_asm_named_section): Mind SECTION_NOTYPE. + * config/arm/arm.c (arm_elf_asm_named_section): Likewise. Also + merge TLS support. + +2002-10-21 Richard Henderson + + * real.c (sticky_rshift_significand): Return inexact, don't + or it in immediately. + (sub_significands): Accept incomming carry. + (div_significands, rtd_divmod): Update for sub_significands change. + (round_for_format): Update for sticky_rshift_significand change. + (do_add): Don't involve the inexact bit in addition, do give the + inexact bit as the subtraction carry-in. + (encode_internal, decode_internal, real_internal_format): New. + * real.h (real_internal_format): Declare. + +2002-10-21 Ulrich Weigand + + * libgcc2.c: Fix __udiv_w_sdiv breakage on platforms that + don't define sdiv_qrnnd. + +2002-10-21 Kazu Hirata + + * config/h8300/h8300.h (EIGHTBIT_CONSTANT_ADDRESS_P): Simplify + using IN_RANGE. + (TINY_CONSTANT_ADDRESS_P): Likewise. + +2002-10-22 Jan Hubicka + + * i386.c (builtin_description): Add punpcklqdq and movdq2q + (ix86_init_mmx_sse_builtins): Add v2di_ftype_void, di_ftype_v2di, + v16qi_ftype_pchar, void_ftype_pchar_v16qi, v4si_ftype_pchar, + void_ftype_pchar_v4si; Initialize __builtin_ia32_movdq2q, + __builtin_ia32_loaddqa, __builtin_ia32_loaddqu, __builtin_ia32_loadd + __builtin_ia32_storedqa, __builtin_ia32_storedqu, __builtin_ia32_stored + __builtin_ia32_setzero128. + (ix86_expand_builtin): Handle IX86_BUILTIN_CLRTI, IX86_BUILTIN_LOADDQA, + IX86_BUILTIN_LOADDQU, IX86_BUILTIN_LOADD, IX86_BUILTIN_STOREDQA, + IX86_BUILTIN_STOREDQU, IX86_BUILTIN_STORED, Ix86_BUILTIN_MOVQ. + * i386.h (ix86_builtins): Add IX86_BUILTIN_LOADDQA, IX86_BUILTIN_LOADDQU, + IX86_BUILTIN_STOREDQA, IX86_BUILTIN_STOREDQU, IX86_BUILTIN_LOADD, + IX86_BUILTIN_STORED, IX86_BUILTIN_CLRTI, IX86_BUILTIN_MOVDQ2Q, + IX86_BUILTIN_PUNPCKLQDQ128, Ix86_BUILTIN_MOVQ. + * i386.md (sse2_punpcklqdq, sse2_movqsse2_loadd, sse2_stored, + sse2_movq): New patterns. + (sse2_movdqa, sse2_movdqu, sse2_movdq2q): Fix. + * xmmintrin.h (_mm_load_si128, _mm_loadu_si128, _mm_loadl_epi64, + _mm_store_si128, _mm_storeu_si128, _mm_storel_epi64, + _mm_setzero_si128, _mm_set_epi64, _mm_set_epi32, _mm_set_epi16, + _mm_set_epi8, _mm_set1_epi64, _mm_set1_epi32, _mm_set1_epi16, + _mm_set1_epi8, _mm_setr_epi64, _mm_setr_epi32, _mm_setr_epi16, + _mm_setr_epi8, _mm_unpacklo_epi64,_mm_set_moveq): New functions. + (_mm_insert_epi16): Fix. + +2002-10-21 Dale Johannesen + + * config/rs6000/rs6000.c (rs6000_reverse_condition): Handle + unsafe math reversals correctly for RTL generation. + (output_cbranch): Replace rs6000_reverse_condition call + by its former definition. + +2002-10-21 Jakub Jelinek + + * config/i386/i386.c (x86_64_sign_extended_value): Add allow_rip + argument. In CM_SMALL_PIC model consider SYMBOL_REFs binding locally or + from constant pool or LABEL_REFs as sign extended if allow_rip. + Change all +-1GB limits to +-16MB. + (x86_64_general_operand, x86_64_szext_general_operand, + x86_64_nonmemory_operand, x86_64_movabs_operand, + x86_64_szext_nonmemory_operand, x86_64_immediate_operand, + legitimate_address_p, ix86_expand_int_movcc): Update callers. + (local_symbolic_operand): Don't allow offsets bigger than +-16MB + in CM_SMALL_PIC model. + (legitimate_pic_address_disp_p): Don't check offsets before + calling local_symbolic_operand. + (legitimize_pic_address): Force offsets bigger than +-16MB into + register. + * config/i386/i386.h (EXTRA_CONSTRAINT, CONST_COSTS): Likewise. + * config/i386/i386-protos.h (x86_64_sign_extended_value): Update + prototype. + + * configure.in: Test for @GOTNTPOFF and @INDNTPOFF on IA-32 too. + Add x86-64 test. Set tls_first_minor to 14 on IA-32 and x86-64. + * configure: Rebuilt. + * config/i386/i386.c (x86_64_sign_extended_value): Don't allow TLS + SYMBOL_REFs unless enclosed in UNSPEC. Handle UNSPEC_DTPOFF, + UNSPEC_GOTNTPOFF and UNSPEC_NTPOFF. + (legitimate_address_p): Allow foo@dtpoff(base) even on TARGET_64BIT + -fpic. + (ix86_encode_section_info): Don't ever generate TLSGD or TLSLD for + non-pic code if TARGET_64BIT. + (legitimize_address): Generate 64-bit TLS sequences. + (output_pic_addr_const): Support x86-64 TLS operators. + (i386_output_dwarf_dtprel): Output 64-bit DTPOFF as .long f@DTPOFF, 0. + (print_operand_address): Use %fs instead of %gs on TARGET_64BIT. + Don't append (%rip) in 64-bit TLSGD and TLSLD sequences. + (output_addr_const_extra): Support x86-64 TLS operators. + (maybe_get_pool_constant): Handle TARGET_64BIT -fpic. + (ix86_tls_get_addr): Use __tls_get_addr on TARGET_64BIT + unconditionally. + * config/i386/i386.md (*tls_global_dynamic_gnu): Renamed to... + (*tls_global_dynamic_32_gnu): ..., add !TARGET_64BIT. + (*tls_global_dynamic_sun): Renamed to... + (*tls_global_dynamic_32_sun): ..., add !TARGET_64BIT. + (tls_global_dynamic): Renamed to... + (tls_global_dynamic_32): ... this. + (tls_global_dynamic_64, *tls_global_dynamic_64): New. + (*tls_local_dynamic_base_dynamic_gnu): Renamed to... + (*tls_local_dynamic_base_dynamic_32_gnu): ..., add !TARGET_64BIT. + (*tls_local_dynamic_base_dynamic_sun): Renamed to... + (*tls_local_dynamic_base_dynamic_32_sun): ..., add !TARGET_64BIT. + (tls_local_dynamic_base_dynamic): Renamed to... + (tls_local_dynamic_base_dynamic_32): ... this. + (tls_local_dynamic_base_dynamic_64, + *tls_local_dynamic_base_dynamic_64): New. + (*tls_local_dynamic_once): Renamed to... + (*tls_local_dynamic_32_once): ... this. + +2002-10-21 Ulrich Weigand + + * libgcc2.c: Inline __udiv_w_sdiv when compiling __udivdi3, + __divdi3, __umoddi3, or __moddi3. + +2002-10-21 Ulrich Weigand + + * c-opts.c (missing_arg): Use cl_options[opt_index].opt_code + instead of just opt_index as switch expression. + + * calls.c (store_one_arg): Change type of 'excess_align' + to unsigned int. + + * profile.c (output_gcov_string): Change type of 'temp' + to size_t. + +2002-10-21 Ulrich Weigand + + * config/s390/fixdfdi.h (__fixunsdfdi, __fixdfdi): Add prototypes. + (__fixunssfdi, __fixsfdi): Likewise. + * config/s390/s390.c (s390_single_hi): Initialize 'value'. + (s390_single_qi): Likewise. + (s390_emit_epilogue): Initialize 'offset'. Remove signed vs. + unsigned comparison warning. + (s390_return_addr_rtx): New function. + * config/s390/s390-protos.h (s390_return_addr_rtx): Declare it. + * config/s390/s390.h (RETURN_ADDR_RTX): Use it. + (HARD_REGNO_MODE_OK): Rewrite condition to silence warnings. + +2002-10-21 Ulrich Weigand + + * config/s390/s390.c (s390_output_mi_vcall_thunk): New function. + (TARGET_ASM_OUTPUT_MI_VCALL_THUNK): Define target hook. + (s390_output_mi_thunk): Remove. + (TARGET_ASM_OUTPUT_MI_THUNK): Remove. + +2002-10-21 Kazu Hirata + + * config/h8300/h8300.h (N_REG_CLASSES): Parenthesize. + +2002-10-20 Richard Henderson + + * target.h (struct gcc_target): Line wrap. + + * config/alpha/alpha.c (alpha_output_mi_thunk_osf): Static. + (TARGET_ASM_OUTPUT_MI_THUNK): Define here... + * config/alpha/alpha.h: ... not here. + * config/alpha/alpha-protos.h: Update. + + * config/arm/arm.c, config/arm/arm.h, config/arm/arm-protos.h + config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.h, + config/frv/frv-protos.h, config/frv/frv.c, config/frv/frv.h, + config/i386/i386-protos.h, config/i386/i386.c, config/i386/openbsd.h, + config/i386/unix.h, config/i960/i960-protos.h, config/i960/i960.c, + config/i960/i960.h, config/ia64/ia64-protos.h, config/ia64/ia64.c, + config/ia64/ia64.h, config/m68k/linux.h, config/m68k/m68k-protos.h, + config/m68k/m68k.c, config/m68k/netbsd-elf.h, config/m68k/openbsd.h, + config/mmix/mmix-protos.h, config/mmix/mmix.c, config/mmix/mmix.h, + config/pa/pa-protos.h, config/pa/pa.c, config/pa/pa.h, + config/s390/s390-protos.h, config/s390/s390.c, config/s390/s390.h, + config/sparc/openbsd.h, config/sparc/sparc-protos.h, + config/sparc/sparc.c, config/sparc/sparc.h, + config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c, + config/stormy16/stormy16.h: Similarly. + + * config/m68k/m68k.c (m68k_output_mi_thunk): Replicate mnemonic + selection logic from call patterns. + +2002-10-20 Mark Mitchell + + * config/m68k/m68k.c (m68k_output_mi_thunk): Fix typo. + +2002-10-20 Zdenek Dvorak + + PR other/8202 + * i386.c (ix86_init_mmx_sse_builtins, ix86_expand_builtin): Define and + expand __builtin_ia32_pslldqi128 and __builtin_ia32_psrldqi128. + * i386.h (IX86_BUILTIN_PSLLDQI128, IX86_BUILTIN_PSRLDQI128): New. + * xmmintrin.h (_mm_srli_si128, _mm_slli_si128): New. + +2002-10-20 Roger Sayle + + PR c/761 + * toplev.c (flag_unsafe_profile_arcs): Remove. + (flag_bounded_pointers): Remove. + (flag_bounds_check): Correct comments. + (lang_independent_options): Remove -funsafe-profile-arcs and + -fbounded-pointers. Correct -fbounds-check comments. + + * flags.h: Correct flag_schedule_interblock comments. + (flag_bounded_pointers): Remove prototype. + (flag_bounds_check): Correct comments. + + * c-opts.c (c_common_init_options): No need to mark + flag_bounds_check as unspecified. + (c_common_post_options): And no need to set it from + flag_bounded_pointers if its still unspecified. + + * doc/invoke.texi: Fix some overfull hboxes in "make dvi". + Document --version, -feliminate-dwarf-2-dups, -fno-sched-interblock, + -fno-sched-spec, -fsched-spec-load, -fsched-spec-load-dangerous, + -fsched-verbose=n, -fno-branch-count-reg and -fbounds-check. + +2002-10-19 Kaveh R. Ghazi + Mark Mitchell + + * alpha-protos.h (alpha_output_mi_thunk_osf): Update signature to + match target.h. + * arm-protos.h, arm.c (arm_output_mi_thunk): Likewise. + * cris-protos.h, cris.c (cris_asm_output_mi_thunk): Likewise. + * frv-protos.h, frv.c (frv_asm_output_mi_thunk): Likewise. + * i386-protos.h, i386.c (x86_output_mi_vcall_thunk, + x86_output_mi_thunk): Likewise. + * i960-protos.h, i960.c (i960_output_mi_thunk): Likewise. + * ia64-protos.h, ia64.c (ia64_output_mi_thunk): Likewise. + * m68k-protos.h, m68k.c (m68k_output_mi_thunk): Likewise. + * mmix-protos.h, mmix.c (mmix_asm_output_mi_thunk): Likewise. + * rs6000-protos.h, rs6000.c (output_mi_thunk): Likewise. + * s390-protos.h, s390.c (s390_output_mi_thunk): Likewise. + * stormy16-protos.h, stormy16.c (xstormy16_asm_output_mi_thunk): + Likewise. + * vax-protos.h, vax.c (vax_output_mi_thunk): Likewise. + + * target.h (gcc_target): Update output_mi_thunk and + output_mi_vcall_thunk to take a HOST_WIDE_INT delta and + vcall_index. + + * config/alpha/alpha.c: Replace ASM_OUTPUT_MI_THUNK with + TARGET_ASM_OUTPUT_MI_THUNK in comments. + * config/alpha/vms.h (ASM_OUTPUT_MI_THUNK): Don't #undef it. + (TARGET_ASM_OUTPUT_MI_THUNK): #undef it. + * config/frv/frv.h (DEFAULT_VTABLE_THUNKS): Remove definition. + * config/i386/i386-protos.h (x86_output_mi_vcall_thunk): Update + signature. + * config/i386/i386.c (x86_output_mi_vcall_thunk): Likewise. + * config/i386/openbsd.h: Replace ASM_OUTPUT_MI_THUNK with + TARGET_ASM_OUTPUT_MI_THUNK in comments. + * config/i960/i960.h (ASM_OUTPUT_MI_THUNK): Don't define. + (TARGET_ASM_OUTPUT_MI_THUNK): Do define. + * config/m68k/openbsd.h: Replace ASM_OUTPUT_MI_THUNK with + TARGET_ASM_OUTPUT_MI_THUNK in comments. + * config/rs6000/rs6000.c (rs6000_ra_ever_killed): Remove #ifdef + ASM_OUTPUT_MI_THUNK and replace with check of targetm. + + * doc/tm.texi (TARGET_ASM_OUTPUT_MI_THUNK): Update signature. + (TARGET_ASM_OUTPU_MI_VCALL_THUNK): Likewise. + +2002-10-19 Brad Lucier + + * real.c (do_add): Fix 0+0 sign corner case. + (do_divide): Fix Inf/0 corner case. + +2002-10-20 Jan Hubicka + + * i386.c (classify_argument): Pass MMX arguments in memory + (ix86_expand_builtin): Expand proper address mode for cflush. + * i386.md (movdqa): Fix typo. + (sse2_cflush): Accept DImode addresses. + + * xmmintrin.h (_mm_sqrt_sd): Accept two arguments. + (_mm_max_sd): Fix pasto. + (_mm_storeh_pd, _mm_storel_pd): Fix. + + * i386.c (bdesc_comi): Fix to match specification. + (ix86_expand_sse_comi): Emit the comparison properly. + * i386.md (sse_comi, sse2_comi, sse_ucomi, sse2_ucomi): + Do not use comparison operator. + (vnmaskcmp): Fix template. + + * xmmintrin.h (_mm_cvtps_pi16): Fix. + +2002-10-19 Sebastian Pop + + * dependence.c : Removed. + * Makefile.in : Remove dependence.o. + +2002-10-19 Jan Hubicka * mmintrin.h (__m64): typedef it to v2si. (_mm_cvtsi32_si64, _mm_cvtsi32_si64_mm_sll_pi16, @@ -789,48 +7506,285 @@ Sat Oct 19 15:49:14 CEST 2002 Jan Hubicka _mm_or_si64, _mm_xor_si64): Add neccesary casts. * xmmintrin.h (_mm_setzero_si64): Likewise. + * i386.h (ALIGN_MODE_128): Update comment; add missing modes + (SSE_REG_MODE_P, MMX_REG_MODE_P): New macros. + PR target/7693 Patch by Shawn Wagner * mmintrin.h: Replace pi64 by si64. +2002-10-18 David Edelsohn + + * rs6000.md (movdf_hardfloat32): Order alternatives consistently. + Use length of 4 not *. + (movdf_hardfloat64): Same. Support DFmode moves to/from CTR/LR. + (movdf_softfloat64): Likewise. + (movdi_internal32): Use length of 4 not *. + (movti_power): Same. + (ctrsi, ctrdi): Same. + 2002-10-18 Zack Weinberg - * decl.c (start_decl): Point users of the old initialized- + * c-decl.c (start_decl): Point users of the old initialized- typedef extension at __typeof__. -Thu Oct 17 17:14:07 CEST 2002 Jan Hubicka +2002-10-18 Richard Henderson - PR opt/7630 - * reload.c (reload_inner_reg_of_subreg): New argument output; - (push_reload): Update call. + * 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. - PR c++/6419 - * expr.c (expand_expr): Use DECL_RTL_SET_P. +2002-10-18 Mark Mitchell -Wed Apr 24 23:45:37 2002 J"orn Rennecke + * 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. - * calls.c (expand_call): Take current_function_pretend_args_size - into account when setting argblock for sibcalls. +2002-10-18 Jason Thorpe -Wed Oct 16 19:43:38 CEST 2002 Jan Hubicka + * 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. - PR target/7396 +2002-10-18 Jason Thorpe + + * config/i386/i386.c (x86_initialize_trampoline): Emit a call + to __enable_execute_stack with the address of the trampoline + if TRANSFER_FROM_TRAMPOLINE is defined. + * config/i386/i386.h (TARGET_64BIT): Expand to a compile-time + constant if building libgcc2. + +2002-10-17 Roger Sayle + + * doc/c-tree.texi: Update description of COND_EXPR tree nodes. + +2002-10-17 Geoffrey Keating + + * config/rs6000/rs6000.h (HARD_REGNO_MODE_OK): Allow arbitrary modes + in CTR/LR/MQ. + * config/rs6000/rs6000.md (movcc_internal1): Support CCmode moves + to/from CTR/LR/MQ. + (movsf_hardfloat): Support SFmode moves to/from CTR/LR/MQ. + (movsf_softfloat): Likewise. + +2002-10-17 Janis Johnson + + * Makefile.in (site.exp): Add ALT_CXX_UNDER_TEST and COMPAT_OPTIONS. + +2002-10-17 Jason Thorpe + + * config/alpha/alpha.c (alpha_initialize_trampoline): Use + tramp, not addr, to pass the trampoline address to + __enable_execute_stack. + +2002-10-17 Jan Hubicka + + * mmintrin.h: Guard by __MMX__ + * xmmintrin.h: Guard by __SSE__ + + PR other/8062 + * xmmintrin.h (_MM_SHUFFLE2): New macro. + (_mm_load*_?d): New functions. + (_mm_set*_?d): New functions. + (_mm_store*_?d): New functions. + +2002-10-16 Jan Hubicka + + Really commit patch announced at Oct 14 + PR c/7344 + * predict.c (can_predict_insn_p): New function. + (estimate_probability): Avoid unnecesary work. + (process_note_prediction): Likewise. + * toplev.c (rest_of_compilation): Account early branch prediction pass + as TV_BRANCH_PROB. + + PR other/8048 + Found by Ian Ollmann + * xmmintrin.h (_mm_shuffle_pd): Fix typo. + (_mm_load?_pd): Likewise. + (_mm_store?_pd): Likewise. + + PR target/7386 * i386.c (builtin_description):Drop cmpg[te]s[sd]. * xmmintrin.h (__mm_cmpg[te]_s[sd]): Rewrite using swapped alternative. -2002-10-16 Jakub Jelinek + PR opt/7630 + * reload1.c (reload_inner_reg_of_subreg): New argument output; + (push_reload): Update call. - * fold-const.c (fold): Fix a typo. +2002-10-17 Richard Sandiford + + * config.gcc (mips*-*-*): Add OBJECT_FORMAT_ELF to $tm_defines + if using mips/elf.h or mips/elf64.h. + * config/mips/elf.h (OBJECT_FORMAT_ELF): Remove. + * config/mips/elf64.h (OBJECT_FORMAT_ELF): Remove. + +2002-10-16 Aldy Hernandez + + * config/rs6000/rs6000.c (function_arg): Set inner mode of V1DI to + SI. + +2002-10-16 Ulrich Weigand + + * config/s390/linux.h (ASM_DOUBLE, _ASM_OUTPUT_LONG): Remove. + (LPREFIX): Likewise. + (ASM_COMMENT_START, LOCAL_LABEL_PREFIX, ASM_FORMAT_PRIVATE_NAME, + ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT, + ASM_OUTPUT_ALIGN, ASM_OUTPUT_SKIP, ASM_OUTPUT_ALIGNED_BSS, + TEXT_SECTION_ASM_OP, DATA_SECTION_ASM_OP, BSS_SECTION_ASM_OP, + GLOBAL_ASM_OP, ASM_OUTPUT_MI_THUNK): Move to s390.h. + + * config/s390/s390.h (ASM_COMMENT_START, LOCAL_LABEL_PREFIX, + ASM_FORMAT_PRIVATE_NAME, ASM_OUTPUT_ALIGN, ASM_OUTPUT_SKIP, + ASM_OUTPUT_ALIGNED_BSS, TEXT_SECTION_ASM_OP, DATA_SECTION_ASM_OP, + BSS_SECTION_ASM_OP): Move from linux.h. + (ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT): Likewise. + Also, use ASM_GENERATE_INTERNAL_LABEL instead of LPREFIX. + + * config/s390/s390.c (s390_function_profiler): Use + ASM_GENERATE_INTERNAL_LABEL instead of LPREFIX. + +2002-10-15 Richard Henderson + + * real.c (real_to_decimal): Accept BUF_SIZE and CROP_TRAILING_ZEROS + as arguments. Bound DIGITS by the available buffer size. + (real_to_hexadecimal): Likewise. + * real.h (real_to_decimal, real_to_hexadecimal): Update prototypes. + (REAL_VALUE_TO_DECIMAL): Remove. + * c-common.c, c-pretty-print.c, print-rtl.c, print-tree.c, + sched-vis.c, config/arc/arc.c, config/c4x/c4x.c, config/fr30/fr30.c, + config/i370/i370.h, config/i386/i386.c, config/i960/i960.c, + config/ip2k/ip2k.c, config/m32r/m32r.c, config/m68hc11/m68hc11.c, + config/m68k/hp320.h, config/m68k/m68k.h, config/m68k/sun2o4.h, + config/m68k/sun3.h, config/mips/mips.c, config/ns32k/ns32k.c, + config/pdp11/pdp11.h, config/vax/vax.h: Update all callers to + use real_to_decimal directly, and with the proper arguments. + * doc/tm.texi (REAL_VALUE_TO_DECIMAL): Remove. + +2002-10-15 Jim Wilson + + * reload1.c (merge_assigned_reloads): After converting overlapping + reloads to RELOAD_OTHER, abort if there are now conflicting reloads. + + * config/i386/i386.md (adddi3_1): Add call to ix86_binary_operator_ok. + +2002-10-15 Jan Hubicka + + * expr.c (do_tablejump): Fix typo in my previous commit. + +2002-10-15 Richard Sandiford + + * config/mips/vr.h (DRIVER_SELF_SPECS): Change % - PR target/7370 - * config/s390/s390.md ("*addsi3_inv"): New pattern. + * config/s390/s390.c (s390_split_branches): Add return + value. Add parameters TEMP_REG and TEMP_USED. Use unspec 104. - PR target/8232 - * config/s390/s390.md ("cmpstrsi"): Convert length operand - from SImode to Pmode. + (find_base_register_in_addr): New function. + (find_base_register_ref): New function. + (replace_base_register_ref): New function. + + (struct constant_pool): Add members pool_insn, insns, and anchor. + Remove member last_insn. + (s390_start_pool): Initialize them. + (s390_end_pool): Emit pool placeholder insn. + (s390_add_pool_insn): New function. + (s390_find_pool): Use insns bitmap instead of addresses. + (s390_dump_pool): Replace placeholder insn. Emit anchor. + Replace unspec 104 by local-pool-relative references. + (s390_output_constant_pool): Output anchor label if required. + (s390_output_symbolic_const): Handle unspec 104 and 105. + (s390_add_pool): Remove, replace by ... + (s390_add_constant, s390_find_constant): ... these new functions. + (s390_add_anchor): New function. + + (s390_chunkify_pool): Delete, replace by ... + (s390_chunkify_start, s390_chunkify_finish, + s390_chunkify_cancel): ... these new functions. + (s390_optimize_prolog): Add parameter TEMP_REGNO. + Recompute register live data for special registers. + (s390_fixup_clobbered_return_reg): New function. + (s390_machine_dependent_reorg): Rewrite to use new + s390_chunkify_... routines. + + config/s390/s390.md ("reload_base"): Rename to ... + ("reload_base_31"): ... this. + ("reload_base_64"): New insn. + ("reload_base2"): Remove. + ("reload_anchor"): New insn. + ("pool"): New insn. + + s390.c (s390_pool_overflow): Remove. + s390.h (s390_pool_overflow): Likewise. + s390.md ("cjump", "icjump", "doloop_si"): Remove s390_pool_overflow. + +2002-10-15 J"orn Rennecke + + * sh.md (movv8qi_i+2): Don't split if source is -1. 2002-10-15 Janis Johnson @@ -842,53 +7796,259 @@ Wed Oct 16 19:43:38 CEST 2002 Jan Hubicka * loop.c (loop_regs_scan): Mark registers used for function argument passing as MAY_NOT_OPTIMIZE. -2002-10-14 Neil Booth +2002-10-14 Jan Hubicka - PR preprocessor/7862 - PR preprocessor/8190 - * gcc.c (cpp_unique_options): Don't delete .d files. - Remove stray whitespace. + * i386.md (movv2di_internal): New pattern. + (movv2df_internal, movv8hi_internal, movv16qi_internal): Fix predicate. + (movv2di): New expander. + * i386.c (ix86_preferred_reload_class): Return NO_REGS for vector operands. + + * i386.c (ix86_expand_timode_binop_builtin): Delete. + (builtin_description): Add SSE1 logicals; rename SSE2 logicals. + (ix86_init_mmx_sse_builtins): Kill SSE1 logicals. + (ix86_expand_builtin): Likewise. + * i386.h (sse_andti4_df_1, sse_andti3_df_2, sse_andti3_sf_1, sse_andti3_sf_2, + sse_andti3, + sse_andnti4_df_1, sse_andti3_df_2, sse_andti3_sf_1, sse_andti3_sf_2, + sse_andnti3, + sse_orti4_df_1, sse_orti3_df_2, sse_orti3_sf_1, sse_orti3_sf_2, + sse_orti3, + sse_xorti4_df_1, sse_xorti3_df_2, sse_xorti3_sf_1, sse_xorti3_sf_2, + sse_xorti3): Kill. + (sse_andv4sf3, sse_andnv4sf3, sse_orv2df3, sse_xorv2df3, sse_andv2df3, + sse_andnv2df3, sse_orv2df3, sse_xorv2df3): New expanders. + (*sse_andv4sf3, *sse_andnv2df3, *sse_orv4sf3, *sse_xorv4sf3, *sse_andv2df3, + *sse_andnv2df3, *sse_orv2df3, *sse_xorv2df3): New patterns. + (*sse_andsf3, *sse_andndf3, *sse_ordf3, *sse_xordf3, *sse_anddf3, + *sse_andndf3, *sse_orv2df3, *sse_xorv2df3): New patterns. + + * xmmintrin.h (__m128i): Define as __v2di. + + PR c++/6419 + (expand_expr): Use DECL_RTL_SET_P. + +2002-10-14 Roger Sayle + + * combine.c (simplify_set): Treat MODE_CC registers like cc0. + +2002-10-14 Roger Sayle + Zack Weinberg + + * config/i386/i386.c (k6_cost): Correct typo. + +2002-10-14 Mark Mitchell + + PR optimization/6631 + * alias.c (objects_must_conflict_p): Check honor_readonly when + examining TYPE_READONLY. + * function.c (assign_stack_temp_for_type): Likewise. + +2002-10-14 Falk Hueffner + + * config/alpha/alpha.md (extendsidi2_nofix, extendsidi2_fix): + Swap zero extension arguments. + (umaxhi3): Fix instruction class. + PR target/7211 + (prefetch): Fix prefetch instructions. + PR target/7238 + (pkwb): Fix output constraint. + +2002-10-14 Alexandre Oliva + + * config/mips/mips.c (print_operand): Increase buffer size for + real numbers. + +2002-10-14 Richard Henderson + + PR opt/8165 + * gcse.c (adjust_libcall_notes): Revert last change. + * simplify-rtx.c (simplify_replace_rtx): Handle LO_SUM. + +2002-10-14 Andrew Haley + + * tree-inline.c (remap_block): All local class initialization + flags go in the outermost scope. + (expand_call_inline): Call java_inlining_map_static_initializers. + (expand_call_inline): Call java_inlining_merge_static_initializers. + * java/lang.c (merge_init_test_initialization): New. + (java_inlining_merge_static_initializers): New. + (inline_init_test_initialization): New. + (java_inlining_map_static_initializers): New. + + * tree-inline.c (expand_call_inline): Convert retvar to expected + type. + +2002-10-14 Graham Stott + + * stmt.c (decl_conflicts_with_clobbers_p): Add REG_P check. + +2002-10-14 Aldy Hernandez + + * stmt.c: Fix typo in comment. + +2002-10-14 J"orn Rennecke + + * c-common.c (c_common_type_for_mode): Add V2HImode case. + * tree.c (build_common_tree_nodes_2): Initialize + unsigned_V2HI_type_node and V2HI_type_node. + * tree.h (enum tree_index): Add TI_UV2HI_TYPE and TI_V2HI_TYPE. + (unsigned_V2HI_type_node, V2HI_type_node): Define. 2002-10-14 Jakub Jelinek * config/i386/i386.h (ASM_OUTPUT_REG_PUSH, ASM_OUTPUT_REG_POP): Handle TARGET_64BIT. -2002-10-14 Mark Mitchell +2002-10-14 Richard Sandiford - 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/vr.h (DRIVER_SELF_SPECS): Define. + * config/mips/t-vr (MULTILIB_OPTIONS): Remove mlong32. + (MULTILIB_DIRNAMES): Remove long32. + (MULTILIB_EXCEPTIONS): Don't build -mabi=32 -mgp32 multilibs. + (MULTILIB_REDUNDANT_DIRS): Remove. -2002-10-12 John David Anglin +2002-10-14 Richard Sandiford - * tree.c (tree_size): Revise expressions using TREE_CODE_LENGTH and - TREE_VEC_LENGTH to ensure values are promoted before doing subtraction. + * doc/tm.texi (DRIVER_SELF_SPECS): Document. + * gcc.c (driver_self_specs): New variable. + (do_self_spec): New function. + (main): Use it to process driver_self_specs. + +2002-10-13 Richard Henderson + + * rtl.c (shallow_copy_rtx): Use memcpy for the entire node. + +2002-10-12 Neil Booth + + PR preprocessor/7862 + PR preprocessor/8190 + * gcc.c (cpp_unique_options): Don't delete .d files. + Remove stray whitespace. + +2002-10-12 Naohiko Shimizu + + * pdp11.h (ASM_OUTPUT_SKIP): Add preceding 0 for octal constant. + (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL): Likewise. + * pdp11.c (pdp11_output_function_prologue): 0%o -> %#o. + (pdp11_output_function_epilogue, output_ascii): Likewise. + (output_addr_const_pdp11): Likewise. + * pdp11.md (movdi): Use offsetable memory for floating store. + (lshrsi3, negsi2): Delete irrelevant comment. + +2002-10-11 Geoffrey Keating + + * cse.c (mention_regs): Set SUBREG_TICKED to the register number, + not the address of the REG. + (struct cse_reg_info): Make subreg_ticked unsigned. 2002-10-11 Janis Johnson * doc/compat.texi: Add info about C++ libraries. -Thu Oct 10 19:47:41 CEST 2002 Jan Hubicka +2002-10-11 Richard Henderson + + PR opt/8165 + * gcse.c (adjust_libcall_notes): Also adjust notes for INSN. + +2002-10-11 John David Anglin + + * cfganal.c (dfs_enumerate_from): Use PARAMS. + * genautomata.c (output_insn_code_cases): Likewise. + * real.c (real_format): Likewise. + * tree.c (tree_size): Revise expressions using TREE_CODE_LENGTH to + ensure value is promoted before doing subtraction. + +2002-10-11 Jan Hubicka + + * calls.c (expand_call): Simplify noreturn call. + + PR c/7344 + * cfgbuild.c (make_edges): Create edge cache when we do have + large jumptable. + * expr.c (do_tablejump): Note size of maximal jumptable. + * function.c (prepare_function_start): Zero out size. + * function.h (function): Add max_jumptable_ents. + + * cfgcleanup.c (insn_match_p): Verify sibcall flag for calls to. + +2002-10-11 J"orn Rennecke + + * sh.md (movv8qi_i+2): For V8QI destinations, generate V4HI + register for mperm_w operation. + +2002-10-11 J"orn Rennecke + + * emit-rtl.c (gen_lowpart_common): When asked to make a vector from + an integer, use simplify_gen_subreg. + +2002-10-10 Aldy Hernandez + + * extend.texi (Vector Extensions): Remove comment about single + element vectors. + +2002-10-10 Kaveh R. Ghazi + + * fold-const.c (size_htab_hash): Use htab_hash_pointer. + * function.c (insns_for_mem_hash): Likewise. + * varasm.c (STRHASH): Likewise. + +2002-10-10 Stuart Hastings + + * cse.c (struct cse_reg_info): Add subreg_ticked. + (SUBREG_TICKED): New. + (get_cse_reg_info): Initialize SUBREG_TICKED. + (mention_regs): Use it. + (invalidate): Set SUBREG_TICKED. + (invalidate_for_call): Likewise. + (addr_affects_sp_p): Likewise. + +2002-10-10 Jakub Jelinek + + * config/i386/i386.md (tls_local_dynamic_base): Put pic reg + into proper operand. + +2002-10-10 Denis Chertykov + + * config/ip2k/ip2k.c (function_epilogue): Optimize stack + deallocation. + * config/ip2k/libgcc.S: Combine routines used by function + epilogue. + +2002-10-10 Jim Wilson + + * cse.c (fold_rtx): Don't perform associative optimization for DIV and + UDIV. + +2002-10-10 David Edelsohn + + * config/rs6000/aix52.h: New file. + * config/rs6000/t-aix52: New File. + * config.gcc (rs6000-ibm-aix5.1.*): New entry. + (rs6000-ibm-aix[56789].*): Default to AIX 5.2. + +2002-10-10 Jan Hubicka PR target/5610 * invoke.texi (-msse-math): Kill (-msse): Add note to mfpmath=sse. -Thu Oct 10 17:38:29 CEST 2002 Jan Hubicka - - PR ice/7951 - * reload1.c (emit_input_reload_insns): Use constrain_operands - instead of constraint_accepts_reg_p to verify optimization. - (constraint_accepts_reg_p): Kill - -Thu Oct 10 17:05:22 CEST 2002 Jan Hubicka +2002-10-10 Jan Hubicka PR target/7723 * i386.c (ix86_expand_vector_move): Do not generate const0->mem moves. +2002-10-10 Neil Booth + + PR preprocessor/8179 + * gcc.c (cpp_options): Add {ansi}, move %{m*} to same location + as cc1_options. + (default_compilers): Pass debug options when preprocessing + stdin. + +2002-10-06 Richard Henderson + + * toplev.c (rest_of_compilation): Revert opt/2960 change. + 2002-10-09 Zack Weinberg PR c/7353 @@ -902,22 +8062,65 @@ Thu Oct 10 17:05:22 CEST 2002 Jan Hubicka "Typeof", rewritten using that extension. Add some compatibility notes to "Typeof." -2002-10-02 Richard Henderson +2002-10-09 Kaveh R. Ghazi - PR opt/7124 - * config/i386/i386.c (ix86_register_move_cost): Increase cost - for secondary_memory_needed pairs. + * loop.c: Revert 2002-08-15 change. + (LOOP_REGNO_NREGS): Ensure type is int. -Wed Oct 9 19:09:13 CEST 2002 Jan Hubicka +2002-10-09 David Edelsohn - PR opt/7912 - PR opt/7390 - * i386.c (athlon_cost): Fix the move costs. + * config/rs6000/rs6000.md (extenddftf2): Change to define_insn + which copies first FPR and clears second. + (extendsftf2): Same. + (floatditf2): Fix typo. + (floatsitf2): Same. + (fix_trunctfdi2): Same. + (fix_trunctfsi2): Same. + +2002-10-09 Kaveh R. Ghazi + + * conflict.c (arc_hash): Change return type to hashval_t. + * cselib.c (get_value_hash): Likewise. + * genautomata.c (automaton_decl_hash, insn_decl_hash, decl_hash, + state_hash, automata_list_hash): Likewise. + * read-rtl.c (def_hash): Likewise. + * tree.c (type_hash_hash): Likewise. + +2002-10-08 Aldy Hernandez + + * config/rs6000/rs6000.c (rs6000_ra_ever_killed): Call + prologue_epilogue_contains instead of using REG_MAYBE_DEAD notes. + +2002-10-09 J"orn Rennecke + + * sh.md (ffssi2): Fix emitted code. + +2002-10-09 Ulrich Weigand + + * cse.c (insn_live_p): Pass insn pattern, not full insn + to may_trap_p. + +2002-10-09 Neil Booth + + * cppmacro.c (paste_tokens): Only allow / to paste with =. + +2002-10-09 David Edelsohn + + * config/rs6000/rs6000.md (movdf splitter): Use gen_int_mode on + 64-bit hosts. + (movtf_internal): Reference correct displacement for second value + in memory. + (movtf splitter): Correct generation of constants in 64-bit mode. 2002-10-09 Alan Modra * libgcc2.c (__floatdisf): Properly cure double rounding. +2002-10-09 Gabriel Dos Reis + + * c-common.c (cb_register_builtins): Define __WCHAR_MAX__. + * doc/cpp.texi (Common Predefined Macros): Document. + 2002-10-09 Gabriel Dos Reis PR doc/7484 @@ -932,7 +8135,137 @@ Wed Oct 9 19:09:13 CEST 2002 Jan Hubicka (MULTILIB_EXCEPTIONS, MULTILIB_EXCLUSIONS, MULTILIB_MATCHES): Remove. (CRTSTUFF_T_CFLAGS): Define. -2002-09-25 Eric Botcazou +2002-10-08 Roger Sayle + + PR target/8087 + * simplify-rtx.c (avoid_constant_pool_reference): Allow constant + pool references that are constructed using LO_SUM. + +2002-10-08 Nathan Sidwell + + * c-opts.c (c_common_decode_option): Add warn_strict_aliasing to + -Wall. + * c-typeck.c (build_c_cast): Use warn_strict_aliasing, tweak + message. + * flags.h (warn_strict_aliasing): Declare. + * toplev.c (warn_strict_aliasing): Define. + (lang_independent_options): Add it. + * doc/invoke.texi (-Wstrict-aliasing): Document it. + +2002-10-08 Zack Weinberg + + * system.h (GCCBUGURL): Delete. + * version.c (bug_report_url): New. Add commentary about + modifying both these strings in modified distributions. + * version.h: Declare bug_report_url. + + * diagnostic.c, gcc.c, gcov.c: Globally replace GCCBUGURL with + bug_report_url. + +2002-10-08 Nick Clifton + + * config/rs6000/spe.h (__ev_set_acc_u64): Use __ev_create_u64 to + convert uint64_t into __ev64_opaque__. + (__ev_set_acc_s64): Likewise, but using signed types. + +2002-10-08 Ulrich Weigand + + * config/s390/s390.md ("*doloop_si_long"): Add missing operand. + ("*doloop_di_long"): Likewise. + +2002-10-08 Jan Hubicka + + * print-rtl.c (print_rtx): Increase buffer size for real numbers. + +2002-10-08 Richard Sandiford + + * config/mips/mips.md (define_attr cpu): Add r4111. + +2002-10-08 Anthony Green + + * bitmap.c (bitmap_equal_p): Clear all bitmap_head fields. + +2002-10-08 Michael Hayes + + * config/c4x/c4x.c (c4x_print_operand): Enlarge buffer + for REAL_VALUE_TO_DECIMAL output. + +2002-10-07 David Edelsohn + + * config/rs6000/rs6000.c (rs6000_override_options): Set + real_format_for_mode for IBM extended format, if enabled. + (easy_fp_constant): Add TFmode. + (rs6000_legitimize_address): Add TFmode. + (rs6000_legitimate_address): Same. + (function_arg_advance): TFmode uses two FPRs. + (rs6000_emit_prologue): Fix warning. + (rs6000_output_function_epilogue): Add TFmode. + (output_toc): Add TFmode. + * rs6000.h (SLOW_UNALIGNED_ACCESS): Add TFmode. + (LEGITIMATE_OFFSET_ADDRESS_P): Add TFmode. + * rs6000.md (movtf splitter): Load TFmode constant. + +2002-10-07 Dale Johannesen + + * rtl.h: Add NOTE_PRECONDITIONED. + * unroll.c: Set it. + * loop.c: Set loop_info->preconditioned from it. + * doloop.c: Permit doloop treatment when loop_info->preconditoned. + +2002-10-07 Richard Henderson + + * config/i960/i960.c (i960_setup_incoming_varargs): Create a + new rtx for comparing the argument pointer against zero. + (i960_va_start): Similarly. + +2002-10-07 Richard Henderson + + * config/i960/i960.md (*): Use TFmode, not XFmode. + * config/i960/i960.c (*): Likewise. + (i960_arg_size_and_align): Remove XFmode alignment hack. + (i960_round_align): Merge code from ROUND_TYPE_ALIGN. + * config/i960/i960.h (LONG_DOUBLE_TYPE_SIZE): Use 128, not 96. + (MAX_LONG_DOUBLE_TYPE_SIZE): Likewise. + (DATA_ALIGNMENT, ROUND_TYPE_SIZE): Remove. + +2002-10-07 Richard Henderson + + * config/fp-bit.c (EXTENDED_FLOAT_STUBS): Flush out all XF/TFmode + entry points; use void return value and argument list. + +2002-10-05 Naohiko Shimizu + + * t-pdp11: Add MULTILIB support for msoft-float. + * pdp11.h (LEGITIMATE_CONSTANT_P): Fix soft-float case. + + * t-pdp11: Add LIB2FUNCS_EXTRA. + * pdp11.c (pdp11_output_function_prologue): Restrict offset to 16bit, + add preceding 0 to the octal constant, rename 'fp' to 'r5', rename + 'fldd' to 'ldd', rename 'fstd' to 'std'. + (pdp11_output_function_epilogue): Likewise. + (output_move_quad): Make the comment gas compatible. + (output_ascii): Add preceding 0 to the octal constant. + (print_operand_address): Add pre_modify, post_modify. + (output_addr_const_pdp11): Add preceding 0 to the octal constant. + * pdp11.h (GO_IF_LEGITIMATE_ADDRESS) : Add 'movb' pre_modify case + with the indication of Paul Koning. + (PRINT_OPERAND): Fix floating constant. + * pdp11.md (movdi): Restrict matching pattern. + (movqi): Generalize the matching pattern. + (movdf): Restrict matching pattern. + (zero_extendqihi2): Change constant representation. + (floatsidf2): Fix wrong operands. + (addqi3): Fix wrong instruction name. + (subqi3): Fix wrong instruction name. + (andsi3, andhi3, andqi3): Simplify and fix to use 'bic'. + (xorsi3): Fix wrong insn. + (one_cmplqi2): Add two operand pattern. + (lsrsi3): New. + (negsi2): New. + (call): Add register indirect case. + (mod): Fix wrong subreg. + +2002-10-06 Eric Botcazou Volker Reichelt PR c/7411 @@ -943,30 +8276,21 @@ Wed Oct 9 19:09:13 CEST 2002 Jan Hubicka * config/rs6000/rs6000.md (load_toc_v4_PIC_2): Fix base constraint. -2002-10-06 Roger Sayle +2002-10-06 Richard Henderson - 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. + PR optimization/2960 + * toplev.c (rest_of_compilation): Don't copy_loop_headers if + optimize_size. -2002-10-06 Neil Booth +2002-10-06 Alexandre Oliva - Debian BTS Bug #157416 - * cpplib.c (destringize_and_run): Kludge around getting - tokens from in-progress macros. - (_cpp_do__Pragma): Simplify. + * config/mips/mips.h (SIZE_TYPE, PTRDIFF_TYPE): Override + previously definitions. 2002-10-06 Frank Ch. Eigler * cppinit.c (init_standard_includes, parse_option): Use strncmp. + * c-opts.c (find_opt): Similarly. 2002-10-05 Jakub Jelinek @@ -981,6 +8305,145 @@ Wed Oct 9 19:09:13 CEST 2002 Jan Hubicka Pass all MULTILIB_* variables to genmultilib even if --disable-multilib but MULTILIB_OSDIRNAMES is not empty. +2002-10-04 Bruce Korb + + * fixinc/inclhack.def(hpux11_abs): use format fix + * fixinc/fixincl.x: regenerate + * fixinc/tests/base/stdlib.h: accommodate new fix test + +2002-10-05 Jan Hubicka + + * c-common.c (cb_register_builtins): Use really_no_inline. + +2002-10-04 David Edelsohn + + * unroll.c (copy_loop_body): Remove REG_EQUAL note attached to + copied instruction if the note is not loop invariant. + +2002-10-04 Loren J. Rittle + + * gcc/ginclude/stddef.h: Support the FreeBSD 5 typedef system. + +2002-10-04 Steve Ellcey + + * doc/invoke.texi (HPPA): Add -mlinker-opt, -mgnu-ld, + and -mhp-ld options to list of options. Add -mgnu-ld + and -mhp-ld option descriptions. + +2002-10-04 Steve Ellcey + + * fixinc/inclhack.def (hpux11_abs): New. + (stdio_va_list): change __va_list__ to __gnuc_va_list. + * fixinc/fixincl.x: Rebuild. + +2002-10-04 Roger Sayle + + * config/i386/i386.h (processor_costs): Add new fields fadd, + fmul, fdiv, fabs, fchs and fsqrt to costs structure. + (RTX_COSTS): Use these fields to determine the RTX costs + of floating point addition/subtraction, multiplication, + division, fabs, negation and square root respectively. + * config/i386/i386.c (size_cost): Provide instruction sizes + for these new fields. + (i386_cost, i486_cost, pentium_cost, pentiumpro_cost, + k6_cost, athlon_cost, pentium4_cost): Provide typical cycle + counts for these new fields for all x86 processor variants. + +2002-10-04 Kaveh R. Ghazi + + * mips.c (mips_const_double_ok): Delete unused variable. + + * gengtype.c (rtx_next): Change type to int. + +2002-10-04 Andreas Jaeger + + * config/i386/t-linux64 (MULTILIB_OSDIRNAMES): Fix value. + +2002-10-04 Richard Henderson + + * real.h (SIGNIFICAND_BITS): Add one more word. + (CONST_DOUBLE_FORMAT): Accomodate 6 words. + * real.c (times_pten): New. + (real_to_decimal, real_from_string): Use it. + (sticky_rshift_significand): Use & to find modulus. + (rshift_significand, lshift_significand): Likewise. + (do_divide): Apply sticky bit after normalization. + (real_to_decimal, real_to_hexadecimal): Fix sign of Inf and NaN. + +2002-10-03 Andreas Jaeger + + * gengtype.c (adjust_field_rtx_def): Cast variables of type size_t + to unsigned long, adjust printf format string. + (output_mangled_typename): Likewise. + +2002-10-03 Jason Thorpe + + * config/vax/vax.c (vax_output_function_prologue): Use asm_fprintf. + * config/vax/vax.h (VAX_FUNCTION_PROFILER_NAME): New. + (FUNCTION_PROFILER): Rewrite to use ASM_GENERATE_INTERNAL_LABEL, + assemble_name, asm_fprintf, and VAX_FUNCTION_PROFILER_NAME. + (ASM_OUTPUT_MI_THUNK): Use asm_fprintf instead of REGISTER_PREFIX. + (PRINT_OPERAND_PUNCT_VALID_P): Fix comment. + * config/vax/elf.h (FUNCTION_PROFILER): Remove. + (VAX_FUNCTION_PROFILER_NAME): Redefine as "__mcount". + +2002-10-03 Mark Mitchell + + * doc/invoke.texi (-Wabi): Document mangling bug. + +2002-10-04 Alan Modra + + * config/rs6000/rs6000.c (rs6000_output_function_epilogue): Use a + name for the tbtab label that depends on the function asm name. + Don't output tbtab label unless optional_tbtab. + (output_mi_thunk): Formatting. + +2002-10-03 Richard Henderson + + * config/m68k/m68k.h (OVERRIDE_OPTIONS): Move additional code ... + * config/m68k/m68k.c (override_options): ... here. + * config/m68k/m68kelf.h (OVERRIDE_OPTIONS): Remove. + * config/m68k/m68kv4.h (OVERRIDE_OPTIONS): Remove. + * config/m68k/linux.h (SUBTARGET_OVERRIDE_OPTIONS): Remove. + * config/m68k/netbsd-elf.h (SUBTARGET_OVERRIDE_OPTIONS): Remove. + +2002-10-03 Richard Henderson + + * real.h (struct real_value): Use ENUM_BITFIELD. + +2002-10-03 Richard Henderson + + * config/i960/i960.md (call, call_value): Use emit_call_insn. + +2002-10-03 Steve Ellcey + + * config/pa/pa64-hpux.h (INIT_ENVIRONMENT): New. + +2002-10-03 Steve Ellcey + + * config.gcc (hppa*64*-*-hpux11*): Check gnu_ld. + * config/pa/pa.h (MASK_GNU_LD): New. + (TARGET_GNU_LD): New. + * config/pa/pa64-hpux.h (LINK_SPEC): Set based + on gnu-ld and MASK_GNU_LD. + (SUBTARGET_SWITCHES): New gnu-ld & hp-ld flags. + +2002-10-03 Jan Hubicka + + * i386.c (athlon_cost): Fix the move costs. + +2002-10-03 Jan Hubicka + + * final.c (final): Use symbol name as function name for profiling. + * profile.c (get_exec_counts): Likewise. + (branch_prob): Likewise. + +2002-10-03 Jakub Jelinek + + * longlong.h (__udiv_qrnnd): Remove PARAMS from prototype. + +2002-10-03 Jakub Jelinek + * gcc.c (print_multi_os_directory): New variable. (option_map): Support --print-multi-os-directory. (struct prefix_list): Add os_multilib field. @@ -1027,78 +8490,204 @@ Wed Oct 9 19:09:13 CEST 2002 Jan Hubicka and -m64. * config/sparc/t-sol2-64 (MULTILIB_OSDIRNAMES): Set. (SHLIB_SLIBDIR_SUFFIXES): Remove. - * config/sparc/sol2-bi.h (STARTFILE_SPEC32, STARTFILE_SPEC64): Remove. + * config/sparc/sol2-bi.h (STARTFILE_ARCH64_SPEC): Remove. (STARTFILE_ARCH_SPEC): Remove. - (STARTFILE_SPEC): Add values-X*.o here. * config/i386/t-linux64 (MULTILIB_OSDIRNAMES): Set. (SHLIB_SLIBDIR_SUFFIXES): Remove. * config/i386/linux64.h (STARTFILE_PREFIX_SPEC): Remove. - (STARTFILE_SPEC, ENDFILE_SPEC): Don't distinguish between m32 and - !m32. * config/mips/t-iris6 (MULTILIB_OSDIRNAMES): Set. (SHLIB_SLIBDIR_SUFFIXES): Remove. -2002-10-05 Neil Booth +2002-10-03 Jan Hubicka - PR preprocessor/8120 - * doc/cpp.texi: Update documentation of bad use of ##. + * predict.c (choose_function_section): Avoid choice for linkonce functions. -Thu Oct 3 23:15:15 CEST 2002 Jan Hubicka +2002-10-03 Jan Hubicka - * i386.h (CPP_SPECS): fix defines for -msse, -msse2, -mpentium2,3. + * i386.md (lea to mul peep2): Fix condition. -Thu Oct 3 21:35:36 CEST 2002 Jan Hubicka +2002-10-02 John David Anglin - * toplev.c (rest_of_compilation): Dump loops before clobbering - the structure. + * pa-linux.h (FUNCTION_OK_FOR_SIBCALL): Delete macro. + * pa32-linux.h (FUNCTION_OK_FOR_SIBCALL): Define. - * expr.c (force_operand): Use expand_simple_* to handle more - cases. +2002-10-02 Richard Henderson - * i386.c (q_regs_operand): Use ANY_QI_REG_P. + PR opt/7124 + * config/i386/i386.c (ix86_register_move_cost): Increase cost + for secondary_memory_needed pairs. - * i386.c (override_options): Fix stack alignment. - (classify_argument): Handle variable sized types. - (ix86_expand_int_movcc): Avoid RTL sharing problem. +2002-10-02 Nathanael Nerode - * i386.md (prefetch_sse_rex, prefetch_3dnow_rex): New. - (prefetch): Properly handle 64bit case. + * doc/vms.texi: Blow away false include file section. - * i386.c (classify_argument): Properly compute word size of the analyzed object. +2002-10-02 Roger Sayle - * jump.c (reg_or_subregno): New function. - * rtl.h (reg_or_subregno): Declare - * unroll.c (find_splittable_givs): Handle subregs. + 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. - Richard Sandiford : +2002-10-02 Jan Hubicka - * expr.c (force_operand): Fix reversed move. + * i386.c (print_operand_address): Use RIP addressing for offsetted + label refs too. - Andreas Jaeger : - - * config/i386/linux64.h (STARTFILE_PREFIX_SPEC): New. - - Janis Johnson : - - * loop.c (emit_prefetch_instructions): Several small fixes. - -Thu Sep 5 00:34:33 2002 J"orn Rennecke - - * loop.c (scan_loop): Don't mark separate insns out of a libcall - for moving. - (move_movables): Abort if we see the first insn of a libcall. - -2002-10-01 David S. Miller +2002-09-30 David S. Miller PR middle-end/7151 * config/sparc/sparc.md (movdi_insn_sp32_v9): Accept 'e' regs. (movdi reg/reg split): Match only on sparc32, and v9 when int regs. -2002-10-01 David S. Miller - Jan Hubicka +2002-10-01 Roger Sayle - * reload1.c (gen_reload:SECONDARY_MEMORY_NEEDED): Handle SUBREG. - * reload.c (push_reload:SECONDARY_MEMORY_NEEDED): Likewise. + * unroll.c (loop_iterations): Revert 2002-09-08 change. + +2002-10-01 Richard Henderson + + * real.c (real_to_decimal): Crop trailing zeros for DIGITS < 0. + (real_to_hexadecimal): Likewise. + * print-rtl.c (print_rtx): If we are linked with real.c, don't + dump the XWINT fields of a floating point CONST_DOUBLE. + +2002-10-01 Jason Thorpe + + * config/vax/elf.h (FUNCTION_PROFILER): Fix __mcount call. + +2002-10-01 Richard Henderson + + * calls.c (precompute_register_parameters): Force non-legitimate + constants into pseudos. + +2002-10-01 Nick Clifton + + * config/rs6000/spe.md (spe_evrlwi): Add missing third operand + to assembler template. + +2002-10-01 Richard Henderson + + * dwarf2out.c (loc_descriptor_from_tree): Relax requirement + for TLS debug info to !DECL_EXTERNAL. + +2002-10-01 Matt Thomas + Jason Thorpe + + * config.gcc (vax-*-netbsdelf*): Enable configuration. + * config/elfos.h (PCC_BITFIELD_TYPE_MATTERS): Define only + if not already defined. + * config/vax/elf.h: New file. + * config/vax/netbsd-elf.h: New file. + * config/vax/vax.c: Include "debug.h". + (vax_output_function_prologue): Add dwarf2 support. Use + MAIN_NAME_P when checking for VMS_TARGET stack adjust. + * config/vax/vax.h (CONST_OK_FOR_LETTER_P): Add cases for + 'J' [0..63], 'K' [-128..127], 'L' [-32768..32767], + 'M' [0..255], 'N' [0..65535], and, 'O' [-63..-1]. + (VAX_ISTREAM_SYNC): Remove. + (INITIALIZE_TRAMPOLINE): Use gen_sync_istream. + (JUMP_TABLES_IN_TEXT_SECTION): Define. + (ASM_OUTPUT_REG_POP): Use reg_names for the stack pointer. + (ASM_OUTPUT_ADDR_VEC_ELT): Use ASM_GENERATE_INTERNAL_LABEL + and assemble_name. + (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise. + (PRINT_OPERAND_PUNCT_VALID_P): Accept '|'. + (PRINT_OPERAND): Output REGISTER_PREFIX for '|'. + (INCOMING_RETURN_ADDR_RTX): Define. + * config/vax/vax.md (VUNSPEC_BLOCKAGE) + (VUNSPEC_SYNC_ISTREAM): Define. + (blockage): Use VUNSPEC_BLOCKAGE. + (sync_istream): New insn. + +2002-10-01 Richard Henderson + + * config/vax/vax.md (call_pop, *call_pop, call_value_pop) + (*call_value_pop, call, call_value): Add dwarf2 EH support. + (*call): New insn. + +2002-10-01 Nathan Sidwell + + PR c/8083 + * c-typeck.c (build_c_cast): Warn about type punning which breaks + type based aliasing. + +2002-10-01 Mark Mitchell + + * stor-layout.c (update_alignment_for_field): New function. + (place_union_field): Use it. + (place_field): Likewise. + +2002-10-01 Nathan Sidwell + + PR other/8077 + * gcc.c (cc1_options): Add space on -auxbase-strip. + +2002-10-01 Jim Wilson + + * config/v850/v850.h (EPILOGUE_USES): Define. + +2002-09-30 Andrew Haley + + * flow.c (insn_dead_p): When using non-call-exceptions, don't + eliminate insns that may trap. + * cse.c (insn_live_p): Likewise. + +2002-10-01 Richard Sandiford + + * config/mips/mips.h (PROCESSOR_R4121): Rename to PROCESSOR_R4120. + (TARGET_MIPS4121): Rename to TARGET_MIPS4120. + * config/mips/mips.c (mips_cpu_info): Rename vr4121 to vr4120. + * config/mips/mips.md: Apply same renaming here. + +2002-10-01 Richard Sandiford + + * config/mips/mips.c (PROCESSOR_R4320, TARGET_MIPS4320): Remove. + (GENERATE_MULT3_SI): Remove use of TARGET_MIPS4320. + * config/mips/mips.c (mips_cpu_info): Remove vr4320 entry. + * config/mips/mips.md (define_attr cpu): Remove r4320. + Remove vr4320 scheduler and uses of TARGET_MIPS4320. + +2002-10-01 Richard Sandiford + + * config/mips/mips.c (mips16_strings): New variable. + (mips_output_function_epilogue): Clear the SYMBOL_REF_FLAG of every + symbol in mips16_strings. Free the list. + (mips_encode_section_info): Keep track of local strings. + +2002-10-01 Richard Sandiford + + * config/mips/mips.md (bunge, bltgt, bungt): New define_expands. + (sordered_df, sordered_sf): Remove. + * config/mips/mips.c (get_float_compare_codes): New fn. + (gen_int_relational, gen_conditional_move): Use it. + +2002-10-01 Richard Sandiford + + * config/mips/mips-protos.h (mips_emit_fcc_reload): Declare. + * config/mips/mips.h (PREDICATE_CODES): Add fcc_register_operand. + * config/mips/mips.c (fcc_register_operand): New function. + (mips_emit_fcc_reload): New function, extracted from reload_incc. + (override_options): Allow TFmode values in float registers + if ISA_HAS_8CC. + * cnfig/mips/mips.md (reload_incc): Change destination prediate + to fcc_register_operand. Remove misleading source constraint. + Use mips_emit_fcc_reload. + (reload_outcc): Duplicate reload_incc. + +2002-09-30 Ulrich Weigand + + * longlong.h: Partially synchronize with GMP-4.1 version: + Use i370 definitions also for s390. + Add generic definition of umul_ppmm in terms of smul_ppmm. + [s390] (umul_ppmm): Remove. + [s390] (smul_ppmm): Fix incorrect assembler constraints. + [s390] (smul_ppmm, sdiv_qrnnd): Rename __xx to __x. 2002-09-30 Bob Wilson @@ -1112,10 +8701,3391 @@ Thu Sep 5 00:34:33 2002 J"orn Rennecke (xtensa_secondary_reload_class): Use new RL_REGS class. * config/xtensa/xtensa-protos.h (xtensa_preferred_reload_class): Update. +2002-09-30 John David Anglin + + * pa.c (hppa_encode_label): Don't drop '*' from function labels. + (pa_strip_name_encoding): Strip '@' and '*', in that order. + * pa.h (ASM_OUTPUT_LABELREF): Output user_label_prefix except when + there is a '*' prefix in NAME. + +2002-09-30 Jan Hubicka + + * reload.c (push_reload): Handle subregs and secondary memory. + * reload1.c (gen_reload): Likewise. + + * jump.c (reg_or_subregno): New function. + * rtl.h (reg_or_subregno): Declare + * unroll.c (find_splittable_givs): Handle subregs. + +2002-09-30 Mark Mitchell + + * store-layout.c (finish_record_layout): Add free_p parameter. + (layout_type): Pass it. + * tree.h (finish_record_layout): Update prototype. + +2002-09-30 Jan Hubicka + + * i386.h (TARGET_CPP_CPU_BUILTINS): Define __SSE_MATH__. + + * gcse.c (cprop_jump): Check that the register has not + been modified + (cprop_jump): Likewise. + +2002-09-30 Richard Earnshaw + + * arm.h (BASE_REG_CLASS): Always return LO_REGS for Thumb. + (MODE_BASE_REG_CLASS, case Thumb): Only return BASE_REGS if we know + that we have a SImode access, and only then if reload hasn't completed; + for all other cases, use LO_REGS. + +2002-09-29 Richard Henderson + + * real.c (real_from_string): Apply sign last. Tidy exponent handling. + +2002-09-29 Richard Henderson + + PR c/8002 + * combine.c (force_to_mode): Handle FLOAT_MODE destinations + for CONST_INT. + +2002-09-29 David Edelsohn + + * real.h (ibm_extended_format): Declare. + * real.c (encode_ibm_extended, decode_ibm_extended): New + functions. + +2002-09-29 Kaveh R. Ghazi + + * darwin-protos.h (darwin_asm_output_dwarf_delta): Prototype. + + * ia64.c (ia64_hpux_asm_file_end): Const-ify. + +2002-09-29 John David Anglin + + * expmed.c (extract_bit_field): Fix bit-field extraction from SUBREGs. + +2002-09-29 Kazu Hirata + + * builtins.def: Fix comment formatting. + * c-common.def: Likewise. + * cfgcleanup.c: Likewise. + * combine.c: Likewise. + * gengtype.c: Likewise. + * params.def: Likewise. + * predict.def: Likewise. + * rtl.def: Likewise. + * stab.def: Likewise. + * stor-layout.c: Likewise. + * tree.def: Likewise. + * config/darwin.c: Likewise. + * config/darwin.h: Likewise. + * config/dbxcoff.h: Likewise. + * config/elfos.h: Likewise. + * config/fp-bit.c: Likewise. + * config/freebsd-spec.h: Likewise. + * config/interix.h: Likewise. + * config/libgloss.h: Likewise. + * config/linux-aout.h: Likewise. + * config/linux.h: Likewise. + * config/lynx-ng.h: Likewise. + * config/lynx.h: Likewise. + * config/netbsd-aout.h: Likewise. + * config/netbsd.h: Likewise. + * config/netware.h: Likewise. + * config/psos.h: Likewise. + * config/ptx4.h: Likewise. + +2002-09-28 Kazu Hirata + + * ChangeLog.4: Fix typos. + * ChangeLog.6: Likewise. + * FSFChangeLog.10: Likewise. + * genattrtab.c: Fix comment typos. + * haifa-sched.c: Likewise. + * real.c: Likewise. + * tree.h: Likewise. + * config/arm/arm.c: Likewise. + * config/arm/crti.asm: Likewise. + * config/arm/crtn.asm: Likewise. + * config/frv/frv.c: Likewise. + * config/frv/frv.md: Likewise. + * config/h8300/h8300.md: Likewise. + * config/i386/rtemself.h: Likewise. + * config/ia64/unwind-ia64.c: Likewise. + * config/ip2k/ip2k.h: Likewise. + * config/m88k/m88k.c: Likewise. + * config/m88k/m88k.md: Likewise. + * config/mips/sr71k.md: Likewise. + * config/mmix/mmix.c: Likewise. + * config/rs6000/rs6000.c: Likewise. + * config/sh/sh.md: Likewise. + +2002-09-26 Theodore A. Roth + + * config/avr/avr.c: Eliminate use of _PC_ in pc relative insns. + * config/avr/avr.md: Ditto. + +2002-09-27 Alexander N. Kabaev + + PR preprocessor/8055 + * cppmacro.c (stringify_arg): Do not overflow the buffer + with the terminating NUL when the argument to be stringified + has no tokens. + +2002-09-27 Richard Henderson + + * unroll.c (simplify_cmp_and_jump_insns): New. + (unroll_loop): Use it. Use simplify_gen_foo+force_operand + instead of expand_simple_foo. + +2002-09-27 Richard Henderson + + PR optimization/7520 + * cfganal.c (flow_active_insn_p): New. + (forwarder_block_p): Use it. + +2002-09-27 Richard Henderson + + * emit-rtl.c (active_insn_p): Revert last change. + +2002-09-27 Jakub Jelinek + + * doc/extend.texi (tls_model): Document. + * varasm.c (decl_tls_model): New. + * c-common.c (handle_tls_model_attribute): New. + (c_common_attribute_table): Add tls_model. + * config/alpha/alpha.c (alpha_encode_section_info): Use + decl_tls_model. + * flags.h (enum tls_model, flag_tls_default): Move... + * tree.h (enum tls_model, flag_tls_default): ...here. + (decl_tls_model): New prototype. + * config/ia64/ia64.c (ia64_encode_section_info): Likewise. + * config/i386/i386.c (ix86_encode_section_info): Likewise. + * config/i386/i386.md (tls_global_dynamic, tls_local_dynamic_base): + Allow !flag_pic. + +2002-09-27 Kazu Hirata + + * LANGUAGES: Follow spelling conventions. + * rtl.def: Likewise. + * sbitmap.c: Likewise. + * sched-int.h: Likewise. + * sched-rgn.c: Likewise. + * sibcall.c: Likewise. + * simplify-rtx.c: Likewise. + * ssa.c: Likewise. + * stab.def: Likewise. + * stmt.c: Likewise. + * stor-layout.c: Likewise. + * target.h: Likewise. + * timevar.c: Likewise. + * toplev.c: Likewise. + * tree-dump.c: Likewise. + * tree-inline.c: Likewise. + * tree.c: Likewise. + * tree.def: Likewise. + * tree.h: Likewise. + * unroll.c: Likewise. + * varasm.c: Likewise. + * vmsdbgout.c: Likewise. + * treelang/treelang.texi: Likewise. + * treelang/treetree.c: Likewise. + +2002-09-27 Kazu Hirata + + * config/h8300/h8300.c (compute_saved_regs): Use a macro + instead of a hard register number. + (get_shift_alg): Use an enumerated type instead of numbers. + (h8300_shift_needs_scratch_p): Likewise. + +2002-09-26 David S. Miller + + PR optimization/7335 + * calls.c (emit_library_call_value_1): Passing args by reference + converts a CONST function into a PURE one. + +2002-09-26 David Edelsohn + + * dbxout.c (FORCE_TEXT): Switch to current_function_decl, not + text_section. + * xcoffout.h (DBX_STATIC_BLOCK_START): Remove explicit change to + text section. + * config/rs6000/rs6000.c (rs6000_override_options): Allow + function-sections and data-sections functionality on AIX. + +2002-09-26 David Edelsohn + Dale Johannesen + + * config/rs6000/rs6000.c (rs6000_emit_move): Insert zero-extend + in RTL for sub-word loads from memory. + +2002-09-26 Richard Henderson + + PR c/7160 + * sched-deps.c (sched_analyze_insn): Make clobber insns depend + on call insns. + +2002-09-26 Richard Henderson + + * emit-rtl.c (const_double_htab_eq): Remove unused variable. + +2002-09-26 Chris Lattner + + * ssa.c (rename_insn_1): Handle RENAME_NO_RTX correctly when + handling undefined values. + +2002-09-26 Richard Henderson + + PR opt/7520 + * emit-rtl.c (active_insn_p): Consider a clobber of the + function return value to be active even after reload. + +2002-09-27 Alan Modra + + * doloop.c (doloop_modify_runtime ): Adjust + by absolute loop increment, not loop increment. + +2002-09-26 Kazu Hirata + + * c-common.h: Follow spelling conventions. + * cpplex.c: Likewise. + * cpplib.h: Likewise. + * gthr-dce.h: Likewise. + * gthr-posix.h: Likewise. + * optabs.c: Likewise. + * output.h: Likewise. + * profile.c: Likewise. + * protoize.c: Likewise. + * ra-rewrite.c: Likewise. + * real.c: Likewise. + * recog.c: Likewise. + * reg-stack.c: Likewise. + * regclass.c: Likewise. + * regmove.c: Likewise. + * reload.c: Likewise. + * reload.h: Likewise. + * reload1.c: Likewise. + * reorg.c: Likewise. + * resource.c: Likewise. + * rtl.h: Likewise. + * rtlanal.c: Likewise. + +2002-09-26 Steve Ellcey + + * config/ia64/ia64.c (ia64_expand_load_address): Ensure correct mode + for symbol address. + +2002-09-24 Eric Christopher + + * config/mips/elf.h: Add HANDLE_SYSV_PRAGMA. + * config/mips/elf64.h: Ditto. + +2002-09-24 Eric Christopher + + * except.c (expand_builtin_extract_return_address): Handle case + where Pmode != ptr_mode. + +2002-09-26 Steve Ellcey + + * config/ia64/hpux.h (ASM_OUTPUT_EXTERNAL_LIBCALL): New + +2002-09-26 Steve Ellcey + + * config/ia64/hpux.h (TARGET_DEFAULT): Include TARGET_ILP32. + +2002-09-26 Igor Shevlyakov + + * combine.c (simplify_set): Don't call to force_to_mode if size + of integer type is larger than HOST_BITS_PER_WIDE_INT. + +2002-09-26 Janis Johnson + + * Makefile.in (qmtest-g++): Fix file path. + +2002-09-26 Ulrich Weigand + + * expr.c (expand_expr) [MINUS_EXPR]: Convert A - const to + A + (-const) on RTX level, even for unsigned types. + +2002-09-26 Ulrich Weigand + + * reload.c (dup_replacements): New function. + (find_reloads): Use it to duplicate replacements at the top level + of match_dup operands. + +2002-09-26 Miles Bader + + * v850.md ("length"): Change default value to 4. + +2002-09-26 Kazu Hirata + + * ChangeLog.1: Follow spelling conventions. + * ChangeLog.4: Likewise. + * ChangeLog.6: Likewise. + * FSFChangeLog.11: Likewise. + * doc/cpp.texi: Likewise. + * doc/invoke.texi: Likewise. + * doc/tm.texi: Likewise. + +2002-09-26 Nick Clifton + + * config.gcc: Add x prefix to v850e case for handling + --with-cpu=v850e. + +2002-09-25 David S. Miller + + PR target/7842 + * config/sparc/sparc.c (set_extends): SImode ASHIFT does not + extend. + +2002-09-25 Richard Henderson + + * emit-rtl.c (const_double_htab_eq): Distinguish integer and + fp CONST_DOUBLE; use real_identical. + +2002-09-25 Mark Mitchell + + * doc/invoke.texi: Add more -Wabi examples. + +2002-09-25 Richard Sandiford + + * config/mips/mips.h (TARGET_MIPS4100): Add missing bracket. + +2002-09-24 Denis Chertykov + + * config/ip2k/ip2k.c (function_epilogue): Fix wrong numbers in + cases of optimizing "add sp,w" to "inc sp". + +2002-09-24 Adam Nemet + + * config/arm/arm.c (thumb_unexpanded_epilogue): Don't generate + epilogue for naked functions. + +2002-09-24 Adam Nemet + Nick Clifton + + * config/arm/arm.h (THUMB_FUNCTION_PROFILER): Remove. + (FUNCTION_PROFILER): Only invoke THUMB_FUNCTION_PROFILER if it + is defined. + +2002-09-24 Ulrich Weigand + + * config/s390/s390.c (preferred_la_operand_p): New function. + * config/s390/s390-protos.h (preferred_la_operand_p): Declare it. + * config/s390/s390.md ("addaddr_esame", "*la_ccclobber"): Replace by ... + ("*la_64_cc", "*la_31_cc", splitters): ... these. + ("*la_31"): Deactivate for TARGET_64BIT. + ("*la_31_and", "*la_31_and_cc"): New. + +2002-09-24 Kaveh R. Ghazi + + * real.h (real_value): Make `exp' explicitly signed. + +2002-09-24 Kazu Hirata + + * config/elfos.h: Follow spelling conventions. + * config/alpha/alpha.h: Likewise. + * config/arc/arc.h: Likewise. + * config/arm/arm.md: Likewise. + * config/avr/avr.h: Likewise. + * config/cris/cris.md: Likewise. + * config/d30v/d30v.h: Likewise. + * config/frv/frv.c: Likewise. + * config/frv/frv.h: Likewise. + * config/h8300/h8300.c: Likewise. + * config/h8300/h8300.h: Likewise. + * config/h8300/h8300.md: Likewise. + * config/i386/cygwin.h: Likewise. + * config/i386/i386.h: Likewise. + * config/i386/sysv3.h: Likewise. + * config/i960/i960.h: Likewise. + * config/ia64/ia64.h: Likewise. + * config/ia64/ia64.md: Likewise. + * config/ip2k/ip2k.h: Likewise. + * config/m32r/m32r.h: Likewise. + * config/m68k/m68k.h: Likewise. + * config/m88k/m88k.h: Likewise. + * config/mcore/mcore.c: Likewise. + * config/mcore/mcore.h: Likewise. + * config/mcore/mcore.md: Likewise. + * config/mips/mips.h: Likewise. + * config/mmix/mmix.h: Likewise. + * config/mmix/mmix.md: Likewise. + * config/ns32k/netbsd.h: Likewise. + * config/ns32k/ns32k.h: Likewise. + * config/ns32k/ns32k.md: Likewise. + * config/pa/pa.h: Likewise. + * config/romp/romp.h: Likewise. + * config/rs6000/rs6000.h: Likewise. + * config/rs6000/rs6000.md: Likewise. + * config/sparc/sparc.h: Likewise. + * config/stormy16/stormy-abi: Likewise. + * config/stormy16/stormy16.h: Likewise. + * config/vax/vax.h: Likewise. + +2002-09-23 Zack Weinberg + + * version.c (version_string): Now const char[]. + * version.h: Update to match. + +2002-09-23 Richard Henderson + + * config/i386/i386.h (MASK_ACCUMULATE_OUTGOING_ARGS_SET, MASK_MMX_SET, + MASK_SSE_SET, MASK_SSE2_SET, MASK_3DNOW_SET, MASK_3DNOW_A_SET): Kill. + (TARGET_SWITCHES): Don't reference them. + * config/i386/i386.c (override_options): Use target_flags_explicit + to examine bits set by the user. + +2002-09-23 Dale Johannesen + + * dbxout.c (dbxout_parms): Set current_sym_code for params + passed on stack by invisible reference. + +2002-09-23 Richard Earnshaw + + * arm/unknown-elf.h (ASM_OUTPUT_ALIGNED_DECL_LOCAL): Always allocate + at least one byte of space. + +2002-09-23 Mark Mitchell + + * c-common.h (flag_abi_version): Fix typo in comment. + * doc/invoke.texi (flag_abi_version): Document default value. + +2002-09-23 Hans-Peter Nilsson + + * doc/extend.texi (Extended Asm): Clarify that overlap between + asm-declared register variables used in an asm and the asm clobber + list is not allowed. + * stmt.c (decl_conflicts_with_clobbers_p): New function. + (expand_asm_operands): Keep track of clobbered registers. Call + decl_conflicts_with_clobbers_p for each input and output operand. + If no conflicts found before, also do conflict sanity check when + emitting clobbers. + +2002-09-23 Richard Henderson + + * c-common.c (cpp_define_data_format): Remove. + (cb_register_builtins): Don't define __WCHAR_BIT__, __SHRT_BIT__, + __INT_BIT__, __LONG_BIT__, __LONG_LONG_BIT__, __FLOAT_BIT__, + __DOUBLE_BIT__, __LONG_DOUBLE_BIT__. + * doc/cpp.texi: Don't document them either. + (__SCHAR_MAX__, __SHRT_MAX__, __INT_MAX__, __LONG_MAX__, + __LONG_LONG_MAX__): Document. + (__TARGET_FLOAT_FORMAT__): Remove. + +2002-09-23 Richard Henderson + + * real.c (do_multiply): Normalize U before addition. + +2002-09-23 Mark Mitchell + + * c-common.c (flag_abi_version): New variable. + * c-common.h (flag_abi_version): Declare it. + * c-opts.c (missing_arg): Add -fabi-version. + (c_common_decode_option): Process -fabi-version. + * doc/invoke.texi (-fabi-version): Document it. + (-Wabi): Add information about bit-fields in unions. + +2002-09-22 Jason Thorpe + + * config/mips/netbsd.h (SUBTARGET_ASM_SPEC): Always pass -KPIC + unless -fno-pic or -fno-PIC is specified. + +2002-09-22 John David Anglin + + * c-common.c (preprocessing_trad_p): Define. + * pa-hiux.h, pa-hpux.h, pa-hpux7.h (CPP_PREDEFINES): Delete. + (TARGET_OS_CPP_BUILTINS, SUBTARGET_SWITCHES): Define. + * pa-hpux10.h (TARGET_OS_CPP_BUILTINS, CPP_SPEC): Define. + * pa-hpux11.h (TARGET_OS_CPP_BUILTINS): Define. + * pa-linux.h (CPP_PREDEFINES): Delete. + (TARGET_OS_CPP_BUILTINS, CPP_SPEC): Define. + * pa32-linux.h, pa64-linux.h (CPP_SPEC): Delete. + * pa-osf.h, pa-pro-end.h, rtems.h (CPP_PREDEFINES): Delete. + (TARGET_OS_CPP_BUILTINS): Define. + * pa.h (MASK_SIO, TARGET_SIO, TARGET_PA_10): Define. + (TARGET_SWITCHES): Reformat. Use N_() macro. Add SUBTARGET_SWITCHES. + (SUBTARGET_SWITCHES): Provide default definition. + (TARGET_OPTIONS): Reformat. Use N_() macro. + (CPP_PA10_SPEC, CPP_PA11_SPEC, CPP_PA20_SPEC, CPP_64BIT_SPEC, + CPP_CPU_DEFAULT_SPEC, CPP_64BIT_DEFAULT_SPEC, SUBTARGET_EXTRA_SPECS, + EXTRA_SPECS, CPP_SPEC, CPLUSPLUS_CPP_SPEC, CPP_PREDEFINES): Delete. + (TARGET_CPU_CPP_BUILTINS): Define. + (TARGET_OS_CPP_BUILTINS): Define for BSD-like systems. + * doc/invoke.texi (msio, mwsio): Document new hppa options. + * doc/tm.texi (TARGET_CPU_CPP_BUILTINS): Document macro + preprocessing_trad_p(). + +2002-09-22 Jason Thorpe + + * doc/install.texi: Document behavior of --with-headers and + --with-libs when arguments are omitted. + +2002-09-22 Kazu Hirata + + * dbxout.c: Follow spelling conventions. + * defaults.h: Likewise. + * df.c: Likewise. + * diagnostic.h: Likewise. + * doloop.c: Likewise. + * dwarf2out.c: Likewise. + * dwarfout.c: Likewise. + * emit-rtl.c: Likewise. + * except.c: Likewise. + * explow.c: Likewise. + * expmed.c: Likewise. + * expr.c: Likewise. + * expr.h: Likewise. + * flags.h: Likewise. + * flow.c: Likewise. + * fold-const.c: Likewise. + * function.c: Likewise. + * function.h: Likewise. + * gcc.c: Likewise. + * gcov-io.h: Likewise. + * gcov.c: Likewise. + * gcse.c: Likewise. + * genattrtab.c: Likewise. + * genconfig.c: Likewise. + * genrecog.c: Likewise. + * ggc-page.c: Likewise. + * ggc.h: Likewise. + * global.c: Likewise. + * gthr-win32.h: Likewise. + * integrate.c: Likewise. + * jump.c: Likewise. + * langhooks.c: Likewise. + * langhooks.h: Likewise. + * line-map.h: Likewise. + * local-alloc.c: Likewise. + * longlong.h: Likewise. + * loop.c: Likewise. + * loop.h: Likewise. + +2002-08-27 Jan Hubicka + + * i386.h (BIGGEST_FIELD_ALIGNMENT): Set proper default for x86_64. + +2002-08-27 Jan Hubicka + + * i386.c (overwrite_options): Set -mpreferred-stack-boundary to 128 + for -Os/TARGET_64BIT too. + +2002-09-21 Kazu Hirata + + * ChangeLog: Follow spelling conventions. + * ChangeLog.0: Likewise. + * ChangeLog.1: Likewise. + * ChangeLog.2: Likewise. + * ChangeLog.3: Likewise. + * ChangeLog.4: Likewise. + * ChangeLog.5: Likewise. + * ChangeLog.6: Likewise. + * FSFChangeLog.10: Likewise. + * FSFChangeLog.11: Likewise. + * alias.c: Likewise. + * basic-block.h: Likewise. + * c-aux-info.c: Likewise. + * c-common.c: Likewise. + * c-common.h: Likewise. + * c-decl.c: Likewise. + * c-format.c: Likewise. + * c-semantics.c: Likewise. + * c-typeck.c: Likewise. + * calls.c: Likewise. + * cfganal.c: Likewise. + * cfgloop.c: Likewise. + * collect2.c: Likewise. + * combine.c: Likewise. + * conflict.c: Likewise. + * cppexp.c: Likewise. + * cppfiles.c: Likewise. + * cpphash.h: Likewise. + * cppinit.c: Likewise. + * cpplex.c: Likewise. + * cpplib.c: Likewise. + * cpplib.h: Likewise. + * cppmacro.c: Likewise. + * cse.c: Likewise. + +2002-09-21 Richard Earnshaw + + * netbsd-aout.h (NETBSD_LINK_SPEC_AOUT): New, takes old definition of + LINK_SPEC. + (LINK_SPEC): Define to NETBSD_LINK_SPEC_AOUT. + * arm/netbsd.h (SUBTARGET_EXTRA_SEPCS): Add NETBSD_LINK_SPEC_AOUT. + (LINK_SPEC): Rework to use NETBSD_LINK_SPEC_AOUT). + +2002-09-21 Richard Earnshaw + + PR opt/7930 + * cse.c (fold_rtx): Calculate old_cost before we fold each + operand. + +2002-09-21 Richard Henderson + + * c-common.c (cpp_define_data_format): Remove __GCC_LITTLE_ENDIAN__, + __GCC_BIG_ENDIAN__, __TARGET_BITS_ORDER__, __TARGET_BYTES_ORDER__, + __TARGET_INT_WORDS_ORDER__, __TARGET_FLOAT_WORDS_ORDER__, + __TARGET_USES_VAX_F_FLOAT__, __TARGET_USES_VAX_D_FLOAT__, + __TARGET_USES_VAX_G_FLOAT__, __TARGET_USES_VAX_H_FLOAT__. + * doc/cpp.texi: Don't document them. + +2002-09-21 Richard Henderson + + * c-common.c (builtin_define_float_constants): Use real_format + to get the floating-point parameters. + +2002-09-21 Richard Henderson + + * real.c (struct real_format): Move to real.h. + (real_format_for_mode): Rename from fmt_for_mode; update all users; + initialize with ieee defaults. + (real_to_target_fmt, real_from_target_fmt): New. + (ieee_single_format, ieee_double_format, ieee_extended_motorola_format, + ieee_extended_intel_96_format, ieee_extended_intel_128_format, + ieee_quad_format, i370_single_format, i370_double_format, + c4x_single_format, c4x_extended_format): Rename from s/_format//. + (ieee_quad_format): Fix emin. + (format_for_size, init_real_once): Remove. + * real.h (struct real_format): Move from real.c. + (real_format_for_mode): Declare. + (real_to_target_fmt, real_from_target_fmt): Declare. + (ieee_single_format, ieee_double_format, ieee_extended_motorola_format, + ieee_extended_intel_96_format, ieee_extended_intel_128_format, + ieee_quad_format, vax_f_format, vax_d_format, vax_g_format, + i370_single_format, i370_double_format, c4x_single_format, + c4x_extended_format): Declare. + * toplev.c (do_compile): Don't call init_real_once. + + * defaults.h (INTEL_EXTENDED_IEEE_FORMAT): Remove. + * doc/tm.texi (INTEL_EXTENDED_IEEE_FORMAT): Remove. + + * config/alpha/alpha.h (TARGET_FLOAT_FORMAT): Define. + * config/alpha/osf5.h (LONG_DOUBLE_TYPE_SIZE): 64, if vax mode. + * config/alpha/alpha.c (override_options): Set real_format_for_mode + for VAX, if enabled. + + * config/c4x/c4x.c (c4x_override_options): Set real_format_for_mode + for C4X. + + * config/i370/i370.h (OVERRIDE_OPTIONS): New. + * config/i370/i370.c (override_options): New. + * config/i370/i370-protos.h: Update. + + * config/i386/i386.c (override_options): Set real_format_for_mode + for Intel 80-bit extended. + * config/i386/i386.h (INTEL_EXTENDED_IEEE_FORMAT): Remove. + + * config/i960/i960.h (LONG_DOUBLE_TYPE_SIZE): Mind -mlong-double-64. + (OVERRIDE_OPTIONS): Move code... + * config/i960/i960.c (i960_initialize): ... here. Set + real_format_for_mode for Intel 80-bit extended. + + * config/ia64/ia64.c (ia64_override_options): Set real_format_for_mode + for Intel 80-bit extended, if enabled. + + * config/m68k/m68k.c (override_options): Set real_format_for_mode + for Motorola 96-bit extended. + + * config/vax/vax.h (OVERRIDE_OPTIONS): New. + * config/vax/vax.c (override_options): New. + * config/vax/vax-protos.h: Update. + +2002-09-21 Alan Modra + + * config/rs6000/rs6000.md (builtin_setjmp_receiver): Add + #if TARGET_MACHO. + + * config/rs6000/rs6000.md (floatdisf2_internal2): Combine + insns. Supply missing clobber of scratch reg. + +2002-09-20 Kazu Hirata + + * config/m32r/m32r.c: Follow spelling conventions. + * config/m32r/m32r.h: Likewise. + * config/m32r/m32r.md: Likewise. + * config/m68k/m68k.c: Likewise. + * config/m88k/m88k.c: Likewise. + * config/mcore/mcore.c: Likewise. + * config/mips/mips.c: Likewise. + * config/mips/mips.h: Likewise. + * config/mmix/mmix.c: Likewise. + * config/mn10200/mn10200.c: Likewise. + * config/ns32k/ns32k.h: Likewise. + * config/pa/pa.c: Likewise. + * config/pa/pa64-linux.h: Likewise. + * config/pdp11/pdp11.h: Likewise. + * config/romp/romp.c: Likewise. + * config/romp/romp.h: Likewise. + * config/rs6000/eabi.asm: Likewise. + * config/rs6000/linux64.h: Likewise. + * config/rs6000/rs6000.c: Likewise. + * config/rs6000/rs6000.h: Likewise. + * config/rs6000/rs6000.md: Likewise. + * config/rs6000/sysv4.h: Likewise. + * config/rs6000/xcoff.h: Likewise. + +2002-09-20 Jim Wilson + + * config/v850/v850/lib1funcs.asm (__muldi3): Change r5 to r28. + +2002-09-20 Jakub Jelinek + + * config/i386/i386.md (UNSPEC_GOTNTPOFF, UNSPEC_INDNTPOFF): New. + * config/i386/i386.c (legitimate_pic_address_disp_p): Handle + UNSPEC_GOTNTPOFF and UNSPEC_INDNTPOFF like UNSPEC_GOTTPOFF. + (legitimate_address_p): Likewise. + (legitimize_address): Use @gotntpoff and @indntpoff. + (output_pic_addr_const): Handle UNSPEC_GOTNTPOFF and UNSPEC_INDNTPOFF. + (output_addr_const_extra): Likewise. + +2002-09-20 Jim Wilson + + * combine.c (try_combine): When split an instruction pair, where the + first has a sign_extend src, verify that the src and dest modes match. + +2002-09-20 Richard Henderson + + * config/mips/mips.c (dfhigh, dflow, sfhigh, sflow): Remove. + (override_options): Do not initialize them. + (mips_const_double_ok): Allow no fp constants except zero, + and not even that for mips16. + (const_float_1_operand): Use dconst1. + * config/mips/mips.md (movsf, movsf_internal1, movsf_internal2, + movdf, movdf_internal1, movdf_internal1a, movdf_internal2): + Don't allow arbitrary constants; fix predicates and C constraint. + +2002-09-20 Neil Booth + + * cppmacro.c: Don't warn about function-like macros without + '(' during pre-expansion. + +2002-09-20 Jim Wilson + + * config/v850/v850.c (current_function_anonymous_args): Delete. + (expand_prologue): Use current_function_args_info.anonymous_args. + (expand_epilogue): Delete use of current_function_anonymous_args. + * config/v850/v850.h (struct cum_arg): Add anonymous_args field. + (INIT_CUMULATIVE_ARGS): Clear anonymous_args field. + (current_function_anonymous_args): Delete extern declaration. + (SETUP_INCOMING_VARARGS): Set anonymous_args field. + +2002-09-20 Geoffrey Keating + + * config/rs6000/rs6000.c (rs6000_emit_prologue): Update for change + to load_macho_picbase. + * config/rs6000/rs6000.md: Document Darwin-specific unspec IDs. + (load_macho_picbase): Take the symbol to use as a parameter. + (macho_correct_pic): New insn. + (builtin_setjmp_reciever): On Darwin, restore the PIC register. + + * config/rs6000/rs6000.h (ELIMINABLE_REGS): Use + RS6000_PIC_OFFSET_TABLE_REGNUM rather than hardcoding 30. + (CAN_ELIMINATE): Likewise. + (INITIAL_ELIMINATION_OFFSET): Likewise. + (TOC_REGISTER): Likewise. + +2002-09-20 Richard Henderson + + * real.c (real_hash): New. + * real.h: Declare it. + * cse.c (canon_hash): Use it. + * cselib.c (hash_rtx): Likewise. + * emit-rtl.c (const_double_htab_hash): Likewise. + * rtl.h (CONST_DOUBLE_REAL_VALUE): New. + * varasm.c (struct rtx_const): Reduce vector size; separate + integer and fp vectors. + (HASHBITS): Remove. + (const_hash_1): Rename from const_hash. Use real_hash. Do not + take modulus MAX_HASH_TABLE. + (const_hash): New. Do take modulus MAX_HASH_TABLE. + (output_constant_def): Do not take modulus MAX_HASH_TABLE. + (SYMHASH): Don't use HASHBITS. + (decode_rtx_const): Copy only active bits from REAL_VALUE_TYPE. + Fix CONST_VECTOR thinko wrt fp vectors. Fix kind comparison. + (simplify_subtraction): Fix kind comparison. + (const_hash_rtx): Return unsigned int. Don't use HASHBITS. + Use a union to pun integer array. + * config/rs6000/rs6000.c (rs6000_hash_constant): Use real_hash; + only hash two words of integral CONST_DOUBLE. + +2002-09-20 Steve Ellcey + + * config/ia64/hpux.h (STARTFILE_SPEC): Modify. + (STARTFILE_PREFIX_SPEC): New. + (LINK_SPEC): Modify. + (LIB_SPEC): Modify. + (LIBGCC_SPEC): New. + +2002-09-20 Jakub Jelinek + + * config/i386/i386.c (legitimate_pic_address_disp_p): Allow + UNSPEC_NTPOFF and UNSPEC_DTPOFF to be offsetted by constant. + +2002-09-20 Jeroen Dobbelaere + + * config/arm/arm.md (sign_extract_onebit, not_signextract_onebit): + Add clobber of the condition code register. + +2002-09-20 Richard Henderson + + * real.c (do_fix_trunc): Static. + (encode_ieee_single, encode_ieee_double, encode_ieee_extended, + encode_ieee_quad, encode_vax_f, encode_vax_d, encode_vax_g, + encode_i370_single, encode_i370_double, encode_c4x_single, + encode_c4x_extended): Add default abort case. + +2002-09-20 Richard Henderson + + * real.h (enum real_value_class, SIGNIFICAND_BITS, EXP_BITS, + MAX_EXP, SIGSZ, SIG_MSB, struct real_value): Move from real.c. + (struct realvaluetype): Remove. + (REAL_VALUE_TYPE): Use struct real_value. + (REAL_VALUE_TYPE_SIZE): Use SIGNIFICAND_BITS. + (test_real_width): New. + * real.c: Global replace struct real_value with REAL_VALUE_TYPE. + (real_arithmetic): Avoid hoops for REAL_VALUE_TYPE parameters. + (real_compare, real_exponent, real_ldexp, real_isinf, real_isnan, + real_isneg, real_isnegzero, real_identical, exact_real_inverse, + real_to_integer, real_to_integer2, real_to_decimal, + real_to_hexadecimal, real_from_string, real_from_integer, + real_inf, real_nan, real_2expN, real_convert, real_to_target, + real_from_target): Likewise. + * tree.h (struct tree_real_cst): Use real_value not realvaluetype. + * gengtype-yacc.y (bitfieldopt): Accept an ID as well. + +2002-09-20 Richard Henderson + + * real.h (UNKNOWN_FLOAT_FORMAT, IEEE_FLOAT_FORMAT, VAX_FLOAT_FORMAT, + IBM_FLOAT_FORMAT, C4X_FLOAT_FORMAT, TARGET_FLOAT_FORMAT): Move ... + * defaults.h: ... here. + * config/arm/arm.h, config/avr/avr.h, config/d30v/d30v.h, + config/fr30/fr30.h, config/frv/frv.h, config/ia64/ia64.h, + config/ip2k/ip2k.h, config/mips/mips.h, config/stormy16/stormy16.h, + config/xtensa/xtensa.h (TARGET_FLOAT_FORMAT): Remove. + +2002-09-20 Hans-Peter Nilsson + + * config/mmix/mmix.md ("negdf2"): Rewrite. + ("*expanded_negdf2"): New. + +2002-09-19 Jim Wilson + + * combine.c (simplify_set): When optimizing a subreg src with a + cc0 dest, use GET_MODE (src) for mask instead of inner_mode. + +2002-09-19 Dale Johannesen + * combine.c (make_extraction): Don't create + invalid subreg. + +2002-09-19 Ulrich Weigand + + * config/s390/s390.c (addr_generation_dependency_p): Handle SUBREG + and STRICT_LOW_PART within SET_DEST. + * config/s390/s390.md ("*extractqi", "*extracthi"): New insns with + splitters, replacing pre-reload splitters. + ("*zero_extendhisi2_31", "*zero_extendqisi2_31", + "*zero_extendqihi2_31"): New insns. + ("*zero_extendqihi2_64"): Do not clobber CC. + +2002-09-19 Steve Ellcey + + * config/ia64/hpux.h (CTORS_SECTION_ASM_OP): New. + (DTORS_SECTION_ASM_OP): Ditto. + (READONLY_DATA_SECTION_ASM_OP): Moved. + (DATA_SECTION_ASM_OP): New. + (SDATA_SECTION_ASM_OP): New. + (BSS_SECTION_ASM_OP): New. + (SBSS_SECTION_ASM_OP): New. + (TEXT_SECTION_ASM_OP): New. + +2002-09-19 Kazu Hirata + + * config/fp-bit.c: Follow spelling conventions. + * config/d30v/d30v.c: Likewise. + * config/d30v/d30v.h: Likewise. + * config/fr30/fr30.c: Likewise. + * config/fr30/fr30.h: Likewise. + * config/fr30/fr30.md: Likewise. + * config/frv/frv.c: Likewise. + * config/frv/frv.h: Likewise. + * config/h8300/h8300.c: Likewise. + * config/h8300/lib1funcs.asm: Likewise. + * config/i370/i370.c: Likewise. + * config/i386/i386.h: Likewise. + * config/i386/i386.md: Likewise. + * config/i386/pentium.md: Likewise. + * config/i386/winnt.c: Likewise. + * config/i960/i960.c: Likewise. + * config/ia64/ia64.h: Likewise. + * config/ip2k/ip2k.c: Likewise. + * config/ip2k/ip2k.h: Likewise. + * config/ip2k/ip2k.md: Likewise. + * config/ip2k/libgcc.S: Likewise. + +2002-09-19 Stephen Clarke + + * config/sh/sh.h (UNSPEC_GOTOFF_P): Define. + (GOTOFF_P): Extend to allow gotoff plus constant. + +2002-09-18 Richard Henderson + + * ifcvt.c (noce_process_if_block): Correctly detect X modified + with INSN_B before COND_EARLIEST. Don't check A and B for + modification in condition range. Reorder INSN_B for A==B properly. + (if_convert): Iterate until no matches for a block. + +2002-09-18 Richard Henderson + + * calls.c (store_one_arg): Rename default_align to parm_align; + always adjust parm_align for downward padding. + +2002-09-18 Richard Henderson + + * toplev.c (backend_init): Move init_real_once invocation ... + (do_compile): ... here. + +2002-09-18 Richard Henderson + + * sibcall.c (optimize_sibling_and_tail_recursive_call): Also remove + RTX_UNCHANGING_P markers for successful tail-recursive replacement. + +2002-09-18 Richard Henderson + + * real.c (round_for_format): Collect sticky as unsigned long, not bool. + +2002-09-19 Alan Modra + + * config/rs6000/rs6000.md: (floatdisf2): Rename to + floatdisf2_internal1. + (floatdisf2): New define_expand. + (floatdisf2_internal2): Likewise. + +2002-09-18 Richard Henderson + + * real.c (sticky_rshift_significand): Collect sticky as + unsigned long, not bool. + +2002-09-18 Ulrich Weigand + + * config/s390/s390.c (s390_address_cost): New function. + config/s390/s390-protos.h (s390_address_cost): Add prototype. + config/s390/s390.h (ADDRESS_COST): Call s390_address_cost. + (RTX_COST): Use COSTS_N_INSNS. + +2002-09-18 Douglas Rupp + Donn Terry + + * stor-layout.c (place_field): Handle alignment of whole + structures when MSVC compatible bitfields are involved. + Change method of computing location of MS bitfields to + be compatible with #pragma pack(n). + + * tree.h (record_layout_info): Add new field + remaining_in_alignment. + + * doc/tm.texi: (TARGET_MS_BITFIELD_LAYOUT_P): Update. + (pragma pack): Add paragraph on MSVC bit-field packing. + +2002-09-18 Richard Earnshaw (reanrsha@arm.com) + + PR optimization/7967 + * arm.md (ne_zeroextractsi): Add clobber of the condition code + register. + +2002-09-18 Kazu Hirata + + * config/s390/s390.c: Follow spelling conventions. + * config/sh/lib1funcs.asm: Likewise. + * config/sh/sh.c: Likewise. + * config/sh/sh.h: Likewise. + * config/sparc/sparc.c: Likewise. + * config/sparc/sparc.h: Likewise. + * config/sparc/sparc.md: Likewise. + * config/stormy16/stormy16.c: Likewise. + * config/stormy16/stormy16.h: Likewise. + * config/v850/v850.c: Likewise. + * config/v850/v850.h: Likewise. + * config/vax/vax.c: Likewise. + * config/vax/vax.h: Likewise. + +2002-09-18 Nick Clifton + + * config/rs60000/rs6000.c (rs6000_emit_move): Handle V1DImode moves. + * config/rs60000/rs6000.c (SPE_VECTOR_MODE): Include V1DImode. + * config/rs6000/spe.md (movv1di, movv1di_internal): New patterns. + +2002-09-17 Zack Weinberg + + * ABOUT-GCC-NLS: Remove reference to enquire, and out-of-date + statement that the only translation is to en_UK. + +2002-09-17 Kazu Hirata + + * config/alpha/alpha.c: Follow spelling conventions. + * config/alpha/alpha.h: Likewise. + * config/alpha/alpha.md: Likewise. + * config/arc/arc.h: Likewise. + * config/arm/arm.c: Likewise. + * config/arm/arm.h: Likewise. + * config/arm/arm.md: Likewise. + * config/arm/pe.c: Likewise. + * config/arm/unknown-elf.h: Likewise. + * config/avr/avr.c: Likewise. + * config/avr/avr.h: Likewise. + * config/c4x/c4x.c: Likewise. + * config/cris/cris.c: Likewise. + * config/cris/cris.h: Likewise. + +2002-09-17 Samuel Figueroa + + * final.c (final_scan_insn): Use new macro ASM_OUTPUT_ALIGN_WITH_NOP. + * config/sparc/sparc.h (ASM_OUTPUT_ALIGN_WITH_NOP) New macro. + * doc/tm.texi (ASM_OUTPUT_ALIGN_WITH_NOP) New description. + +2002-09-17 Dale Johannesen + + * cfgcleanup.c (try_forward_edges): Do not forward a + branch to just after a loop exit before loop optimization; + this interfered with doloop detection. + +2002-09-17 Nick Clifton + + * config/arm/arm.c (output_return_instruction): Do not + writeback the stack pointer when it is being loaded. + (arm_output_epilogue): Likewise. + +2002-09-17 Kazu Hirata + + * optabs.c (prepare_cmp_insn): Let emit_library_call_value + generate a pseudo reg that receives the result of a libcall. + (prepare_float_lib_cmp): Likewise. + +2002-09-17 Steve Ellcey + + * config/ia64/elf.h: Remove CPP_PREDEFINES. + +2002-09-17 Nicola Pero + + Fix PR/7014 and related objc bugs: + * c-typeck.c (comp_target_types): Added a reflexive argument. + Pass it to ObjC when/if calling objc_comptypes(). Updated all + callers to provide the appropriate reflexive argument. + * objc/objc-act.c (objc_comptypes): Carefully checked and fixed + typechecking for all cases of comparisons and assignments, + particularly the obscure and less common ones involving protocols. + +2002-09-17 Nick Clifton + + * machmode.def (V1DImode): New mode. A single element vector. + * tree.h (TI_UV1DI_TYPE, TI_V1DI_TYPE): New tree_index enums. + (unsigned_V1DI_type_node, V1D1_type_node): New type nodes. + * tree.c (build_common_tree_nodes_2): Build + unsigned_V1DI_type_node and V1D1_type_node. + * c-common.c (c_common_type_for_mode): Return + unsigned_V1DI_type_node or V1D1_type_node for V1DImode. + * rtl.c (class_narrowest_): Start integer vector nodes with V1DImode. + +2002-09-17 Nicola Pero + + * doc/objc.texi (Constant string objects): Extended documentation + to make clear that the constant string class ivar layout is + completely fixed. + +2002-09-17 Roger Sayle + + * cfgrtl.c (flow_delete_block_noexpunge): Delete orphaned + NOTE_INSN_LOOP_CONT notes when deleting basic blocks. + +2002-09-16 Richard Henderson + + * expr.c (emit_block_move): Set memory block size as appropriate + for the copy. + +2002-09-16 Richard Henderson + + PR fortran/3924 + * sdbout.c (sdbout_symbol): Don't handle offsets from a symbol. + +2002-09-16 Richard Henderson + + * emit-rtl.c (set_mem_attributes_minus_bitpos): Adjust SIZE + as well as OFFSET for BITPOS. + +2002-09-16 Jeff Garzik + + * config.gcc: Treat winchip_c6-*|winchip2-*|c3-* as pentium-mmx. + * config/i386/i386.c (processor_alias_table): Add winchip-c6, + winchip2 and c3. + * doc/invoke.texi: Mention new aliases. + +2002-09-16 John David Anglin + + * calls.c (store_one_arg): Set default alignment for BLKmode arguments + to BITS_PER_UNIT when ARGS_GROW_DOWNWARD and the padding direction is + downward. + * function.c (pad_below): Always compile. + (locate_and_pad_parm): If defined ARGS_GROW_DOWNWARD, pad argument to + alignment when it is not in a register or REG_PARM_STACK_SPACE is true. + Pad below when the argument is not in a register and the padding + direction is downward. + + * pa-64.h (MUST_PASS_IN_STACK): Move define to pa.h. + (PAD_VARARGS_DOWN): Define. + * pa.c (function_arg_padding): Revise padding directions to make them + compatible with the 32 and 64-bit runtime architecture documentation. + (hppa_va_arg): Add code to handle variable and size zero arguments + passed by reference on TARGET_64BIT. Reformat. + (function_arg): Use a PARALLEL for BLKmode and aggregates args on + TARGET_64BIT. Use a DImode PARALLEL for BLKmode args 5 to 8 bytes + wide when !TARGET_64BIT. Move forward check for mode==VOIDmode. + Add comments. + * pa.h (MAX_PARM_BOUNDARY): Correct define for TARGET_64BIT. + (RETURN_IN_MEMORY): Return size zero types in memory. + (FUNCTION_VALUE): Return TFmode in general registers. + (MUST_PASS_IN_STACK): Define. + (FUNCTION_ARG_BOUNDARY): Simplify. + (FUNCTION_ARG_PASS_BY_REFERENCE): Pass variable and zero sized types + by reference. + (FUNCTION_ARG_CALLEE_COPIES): Define to FUNCTION_ARG_PASS_BY_REFERENCE. + +2002-09-16 Richard Henderson + + * real.c (do_fix_trunc): New. + (real_arithmetic): Call it. + * simplify-rtx.c (simplify_unary_operation): Handle FIX + with a floating-point result mode. + +2002-09-16 Richard Henderson + + * builtin-types.def (BT_FN_FLOAT_CONST_STRING): New. + (BT_FN_DOUBLE_CONST_STRING, BT_FN_LONG_DOUBLE_CONST_STRING): New. + * builtins.def (__builtin_nan, __builtin_nanf, __builtin_nanl): New. + (__builtin_nans, __builtin_nansf, __builtin_nansl): New. + * builtins.c (fold_builtin_nan): New. + (fold_builtin): Call it. + * real.c (real_nan): Parse a non-empty string. + (round_for_format): Fix NaN significand truncation. + * real.h (real_nan): Return bool. + * doc/extend.texi: Document new builtins. + +2002-09-16 Jason Merrill + Danny Smith + + * config/i386/winnt.c (ix86_handle_dll_attribute): Set + DECL_EXTERN and TREE_PUBLIC for dllimported variables here... + (i386_pe_mark_dllimport): Not here. + +2002-09-16 Nathan Sidwell + + * c-semantics.c (genrtl_do_stmt): Cope with NULL cond. + +2002-09-16 Geoffrey Keating + + * config/rs6000/rs6000.c (build_mask64_2_operands): Suppress + warnings about unused operands when HOST_BITS_PER_WIDE_INT is + < 64. + (rs6000_emit_cmove): Use real_isinf not target_isinf. + +2002-09-16 Kazu Hirata + + * calls.c (emit_library_call_value_1): Don't refer to + hard_libcall_value. + * optabs.c (prepare_float_lib_cmp): Likewise. + +2002-09-16 Geoffrey Keating + + * ggc-common.c (ggc_mark_rtx_children_1): Update for changed name + mangling. + + The following changes are merged from pch-branch: + + * doc/gty.texi (GTY Options): Document %a. + * gengtype.c (do_scalar_typedef): New function. + (process_gc_options): Handle `length' option. + (set_gc_used_type): A pointer to an array of structures doesn't + qualify as a pointer to a structure. + (output_escaped_param): Add `%a' escape. + (write_gc_structure_fields): Allow 'desc' on array of unions. + (main): Define `uint8', `jword' and `JCF_u2' as scalars; use + do_scalar_typedef. + + * gengtype.c (enum rtx_code): Make global. + (rtx_format): Make global. + (rtx_next): New. + (gen_rtx_next): New. + (write_rtx_next): New. + (adjust_field_rtx_def): Skip fields marked by chain_next. + (open_base_files): Delete redundant prototype. + (write_enum_defn): New. + (output_mangled_typename): Correct abort call. + (write_gc_marker_routine_for_structure): Handle chain_next and + chain_prev options. + (finish_root_table): Don't output redundant \n. + (main): Call gen_rtx_next, write_rtx_next, write_enum_defn. + * c-tree.h (union lang_tree_node): Add chain_next option. + + * gengtype.h (NUM_PARAM): New definition. + (struct type): For TYPE_PARAM_STRUCT, allow multiple parameters. + * gengtype.c (find_param_structure): New. + (adjust_field_type): Handle param_is option. + (process_gc_options): Detect use_params option. Update callers. + (set_gc_used_type): Add 'param' parameter, update callers. Handle + 'use_params' option. + (open_base_files): Add splay-tree.h to list of files included. + (output_mangled_typename): New. + (write_gc_structure_fields): Update 'param' parameter to support + multiple parameters. Change name mangling. Allow parameterized + fields to have an apparent scalar type. Handle param_is options, + use_param option. + (write_gc_marker_routine_for_structure): Update for change to name + mangling. Better guess the output file for parameterized types. + (write_gc_types): Update for change to name mangling. + (write_gc_root): Update for change to name mangling. Handle (ignore) + param_is options. + * doc/gty.texi (GTY Options): Add description of param_is + options, use_params option. + * ggc.h (ggc_mark_rtx): Update for changed name mangling. + * gengtype-lex.l: Produce token for param_is. + * gengtype-yacc.y: Parse param_is. + + * gengtype.c (adjust_field_tree_exp): Don't name a variable 'rindex'. + + * rtl.c: Update comment describing rtx_format. + * rtl.h (union rtunion): Separate definition and typedef. + (struct rtx_def): Use gengtype to mark. + * Makefile.in (gengtype.o): Also depend on rtl.def. + * ggc.h (ggc_mark_rtx_children): Delete prototype. + (ggc_mark_rtx): Change to alias of gengtype-generated routine. + * ggc-common.c (ggc_mark_rtx_children): Delete. + (ggc_mark_rtx_children_1): Delete. + (gt_ggc_m_rtx_def): Delete. + * gengtype.c (adjust_field_rtx_def): New. + (adjust_field_type): Call adjust_field_rtx_def. + (write_gc_structure_fields): Add 'default' case to switch if none + is specified; remove unused code. + + * tree.h (struct tree_exp): Update for change to meaning + of special. + * gengtype.c (adjust_field_tree_exp): New function. + (adjust_field_type): Handle `tree_exp' special here. + (write_gc_structure_fields): Don't handle `tree_exp' special here. + Handle new `dot' option. + + * gengtype.h: Make `info' a pointer-to-const. + * gengtype-yacc.y (yacc_ids): Use xasprintf. + + * gengtype.c (write_gc_structure_fields): Remove implementation + of `always' option, add `default' option. + * doc/gty.texi (GTY Options): Remove documentation of `always', + add `default'. + +2002-09-16 Hans-Peter Nilsson + + * output.h: Remove #ifdef RTX_CODE and #ifdef TREE_CODE. + +2002-09-16 Kaveh R. Ghazi + + * m68hc11.md (addhi_sp): Fix uninitialized variable bug. + + * c4x-c.c, c4x.c, darwin.c, i370-c.c, m32r.c: Include tm_p.h + instead of the *-protos.h file directly. + * t-c4x, t-i370, t-v850: Depend on $(TM_P_H). + * darwin.c (machopic_output_stub): Move prototype ... + * darwin-protos.h (machopic_output_stub): ... here. + * rs6000-protos.h (machopic_output_stub): Don't declare. + +2002-09-16 Richard Henderson + + * c-common.c (builtin_define_float_constants): Emit __FOO_DENORM_MIN__. + +2002-09-16 Richard Henderson + + * real.c, real.h: Rewrite from scratch. + + * Makefile.in (simplify-rtx.o): Depend on TREE_H. + (paranoia): New target. + * builtins.c (fold_builtin_inf): Use new real.h interface. + * c-common.c (builtin_define_with_hex_fp_value): Likewise. + * c-lex.c (interpret_float): Likewise. + * emit-rtl.c (gen_lowpart_common): Likewise. + * optabs.c (expand_float): Use real_2expN. + * config/ia64/ia64.md (divsi3, udivsi3): Likewise. + * defaults.h (INTEL_EXTENDED_IEEE_FORMAT): New. + (FLOAT_WORDS_BIG_ENDIAN): New. + * cse.c (find_comparison_args): Don't pass FLOAT_STORE_FLAG_VALUE + directly to REAL_VALUE_NEGATIVE. + * loop.c (canonicalize_condition): Likewise. + * simplify-rtx.c: Include tree.h. + (simplify_unary_operation): Don't handle FIX and UNSIGNED_FIX + with floating-point result modes. + * toplev.c (backend_init): Call init_real_once. + + * fold-const.c (force_fit_type): Don't call CHECK_FLOAT_VALUE. + * tree.c (build_real): Likewise. + * config/alpha/alpha.c, config/vax/vax.c (float_strings, + float_values, inited_float_values, check_float_value): Remove. + * config/alpha/alpha.h, config/m68hc11/m68hc11.h, + config/m88k/m88k.h, config/vax/vax.h (CHECK_FLOAT_VALUE): Remove. + * doc/tm.texi (CHECK_FLOAT_VALUE): Remove. + (VAX_HALFWORD_ORDER): Remove. + +2002-09-16 Ulrich Weigand + + * config/s390/s390.c: (legitimize_la_operand): Remove, replace by ... + (s390_load_address): ... this new function. + (s390_decompose_address): Allow the argument pointer and all + virtual registers as 'pointer' registers. + (s390_expand_plus_operand): Use s390_load_address. + config/s390/s390.md (movti, movdi, movdf splitters): Likewise. + ("force_la_31"): New insn pattern. + config/s390/s390-protos.h (legitimize_la_operand): Remove. + (s390_load_address): Add prototype. + + * config/s390/s390.c: Include "optabs.h". + (s390_expand_movstr, s390_expand_clrstr, s390_expand_cmpstr): New. + config/s390/s390-protos.h (s390_expand_movstr, s390_expand_clrstr, + s390_expand_cmpstr): Add prototypes. + config/s390/s390.md ("movstrdi", "movstrsi"): Call s390_expand_movstr. + ("movstrdi_short"): Rename to "movstr_short_64". Change predicates + for operands 0 and 1 to "memory_operand". Add type attribute. + ("movstrsi_short"): Rename to "movstr_short_31". Change predicates + for operands 0 and 1 to "memory_operand". Add type attribute. + ("movstrdi_long", "movstrsi_long"): Remove. + ("movstrdi_64"): Rename to "movstr_long_64". Add type attribute. + ("movstrsi_31"): Rename to "movstr_long_31". Add type attribute. + ("clrstrdi", "clrstrsi"): Call s390_expand_clrstr. + ("clrstrsico"): Remove, replace by ... + ("clrstr_short_64", "clrstr_short_31"): ... these new patterns. + ("clrstrsi_64"): Rename to "clrstr_long_64". + ("clrstrsi_31"): Rename to "clrstr_long_31". + ("cmpstrdi", "cmpstrsi"): Call s390_expand_cmpstr. + ("cmpstr_const"): Remove, replace by ... + ("cmpstr_short_64", "cmpstr_short_31"): ... these new patterns. + ("cmpstr_64"): Rename to "cmpstr_long_64". + ("cmpstr_31"): Rename to "cmpstr_long_31". + +2002-09-16 Kazu Hirata + + * ABOUT-NLS: Follow spelling conventions. + * ChangeLog: Likewise. + * ChangeLog.1: Likewise. + * ChangeLog.2: Likewise. + * ChangeLog.3: Likewise. + * ChangeLog.4: Likewise. + * ChangeLog.5: Likewise. + * ChangeLog.6: Likewise. + * FSFChangeLog.10: Likewise. + * FSFChangeLog.11: Likewise. + * c-common.c: Likewise. + * c-lex.c: Likewise. + * c-objc-common.c: Likewise. + * cppexp.c: Likewise. + * cppinit.c: Likewise. + * cpplex.c: Likewise. + * doloop.c: Likewise. + * flow.c: Likewise. + * function.c: Likewise. + * integrate.c: Likewise. + * loop.c: Likewise. + * reg-stack.c: Likewise. + * reload.h: Likewise. + * ssa.c: Likewise. + +2002-09-15 Kazu Hirata + + * ChangeLog: Follow spelling conventions. + * ChangeLog.0: Likewise. + * ChangeLog.1: Likewise. + * ChangeLog.2: Likewise. + * ChangeLog.4: Likewise. + * ChangeLog.6: Likewise. + * config.gcc: Likewise. + * dwarfout.c: Likewise. + * reload1.c: Likewise. + * simplify-rtx.c: Likewise. + * unwind-sjlj.c: Likewise. + * config/avr/avr.h: Likewise. + * config/d30v/d30v.h: Likewise. + * config/frv/frv.c: Likewise. + * config/frv/frv.h: Likewise. + * config/ip2k/ip2k.h: Likewise. + * config/m88k/m88k-move.sh: Likewise. + * config/stormy16/stormy16.c: Likewise. + * config/stormy16/stormy16.h: Likewise. + * doc/extend.texi: Likewise. + * doc/interface.texi: Likewise. + * doc/invoke.texi: Likewise. + * doc/md.texi: Likewise. + * doc/rtl.texi: Likewise. + * doc/tm.texi: Likewise. + * doc/trouble.texi: Likewise. + * ginclude/float.h: Likewise. + * treelang/treelang.texi: Likewise. + +2002-09-15 Kaveh R. Ghazi + + * i386-protos.h (i386_pe_dllexport_name_p, + i386_pe_dllimport_name_p, i386_pe_unique_section, + i386_pe_declare_function_type, i386_pe_record_external_function, + i386_pe_record_exported_symbol, i386_pe_asm_file_end): Add + prototype. + * i386/t-cygwin (winnt.o): Depend on $(TM_P_H). + * i386/t-interix (winnt.o): Likewise. + + * v850-protos.h (v850_output_addr_const_extra): Prototype. + +2002-09-15 Jason Thorpe + + * config/mips/netbsd.h (TARGET_OS_CPP_BUILTINS): Add + MIPS ABI CPP macros. + (TARGET_CPU_CPP_BUILTINS): Redefine. + (SUBTARGET_EXTRA_SPECS): Remove subtarget_endian_default. + (SUBTARGET_ENDIAN_DEFAULT_SPEC): Remove. + +2002-09-15 Kaveh R. Ghazi + + * ia64/aix.h (TARGET_OS_CPP_BUILTINS): Fix typo. + +2002-09-15 Kazu Hirata + + * ChangeLog: Follow spelling conventions. + * ChangeLog.0: Likewise. + * ChangeLog.1: Likewise. + * ChangeLog.2: Likewise. + * ChangeLog.3: Likewise. + * ChangeLog.4: Likewise. + * ChangeLog.5: Likewise. + * ChangeLog.6: Likewise. + * FSFChangeLog.10: Likewise. + * FSFChangeLog.11: Likewise. + * c-common.c: Likewise. + * c-common.h: Likewise. + * c-format.c: Likewise. + * c-opts.c: Likewise. + * cpplib.c: Likewise. + * langhooks.h: Likewise. + * real.c: Likewise. + * reg-stack.c: Likewise. + * toplev.c: Likewise. + * config/arm/arm.c: Likewise. + * config/arm/arm.md: Likewise. + * config/arm/linux-gas.h: Likewise. + * config/arm/netbsd.h: Likewise. + * config/c4x/c4x.c: Likewise. + * config/c4x/c4x.h: Likewise. + * config/c4x/c4x.md: Likewise. + * config/c4x/libgcc.S: Likewise. + * config/fr30/fr30.md: Likewise. + * config/frv/frv.md: Likewise. + * config/ia64/ia64.md: Likewise. + * config/mips/mips.h: Likewise. + * config/mn10300/mn10300.c: Likewise. + * config/stormy16/stormy16.c: Likewise. + * config/v850/v850.md: Likewise. + * doc/extend.texi: Likewise. + * doc/invoke.texi: Likewise. + * doc/md.texi: Likewise. + +2002-09-15 Jason Thorpe + + * config/netbsd.h (LIB_SPEC): Include the appropriate pthread + library if -pthread is specified. + +2002-09-15 Jason Thorpe + + * config.gcc (*-*-netbsd*): Set thread_file to 'posix' + for --enable-threads=yes and --enable-threads=posix. + +2002-09-15 Kazu Hirata + + * config/sparc/cypress.md: Replace Sparc with SPARC. + * config/sparc/freebsd.h: Likewise. + * config/sparc/gmon-sol2.c: Likewise. + * config/sparc/hypersparc.md: Likewise. + * config/sparc/lb1spc.asm: Likewise. + * config/sparc/lb1spl.asm: Likewise. + * config/sparc/linux.h: Likewise. + * config/sparc/linux64.h: Likewise. + * config/sparc/lynx.h: Likewise. + * config/sparc/sol2.h: Likewise. + * config/sparc/sparc-modes.def: Likewise. + * config/sparc/sparc.c: Likewise. + * config/sparc/sparc.h: Likewise. + * config/sparc/sparc.md: Likewise. + * config/sparc/sparclet.md: Likewise. + * config/sparc/supersparc.md: Likewise. + * config/sparc/sysv4.h: Likewise. + * config/sparc/vxsim.h: Likewise. + * config/sparc/vxsparc64.h: Likewise. + +2002-09-14 Marek Michalkiewicz + + * config/avr/avr.c (output.h): Move after inclusion of tree.h. + +2002-09-14 Kazu Hirata + + * ChangeLog: Follow spelling conventions. + * ChangeLog.0: Likewise. + * ChangeLog.2: Likewise. + * ChangeLog.3: Likewise. + * ChangeLog.4: Likewise. + * ChangeLog.5: Likewise. + * ChangeLog.6: Likewise. + * cppfiles.c: Likewise. + * cppinit.c: Likewise. + * cpplib.h: Likewise. + * cse.c: Likewise. + * debug.h: Likewise. + * df.c: Likewise. + * dominance.c: Likewise. + * hashtable.c: Likewise. + * hashtable.h: Likewise. + * loop.c: Likewise. + * config/arm/README-interworking: Likewise. + * config/arm/arm.c: Likewise. + * config/arm/arm.h: Likewise. + * config/arm/arm.md: Likewise. + * config/dsp16xx/dsp16xx.h: Likewise. + * config/frv/frv.c: Likewise. + * config/frv/frv.h: Likewise. + * config/ip2k/ip2k.h: Likewise. + * config/rs6000/rs6000.c: Likewise. + * config/stormy16/stormy-abi: Likewise. + * config/stormy16/stormy16.h: Likewise. + * config/v850/v850.c: Likewise. + +2002-09-14 Kazu Hirata + + * loop.c: Fix a comment typo. + +2002-09-14 Kazu Hirata + + * config/fr30/fr30.h: Fix comment typos. + * config/frv/frv.c: Likewise. + * config/i386/xmmintrin.h: Likewise. + * config/mips/mips.c: Likewise. + * config/sh/sh.c: Likewise. + +2002-09-14 Kazu Hirata + + * haifa-sched.c: Follow spelling conventions. + * regclass.c: Likewise. + * regrename.c: Likewise. + * config/fp-bit.c: Likewise. + * config/frv/frv.h: Likewise. + * config/m88k/m88k.c: Likewise. + * config/mcore/mcore.c: Likewise. + * config/rs6000/darwin.h: Likewise. + * config/rs6000/gnu.h: Likewise. + * config/rs6000/linux.h: Likewise. + * config/rs6000/linux64.h: Likewise. + * config/rs6000/rs6000.c: Likewise. + * config/rs6000/rs6000.h: Likewise. + * config/sh/sh.c: Likewise. + * config/sparc/sparc.c: Likewise. + * config/sparc/ultra1_2.md: Likewise. + +2002-09-14 Stephane Carrez + + * config/m68hc11/m68hc11.md ("movdi_internal"): Allow any offsetable + memory operand when source is 0 (K constraint). + ("movsi_internal"): Likewise. + ("movdf_internal"): Likewise. + ("movsf_internal"): Likewise. + +2002-09-14 Alan Modra + + * config/rs6000/rs6000.c (rs6000_elf_encode_section_info): Use + targetm.binds_local_p to set SYMBOL_REF_FLAG. + (rs6000_xcoff_encode_section_info): Likewise. + * config/rs6000/xcoff.h (ASM_DECLARE_FUNCTION_NAME): Likewise. + +2002-09-10 Theodore A. Roth + + * gcc/config/avr/avr.h: Set default options for C++ for avr. + +2002-09-13 Richard Henderson + + * Makefile.in (toplev.o): Depend on real.h. + (print-rtl.o, varasm.o, ifcvt.o): Likewise. + +2002-09-14 Alan Modra + + * doc/tm.texi (DBX_OUTPUT_NFUN): Describe. + * dbxout.c (dbxout_function_end): Use DBX_OUTPUT_NFUN. + * config/rs6000/linux64.h (DBX_OUTPUT_NFUN): Define. + +2002-09-13 Nathan Sidwell + + * ggc-common.c (ggc_mark_roots): Don't iterate NULL hash tables. + +2002-09-13 Steve Ellcey + + * config.gcc (ia64*-*-aix*, ia64*-*-elf*, ia64*-*-freebsd*, + ia64*-*-linux*): Set extra_parts. + * config/ia64/t-aix (EXTRA_PARTS): Remove. + * config/ia64/t-ia64 (EXTRA_PARTS): Remove. + +2002-09-13 Kazu Hirata + + * config/h8300/fixunssfsi.c: Replace H8/S with H8S. + * config/h8300/h8300.c: Likewise. + * config/h8300/h8300.h: Likewise. + * config/h8300/h8300.md: Likewise. + * doc/invoke.texi: Likewise. + +2002-09-13 Kazu Hirata + + * config/h8300/h8300.c (h8300_init_once): Fix formatting. + +2002-09-13 Richard Henderson + + * config/alpha/alpha.md (attr type): Add callpal. + (imb, trap, load_tp, set_tp): Use it. + * config/alpha/ev4.md (ev4_callpal): New. + * config/alpha/ev5.md (ev5_callpal): New. + * config/alpha/ev6.md (ev6_ibr): Handle callpal. + * config/alpha/alpha.c (alphaev4_insn_pipe): Handle TYPE_CALLPAL. + (alphaev5_insn_pipe): Likewise. + +2002-09-13 Andreas Jaeger + + * Makefile.in (print-rtl.o): Depend on CONFIG_H. + +2002-09-13 Steve Ellcey + + * config/ia64/t-hpux (LIBGCC1_TEST, STMP_FIXPROTO, + LIB2ADDEH): New, set to NULL. + (SHLIB_EXT, SHLIB_LINK, SHLIB_INSTALL, SHLIB_MKMAP): New. + +2002-09-13 Steve Ellcey + + * config/ia64/quadlib.c (_U_Qfcmp): Make extern. + (_U_Qfcnvfxt_quad_to_sgl): Remove declaration. + (_U_Qfeq, _U_Qfne, _U_Qfgt, _U_Qfge, U_Qflt, U_Qfle, _U_Qfcomp): + Add declarations. + (_U_Qfneg): Remove. + +2002-09-13 Dhananjay Deshpande + + * config/h8300/h8300.h (EIGHTBIT_CONSTANT_ADDRESS_P): Add support + for H8/300, H8S aa:8 mode. + (TINY_CONSTANT_ADDRESS_P): Add support for H8S aa:16 mode. + * config/h8300/h8300.c (h8300_adjust_insn_length): Adjust length + for H8/300 aa:8 mode. + +2002-09-13 Hartmut Penner + + * config/s390/s390.md ("trap", "conditional_trap", "*trap"): New + insns. + +2002-09-12 Richard Henderson + + * Makefile.in (HOST_PRINT): Use print-rtl1.o + (print-rtl.o): Don't define GENERATOR_FILE. + (print-rtl1.o): Rename from $(BUILD_PREFIX_1)print-rtl.o. + * print-rtl.c (print_rtx): Include CONST_DOUBLE fp decimal output + unless GENERATOR_FILE. + +2002-09-12 Stan Shebs + + * config/darwin.h (USER_LABEL_PREFIX): Define here... + * config/i386/darwin.h: ... instead of here. + + * target.h (struct gcc_target): New field + terminate_dw2_eh_frame_info. + * target-def.h (TARGET_TERMINATE_DW2_EH_FRAME_INFO): Define. + (TARGET_INITIALIZER): Add it. + * dwarf2out.c (output_call_frame_info): Use target hook. + * dwarf2asm.c (dw2_asm_output_delta): Use macro + ASM_OUTPUT_DWARF_DELTA if defined. + * doc/tm.texi (TARGET_TERMINATE_DW2_EH_FRAME_INFO): Document. + (ASM_OUTPUT_DWARF_DELTA): Ditto. + (ASM_OUTPUT_DWARF_OFFSET): Ditto. + (ASM_OUTPUT_DWARF_PCREL): Ditto. + * config.gcc (i[34567]86-*-darwin*): Define extra_parts. + (powerpc-*-darwin*): Ditto. + * crtstuff.c [OBJECT_FORMAT_MACHO]: Update the Mach-O bits + to work correctly for Darwin. + * config/darwin.h (OBJECT_FORMAT_MACHO): Define. + (STARTFILE_SPEC): Add crtbegin.o. + (ENDFILE_SPEC): Define. + (EXTRA_SECTION_FUNCTIONS): Put gcc_except_tab in data segment. + (ASM_PREFERRED_EH_DATA_FORMAT): Handle more cases. + (ASM_OUTPUT_DWARF_DELTA): Define. + (TARGET_TERMINATE_DW2_EH_FRAME_INFO): Define. + * config/darwin.c (darwin_asm_output_dwarf_delta): New function. + +2002-09-13 Alan Modra + + * config/rs6000/rs6000.c (rs6000_emit_load_toc_table): Remove "if" + nesting. Correct test for non-PowerPC64 ELF ABI_AIX. + * config/rs6000/rs6000.md (load_toc_v4_PIC*): Disable when ABI_AIX. + +2002-09-12 Zack Weinberg + + * toplev.c: Move default definition of USER_LABEL_PREFIX... + * defaults.h: ... here. + +2002-09-12 Richard Henderson + + * vax.c: Include tree.h earlier. + +2002-09-12 Stan Shebs + + * config/darwin.c (machopic_finish): Remove #if 0 chunks. + (machopic_operand_p): Ditto. + +2002-09-12 Kazu Hirata + + * config/arm/arm.c (arm_compute_initial_elimination_offset): + Fix a comment typo. + +2002-09-12 Kazu Hirata + + * toplev.c (do_abort): Fix a comment typo. + +2002-09-12 Kazu Hirata + + * cselib.c: Fix comment formatting. + * gengtype.c: Likewise. + +2002-09-12 Kazu Hirata + + * config/h8300/h8300.md (udivmodqi4): Do not use an expander. + (udivmodhi4): Likewise. + +2002-09-12 Graham Stott + Roger Sayle + + * i386.c (any_fp_register_operand, fp_register_operand, + register_and_not_any_fp_reg_operand, register_and_not_fp_reg_operand): + New predicate functions. + * i386-protos.h: Add their prototypes. + * i386.h: Add them to PREDICATE_CODES. + * i386.md ("*pushsf_rex64"+2, "*pushsf_rex64"+3, "*pushdf_integer"+1, + "*pushdf_integer"+2, "*pushtf_integer"+1, "*pushtf_integer"+2, + "*pushtf_integer"+3, "*pushtf_integer"+4, "*dummy_extendsfdf2"+1, + "*dummy_extendsfdf2"+2, "*dummy_extendsfxf2"+1, + "*dummy_extendsftf2"+1, "*dummy_extendsftf2"+2, + "*dummy_extenddfxf2"+1, "*dummy_extenddftf2"+1, + "*dummy_extenddftf2"+2, "*negsf2_if"+1, "*negsf2_if"+2, + "*negdf2_if_rex64"+1, "*negdf2_if_rex64"+2, "*negxf2_if"+1, + "*negxf2_if"+2, "*negtf2_if"+1, "*negtf2_if"+2, "*abssf2_if"+1, + "*abssf2_if"+2, "*absdf2_if_rex64"+1, "*absdf2_if_rex64"+2, + "*absxf2_if"+1, "*absxf2_if"+2, "*abstf2_if"+1, "*abstf2_if"+2): + Use these new predicates to simplify and correct the use of + FP_REG_P, ANY_FP_REG_P, FP_REGNO_P and any ANY_FP_REGNO_P. + +2002-09-12 Jason Merrill + + * diagnostic.c (output_add_identifier): New fn. + * diagnostic.h: Declare it. + + * calls.c (store_one_arg): Use size_in_bytes to determine the + amount of space to push. + +2002-09-12 Jakub Jelinek + + * config/sparc/linux64.h (STARTFILE_SPEC32): Fix a typo. + +2002-09-12 Ulrich Weigand + + * config/s390/s390-modes.def (CCAPmode, CCANmode): New CC modes. + * config/s390/s390.c (s390_match_ccmode_set): Support new CC modes. + (s390_select_ccmode): Likewise. + (s390_branch_condition_mask): Likewise. + (optimization_options): Do not set flag_branch_on_count. + (s390_split_branches): Handle doloop branches. + (s390_chunkify_pool): Likewise. + * config/s390/s390.md ("*adddi3_imm_cc", "*addsi3_imm_cc"): New insns. + ("doloop_end"): New expander. + ("doolop_si", "*doloop_si_long", "doloop_di", "*doloop_di_long", + associated splitters): New. + +2002-09-11 Hartmut Penner + + * fold-const.c (make_range): Only narrow to signed range if + the signed range is smaller than the unsigned range. + +2002-09-12 Alan Modra + + * emit-rtl.c (set_mem_size): New function. + * expr.h (set_mem_size): Declare. + * config/rs6000/rs6000.c (expand_block_move_mem): Exterminate. + (expand_block_move): Instead, use adjust_address and + replace_equiv_address to generate proper aliasing info. + Move common code out of conditionals. Localize vars. + +2002-09-11 Eric Botcazou + + * optabs.c (expand_binop): Minor cleanup. + (expand_twoval_binop): Convert CONST_INTs like in expand_binop. + +2002-09-11 Dan Nicolaescu + + * print-tree.c (print_node): Print the restrict qualifier. + +2002-09-11 Janis Johnson + + * doc/install.texi: Fix typos. + +2002-09-11 Zack Weinberg + + * Makefile.in: Remove all references to s-under and underscore.c. + * collect2.c, tlink.c: Change all uses of prepends_underscore + to look directly at USER_LABEL_PREFIX. + +2002-09-11 David Edelsohn + + * config/rs6000/rs6000.c (rs6000_xcoff_asm_named_section): Append + alignment to csect. + (rs6000_xcoff_unique_section): Only set section name for public + data. + (rs6000_xcoff_section_type_flags): Store log2 alignment in flags. + * config/rs6000/xcoff.h (TARGET_ASM_SELECT_SECTION): Remove + duplicate definition. + +2002-09-10 John David Anglin + + * pa.md (extzv): Check predicates before emitting extzv_32. + (insv): Likewise. + +2002-09-10 Ulrich Weigand + + * config/s390/s390.h (MOVE_MAX): Define to correct value. + (MAX_MOVE_MAX): Define. + (MOVE_BY_PIECES_P): Define. + (CLEAR_BY_PIECES_P): Define. + +2002-09-10 Denis Chertykov + + * config/avr/avr.md (movstrhi): Use right operands for conversion. + +2002-09-10 Richard Earnshaw + + PR c/7873 + * arm.md (insv): Use reg_or_int_operand for operand[3]. + +2002-09-10 David Edelsohn + + * rs6000.c (rs6000_assemble_visibility): Protect declaration + inside macro. Correct function definition typo. + (rs6000_xcoff_section_type_flags): New function. + (TARGET_SECTION_TYPE_FLAGS): Remove definition. + (rs6000_elf_section_type_flags): Call default_section_type_flags_1 + with appropriate PIC test. + (rs6000_xcoff_select_section): Use decl_readonly_section_1 to + determine readonly. + (rs6000_binds_local_p): Combine PIC flags. + * sysv4.h (TARGET_SECTION_TYPE_FLAGS): Define. + * xcoff.h (TARGET_SECTION_TYPE_FLAGS): Define. + +2002-09-09 Per Bothner + + * print-tree.c (print_node): In a STRING_CST, escape non-ascii + characters, and only print TREE_STRING_LENGTH chars. + +2002-09-09 Steve Ellcey + + * config/ia64/hpux.h (TARGET_HPUX_LD): New, define true. + (ASM_FILE_END) New. + * config/ia64/ia64.h (TARGET_HPUX_LD): New, define false. + * config/ia64/ia64-protos.h (ia64_hpux_asm_file_end): New. + * config/ia64/ia64.c (ia64_asm_output_external): Create list + of external functions if TARGET_HPUX_LD is true. + (ia64_hpux_add_extern_decl): New, routine to put names on + list of external functions. + (ia64_hpux_asm_file_end): Put out declarations for external + functions if and only if they are used. + +2002-09-09 John David Anglin + + * pa.md (exception_receiver, builtin_setjmp_receiver): Add blockage + on TARGET_64BIT before pic register restore. + +2002-09-09 David Edelsohn + + * doc/tm.texi (TARGET_HAVE_SRODATA_SECTION): New description. + (TARGET_HAVE_TLS): New description. + +2002-09-09 Janis Johnson + + * doc/extend.texi (Statement Exprs): Fix broken link. + +2002-09-09 Denis Chertykov + + * config/avr/avr.md (movstrhi, clrstrhi): Use gen_int_mode for + right conversion of operands[1]. + +2002-09-09 Ulrich Weigand + + * config/s390/s390.md ("*tmdi_reg", "*tmsi_reg"): Do not mark as + commutative. Use "nonimmediate_operand" instead of "register_operand" + as predicate for operand 0. Move to after the "*tmXX_mem" insns. + + ("*tmdi_mem", "*tmsi_mem", "*tmhi_mem", "*tmqi_mem"): Do not mark + as commutative. + + ("*anddi3_ni", "*andsi3_ni", "*iordi3_ni", "*iorsi3_ni"): Do not + mark as commutative. Use "nonimmediate_operand" instead of + "register_operand" as predicate for operand 1. + + ("movstrictsi"): Fix typo in insn name. + +2002-09-09 Jan Hubicka + + * i386.c (index_register_operand): New. + * i386.h (predicate_codes): Add new predicate. + * i386.md (lea_general_*): Use index_register_operand + (ashift to lea splitter): Do not produce invalid leas + (ashift to mov+ashift split): New. + +2002-09-09 Nick Clifton + + * config/fr30/fr30.c (output.h): Move after inclusion of tree.h. + Fix folding marks. + +2002-09-09 Toshiyasu Morita + J"orn Rennecke + + * sh/sh.h (OVERRIDE_OPTIONS): align_functions is in bytes, not bits. + +2002-09-09 Alan Modra + + * config/rs6000/rs6000.c (rs6000_binds_local_p): Return bool. + (function_ok_for_sibcall): Use binds_local_p. Respect longcall + attributes. + +2002-09-08 Kaveh R. Ghazi + + * fr30.c (fr30_print_operand): Fix bug in output of CONST_DOUBLE. + +2002-09-08 Richard Henderson + + * dwarf2.h (DW_OP_call_ref): Rename from DW_OP_calli. + (DW_OP_GNU_push_tls_address): New. + (DW_OP_lo_user): Fix. + * dwarf2out.c (INTERNAL_DW_OP_tls_addr): New. + (dwarf_stack_op_name): Handle it, plus other dwarf3 opcodes. + (size_of_loc_descr): Likewise. + (output_loc_operands): Handle INTERNAL_DW_OP_tls_addr. + (add_AT_location_description): Take a dw_loc_descr_ref not an rtx. + (loc_descriptor_from_tree): Handle TLS variables. + (rtl_for_decl_location): Do avoid_constant_pool_reference here ... + (add_location_or_const_value_attribute): ... not here. Defer + to loc_descriptor_from_tree for TLS variables. + + * config/i386/i386.h (ASM_OUTPUT_DWARF_DTPREL): New. + * config/i386/i386.c (i386_output_dwarf_dtprel): New. + * config/i386/i386-protos.h: Update. + +2002-09-08 Roger Sayle + + PR optimization/6405 + * unroll.c (loop_iterations): last_loop_insn should be the previous + non-note instruction before loop->end. + * loop.c (strength_reduce): The conditional jump is the last + non-note instruction before loop->end (as above). + +2002-09-08 Roger Sayle + + * combine.c (try_combine): Handle the case that undobuf.other_insn + has been turned into a return or unconditional jump, by inserting + a BARRIER if necessary. + (simplify_set): Test if a condition code setter has a constant + comparison at compile time, if so convert this insn to a no-op move + and update/simplify the condition code user (undobuf.other_insn). + +2002-09-08 Krister Walfridsson + + * config/arm/netbsd.h (INITIALIZE_TRAMPOLINE): Redefine. + (CLEAR_INSN_CACHE): Define. + +2002-09-08 Kazu Hirata + + * basic-block.h: Fix comment formatting. + * c-common.c: Likewise. + * c-common.h: Likewise. + * c-lex.c: Likewise. + * c-pretty-print.c: Likewise. + * cfglayout.c: Likewise. + * cfgloop.c: Likewise. + * defaults.h: Likewise. + * et-forest.c: Likewise. + * explow.c: Likewise. + * function.h: Likewise. + * gcov.c: Likewise. + * genattrtab.c: Likewise. + * gengtype.c: Likewise. + * ifcvt.c: Likewise. + * libgcc2.c: Likewise. + * loop.c: Likewise. + * profile.c: Likewise. + * ra-build.c: Likewise. + * real.c: Likewise. + * rtl.h: Likewise. + * tracer.c: Likewise. + * tree-inline.c: Likewise. + * varasm.c: Likewise. + +2002-09-08 Jan Hubicka + + * emit-rtl.c (set_mem_attributes_minus_bitpos): Fix array_ref + handling. + + * loop.c (loop_givs_reduce): Emit addition after. + +2002-09-08 Alan Modra + + * varasm.c (default_assemble_visibility): Rename from + assemble_visibility. + * output.h: Here too. + * target-def.h (TARGET_ASM_ASSEMBLE_VISIBILITY): And here. + * config/rs6000/rs6000.c (rs6000_assemble_visibility): And here. + +2002-09-08 Alan Modra + + * reload.c (find_reloads

): Pass operand_mode to + find_reloads_address. + +2002-09-08 Kazu Hirata + + * config/h8300/h8300.md (udivmodqi4): Enable on H8/300. + (anonymous pattern): Likewise. + +2002-09-07 Scott Snyder + + PR target/7374 + * config/alpha/alpha.md (abstf2): Fix typo: 'neg' for 'abs'. + +2002-09-07 Roger Sayle + + * basic-block.h (struct loop): Remove unused cont_dominator field. + +2002-09-07 Igor Shevlyakov + + * varasm.c (decode_rtx_const): Don't check undefined field for + CONST_VECTOR. + +2002-09-07 Glen Nakamura + + PR opt/7814 + * sched-deps.c (sched_analyze_insn): Make sure to add insn + to reg_last->sets after flushing the dependency lists to guarantee + that subsequent clobbers will be dependent on it. + +2002-09-07 Igor Shevlyakov + + * combine.c (simplify_shift_const): Calculate rotate count + correctly for vector operands. + +2002-09-07 Ansgar Esztermann + + * c-typeck.c (c_tree_expr_nonnegative_p): New function. + (build_binary_op): Call c_tree_expr_nonnegative_p rather than + tree_expr_nonnegative_p. + (build_conditional_expr): Likewise. + * c-tree.h (c_tree_expr_nonnegative_p): Declare. + +2002-09-07 Richard Henderson + + * builtins.def (inf, inff, infl): Mark const. + (huge_val, huge_valf, huge_vall): Likewise. + (BUILT_IN_GETEXP, BUILT_IN_GETMAN): Remove. + + * real.c (ereal_inf): Clear E before use. + +2002-09-07 Kazu Hirata + + * config/h8300/h8300.md (udivmodqi4): Split the pattern into + an expander and an anonymous pattern. Zero out the upper half + of the dividend in the expander. + (udivmodqi4): Likewise. + +2002-09-07 Kazu Hirata + + * config/h8300/h8300.c: Fix formatting. + * config/h8300/h8300.h: Likewise. + * config/h8300/h8300.md: Likewise. + +2002-09-07 Zdenek Dvorak + + * cfgcleanup.c (try_crossjump_to_edge): Fix updating of liveness + information. + +2002-09-07 Graham Stott + + * rtlanal.c (dead_or_set_regno_p): Fix typo. + +2002-09-07 Alan Modra + + * config/rs6000/linux64.h (ASM_PREFERRED_EH_DATA_FORMAT): Define. + + * doc/tm.texi (TARGET_ASM_ASSEMBLE_VISIBILITY): Describe. + * target-def.h (TARGET_ASM_ASSEMBLE_VISIBILITY): Define. + (TARGET_ASM_OUT): Add the above here. + * target.h (struct gcc_target): Add "visibility" field. + * varasm.c (maybe_assemble_visibility): Call targetm visibility func. + * config/rs6000/rs6000.c (rs6000_assemble_visibility): New function. + (TARGET_ASM_ASSEMBLE_VISIBILITY): Define. + (rs6000_legitimize_reload_address, first_reg_to_save): Formatting. + +2002-09-06 Ziemowit Laski + + * c-lang.c (objc_is_id): New stub. + * c-tree.h (objc_is_id): New forward declaration. + * c-typeck.c (build_c_cast): Do not strip protocol + qualifiers from 'id' type. + * objc/objc-act.c (objc_comptypes): Correct handling + of protocol qualifiers. + (objc_is_id): New. + +2002-09-06 Jeffrey A Law (law@redhat.com) + + * pentium.md (pentium-firstvboth): Fix typo. + +2002-09-06 Dhananjay Deshpande + + * h8300.c (enum shift_alg): Move to earlier in h8300.c. + (enum shift_type, enum h8_cpu): Likewise. + (INL, ROT, LOP, SPC macros): Likewise. + (shift_alg_qi, shift_alg_hi, shift_alg_si): Likewise. Lose + const designator. + (h8300_init_once): Update shift_alg_{qi,hi,si} to use more + space efficient algorithms when optimize for codesize. + +2002-09-06 Nicola Pero + + Fix PR/1727 and long-standing failing testcase + objc/formal-protocol-6.m. + * objc-act.c (build_protocol_expr): If compiling for the GNU + runtime, create a list of Protocol statically allocated instances + if it doesn't exist, then add the Protocol object to this same + list. + (get_objc_string_decl): Fixed typo/bug - TREE_VALUE had been used + instead of TREE_CHAIN. + +2002-09-06 Nicola Pero + + * objc/objc-act.c (dump_interface): Enlarged the char * buffer to + 10k. Fixed category dumping - print out category names with the + proper syntax. Print '@end\n' and not '\n@end' at the end of the + interface. + (finish_objc): Fixed the -gen-decls option. It was printing out + only the last class. Dump an interface declaration of all classes + being compiled instead. + +2002-09-06 Jason Thorpe + + * config/arm/arm-protos.h (arm_gen_return_addr_mask): New + prototype. + * config/arm/arm.c (arm_gen_return_addr_mask): New function. + * config/arm/arm.h (MASK_RETURN_ADDR): Use arm_gen_return_addr_mask + if not APCS26 and not Thumb or ARMv4-or-higher. Use gen_int_mode + rather than GEN_INT. + * config/arm/arm.md (UNSPEC_CHECK_ARCH): Define. + (return_addr_mask, *check_arch2): New. + +2002-09-06 Ulrich Weigand + + * config/s390/s390.md ("*adddi3_cc", "*adddi3_cconly", + "*adddi3_cconly2", "*adddi3_64", "*adddi3_31", "adddi3", + "*addsi3_carry1_cc", "*addsi3_carry1_cconly", + "*addsi3_carry2_cc", "*addsi3_carry2_cconly", + "*addsi3_cc", "*addsi3_cconly", "*addsi3_cconly2", "addsi3", + "adddf3", "*adddf3", "*adddf3_ibm", + "addsf3", "*addsf3", "*addsf3_ibm", + "muldi3", "mulsi3", "mulsidi3", + "muldf3", "*muldf3", "*muldf3_ibm", + "mulsf3", "*mulsf3", "*mulsf3_ibm", + "*anddi3_cc", "*anddi3_cconly", "anddi3", + "*andsi3_cc", "*andsi3_cconly", "andsi3", + "*iordi3_cc", "*iordi3_cconly", "iordi3", + "*iorsi3_cc", "*iorsi3_cconly", "iorsi3", + "*xordi3_cc", "*xordi3_cconly", "xordi3", + "*xorsi3_cc", "*xorsi3_cconly", "xorsi3"): Use "nonimmediate_operand" + instead of "register_operand" as predicate for "%0" operand. + +2002-09-06 Jakub Jelinek + + * configure.in (HAVE_AS_OFFSETABLE_LO10): Use -xarch=v9 + unconditionally when gcc_cv_as_flags64 checks are gone. + * configure: Rebuilt. + +2002-09-06 Alan Modra + + * config/rs6000/rs6000.md (extzvsi_internal2): Revert most of + 2002-07-26 change. Comment. + +2002-09-05 Kaveh R. Ghazi + + * frv.c (frv_unique_section, frv_select_section, + frv_select_rtx_section): Delete. + (frv_in_small_data_p): New. + (TARGET_ASM_UNIQUE_SECTION, TARGET_ASM_SELECT_SECTION, + TARGET_ASM_SELECT_RTX_SECTION): Delete. + (TARGET_IN_SMALL_DATA_P): Define. + +2002-09-05 Dale Johannesen + + * reload1.c (reload): Retain only those memory clobbers + added for variable-array handling. + +2002-09-05 Jason Thorpe + + * config/arm/arm.c (arm_return_in_memory): Implement ATPCS + return-in-memory rules. + * config/arm/arm.h (ARM_FLAG_ATPCS, TARGET_ATPCS): Define. + +2002-09-05 David Edelsohn + + * config/rs6000/xcoff.h (HOT_TEXT_SECTION_NAME): Delete. + (UNLIKELY_EXECUTED_TEXT_SECTION_NAME): Delete. + +2002-09-05 Jason Thorpe + + * real.c: Avoid parse error if FLOAT_WORDS_BIG_ENDIAN is + not a compile-time constant for the non-IBM case. + * config/arm/arm-protos.h (arm_float_words_big_endian): New + prototype. + * config/arm/arm.c (arm_float_words_big_endian): New function. + * config/arm/arm.h (TARGET_CPU_CPP_BUILTINS): Define __VFP_FP__ + if TARGET_VFP and not TARGET_HARD_FLOAT. + (ARM_FLAG_VFP, TARGET_VFP): Define. + (FLOAT_WORDS_BIG_ENDIAN): Use arm_float_words_big_endian. + +2002-09-05 David Edelsohn + + * doc/install.texi: Correct text of s390-*-linux* and s390x-*-linux* + URLs. Fix AIX wording. + +2002-09-05 Stan Shebs + + * config/rs6000/rs6000.c (rs6000_override_options): Make -fpic and + -fPIC equivalent on Darwin. + +2002-09-05 J"orn Rennecke + + * sh.c (sh_expand_builtin): Return early if encountering an + error_mark for a type. + +2002-09-05 Ulrich Weigand + + * config/s390/s390.c (s390_expand_plus_operand): Do not require + double-word scratch register. + config/s390/s390.md ("reload_indi", "reload_insi"): Adapt. + + ("*tmqi_ext", "*tmdi_mem", "*tmsi_mem", "*tmhi_mem", "*tmqi_mem", + "*cli"): Replace s_operand by memory_operand. + ("cmpstrdi", "cmpstrsi"): Replace s_operand by general_operand. + +2002-09-05 Kazu Hirata + + * config/h8300/h8300.c (asm_file_start): Add a missing + semicolon. + +2002-09-04 Krister Walfridsson + + * config/i386/i386.h (GOT_SYMBOL_NAME): Define. + * config/i386/i386.c (output_set_got): Use GOT_SYMBOL_NAME. + (ix86_output_addr_diff_elt) Likewise. + (x86_output_mi_thunk) Likewise. + * config/i386/netbsd.h (GOT_SYMBOL_NAME): Redefine. + +2002-09-04 Kaveh R. Ghazi + + * frv.c (frv_encode_section_info): Fix error in last change. + +2002-09-04 David Edelsohn + + * config/rs6000/rs6000.c (rs6000_flag_pic): New variable. + (rs6000_elf_encode_section_info): ATTRIBUTE_UNUSED. + (TARGET_BINDS_LOCAL_P): Define. + (rs6000_override_options): Save original flag_pic value. + (rs6000_elf_select_section): Call default_elf_select_section_1. + (rs6000_elf_unique_section): Call default_unique_section_1. + (rs6000_elf_in_small_data_p): New function. + (rs6000_xcoff_asm_named_section): Determine storage mapping class. + (rs6000_xcoff_select_section): Update based on defaults. + (rs6000_xcoff_unique_section): Set to basic name if not common. + (rs6000_binds_local_p): New function. + * config/rs6000/sysv4.h (SUBTARGET_OVERRIDE_OPTIONS): Set + targetm.have_srodata_section if SDATA_EABI. + (TARGET_IN_SMALL_DATA_P): Define. + +2002-09-04 Dale Johannesen + + * varasm.c (struct rtx_const, decode_rtx_const): + Make veclo and vechi fields not share storage. + +2002-09-05 J"orn Rennecke + + * loop.c (scan_loop): Don't mark separate insns out of a libcall + for moving. + (move_movables): Abort if we see the first insn of a libcall. + +2002-09-04 Richard Henderson + + * builtin-types.def (BT_FN_FLOAT): New. + (BT_FN_DOUBLE, BT_FN_LONG_DOUBLE): New. + * builtins.def (BUILT_IN_INF, BUILT_IN_INFF, BUILT_IN_INFL, + BUILT_IN_HUGE_VAL, BUILT_IN_HUGE_VALF, BUILT_IN_HUGE_VALL): New. + * builtins.c (fold_builtin_inf): New. + (fold_builtin): Call it. + * real.c (ereal_inf): New. + * real.h: Declare it. + * doc/extend.texi: Document new builtins. + +2002-09-04 Richard Henderson + + * cse.c (cse_insn): Avoid subreg games if the equivalence + is already in the proper mode. + +2002-09-04 Eric Botcazou + + PR c/7102 + * optabs.c (expand_binop): Convert CONST_INTs in all cases. + +2002-09-04 John David Anglin + + * pa.md (setccfp0, setccfp1): New patterns. + +2002-09-04 Kaveh R. Ghazi + + * frv-protos.h (frv_init_builtins, frv_expand_builtin, + frv_select_section, frv_select_rtx_section, + frv_encode_section_info, frv_unique_section): Delete. + * frv.c: Update for target hooks. + * frv.h (STRIP_NAME_ENCODING, SLOW_ZERO_EXTEND, SELECT_SECTION, + SELECT_RTX_SECTION, ENCODE_SECTION_INFO, UNIQUE_SECTION, + EASY_DIV_EXPR, MD_INIT_BUILTINS, MD_EXPAND_BUILTIN): Delete. + +2002-09-04 Kaveh R. Ghazi + + * ip2k-protos.h (function_prologue, function_epilogue, + encode_section_info): Update to match target hook specification. + * ip2k.c: Wrap `MDR' code in IP2K_MD_REORG_PASS. + (function_prologue, function_epilogue, encode_section_info): + Update to match target hook specification. + * ip2k.h (SELECT_SECTION, SELECT_RTX_SECTION, ASM_OPEN_PAREN, + ASM_CLOSE_PAREN, EASY_DIV_EXPR): Delete. + (NOTICE_UPDATE_CC): Cast to void. + * ip2k.md: Add defaults in switch statements. + +2002-09-04 Janis Johnson + + * doc/trouble.texi (Interoperation): Update information about C++ ABI + issues. + +2002-09-04 Jason Thorpe + + * config/sparc/t-netbsd64: Disable multilib for now. + +2002-09-04 David Edelsohn + + * target-def.h (TARGET_HAVE_SRODATA_SECTION): New macro. + * target.h (gcc_target): Add have_srodata_section member. + * varasm.c (section_category): Add SECCAT_SRODATA. + (categorize_decl_for_section): Return SECCAT_SRODATA for sdata if + READONLY_SDATA_SECTION defined. + (decl_readonly_section_1): True for SECCAT_SRODATA also. + (default_elf_select_section_1): Map SECCAT_SRODATA to .sdata2. + (default_unique_section_1): Likewise. + +2002-09-04 John David Anglin + + * expr.c (emit_group_load): Revise to allow splitting TCmode source + into DImode pieces. + + * pa-64.h (LONG_DOUBLE_TYPE_SIZE): Define to 128. + * pa64-regs.h (CLASS_CANNOT_CHANGE_MODE_P): Inhibit changes from SImode + for floating-point register class. + * pa.c (function_arg): Fix handling of modes wider than one word for + TARGET_64BIT. + +2002-09-04 J"orn Rennecke + + * combine.c (make_compound_operation): Don't generate zero / sign + extensions in floating point modes. + +2002-09-04 Janis Johnson + + * doc/c-tree.texi: Fix overfull hboxes. + * doc/cppopts.texi: Ditto. + * doc/extend.texi: Ditto. + * doc/gty.texi: Ditto. + * doc/invoke.texi: Ditto. + * doc/makefile.texi: Ditto. + * doc/rtl.texi: Ditto. + * doc/standards.texi: Ditto. + * doc/tm.texi: Ditto. + +2002-09-04 Richard Henderson + + * c-common.c (builtin_define_with_hex_fp_value): New. + (builtin_define_float_constants): Use it. Fix H_FLOAT mant_dig. + +2002-09-04 Janis Johnson + + * doc/invoke.texi (-fshort-wchar): Move to Code Generation Options. + (-fpcc-struct-return, -freg-struct-return, -fshort-enums, + -fshort-double, -fshort-wchar, -fpack-struct, -fleading-underscore): + Warn that these options can break ABI compatibility. + +2002-09-04 Richard Henderson + + * real.c (ereal_to_decimal): Add digits parameter. + * real.h (REAL_VALUE_TO_DECIMAL): Remove format; add digits parameter. + * c-pretty-print.c (pp_c_real_literal): Update call. + * print-rtl.c (print_rtx): Likewise. + * print-tree.c (print_node_brief, print_node): Likewise. + * sched-vis.c (print_value): Likewise. + * config/arc/arc.c (arc_print_operand): Likewise. + * config/c4x/c4x.c (c4x_print_operand): Likewise. + * config/i370/i370.h (PRINT_OPERAND): Likewise. + * config/i386/i386.c (print_operand): Likewise. + * config/i960/i960.c (i960_print_operand): Likewise. + * config/ip2k/ip2k.c (asm_output_float): Likewise. + * config/m32r/m32r.c (m32r_print_operand): Likewise. + * config/m68hc11/m68hc11.c (print_operand): Likewise. + * config/m68k/hp320.h (PRINT_OPERAND, ASM_OUTPUT_FLOAT_OPERAND, + ASM_OUTPUT_DOUBLE_OPERAND, ASM_OUTPUT_LONG_DOUBLE_OPERAND): Likewise. + * config/m68k/m68k.h (ASM_OUTPUT_FLOAT_OPERAND, + ASM_OUTPUT_DOUBLE_OPERAND, ASM_OUTPUT_LONG_DOUBLE_OPERAND): Likewise. + * config/m68k/sun2o4.h (ASM_OUTPUT_FLOAT_OPERAND, + ASM_OUTPUT_DOUBLE_OPERAND): Likewise. + * config/m68k/sun3.h (ASM_OUTPUT_FLOAT_OPERAND, + ASM_OUTPUT_DOUBLE_OPERAND): Likewise. + * config/mips/mips.c (print_operand): Likewise. + * config/ns32k/ns32k.c (print_operand): Likewise. + * config/pdp11/pdp11.h (PRINT_OPERAND): Likewise. + * config/vax/vax.h (PRINT_OPERAND): Likewise. + * doc/tm.texi (REAL_VALUE_TO_DECIMAL): Update docs. + +2002-09-04 Bob Wilson + + * config/xtensa/elf.h (TARGET_SECTION_TYPE_FLAGS): Define to + xtensa_multibss_section_type_flags. + * config/xtensa/xtensa.c (xtensa_multibss_section_type_flags): Define. + +2002-09-04 Richard Henderson + + * doc/install-old.texi: Don't mention enquire. + * doc/sourcebuild.texi: Update float.h description. + +2002-09-04 J"orn Rennecke + + * sh.md (mperm_w_little, mperm_w_big): Supply mode for zero_extract. + +2002-09-03 David Edelsohn + + * varasm.c (default_section_type_flags): Append _1 to name with + shlib parameter. Use original name to call new function with + implicit flag_pic. + (decl_readonly_section): Likewise. + (default_elf_select_section): Likewise. + (default_unique_section): Likewise. + (default_bind_local_p): Likewise. + (categorize_decl_for_section): Add shlib parameter to use in place + of implicit flag_pic. + * output.h: Declare new functions with _1 and shlib argument. + +2002-09-03 Janis Johnson + + * doc/install.texi: Fix typos, formatting problems, and obvious + overfull/underfull boxes. + + * Makefile.in (TEXI_GCC_FILES): Add compat.texi. + * doc/gcc.texi (Top): Add new chapter, Binary Compatibility, and + include its file, compat.texi. + * doc/compat.texi: New file with new chapter, Binary Compatibility. + +2002-09-03 Neil Booth + + Debian BTS Bug #157416 + * cpphash.h (FIRST, LAST, CUR, RLIMIT): Fix definitions. + * cpplib.c (destringize_and_run): Kludge around getting + tokens from in-progress macros. + (_cpp_do__Pragma): Simplify. + +2002-09-03 Steve Ellcey + + * config/ia64/ia64.h (EXTRA_SPECS): Remove cpp_cpu. + (CPP_CPU_SPEC): Remove. + (TARGET_CPU_CPP_BUILTINS): New. + * config/ia64/hpux.h (CPP_PREDEFINES): Remove. + (CPP_SPEC): Remove. + (TARGET_OS_CPP_BUILTINS): New. + * config/ia64/linux.h (CPP_PREDEFINES): Remove. + (TARGET_OS_CPP_BUILTINS): New. + * config/ia64/aix.h (CPP_SPEC): Move some stuff to + TARGET_OS_CPP_BUILTINS. + (CPP_PREDEFINES): Remove. + (CPLUSPLUS_CPP_SPEC): Remove. + (TARGET_OS_CPP_BUILTINS): New. + +2002-09-03 Richard Henderson + + * Makefile.in (USER_H): Add ginclude/float.h. + (FLOAT_H): Remove. + (stmp-int-hdrs, install-mkheaders): Don't handle FLOAT_H. + (mostlyclean): Don't remove float.h intermediate files. + (distclean): Don't remove float.h. + * config.gcc: Remove all float_format references. + * configure.in (float_format, float_h_file): Remove. + + * c-common.c: Include tree-inline.h. + (builtin_define_with_int_value): New. + (builtin_define_type_precision): Use it. + (builtin_define_float_constants): New. + (cb_register_builtins): Use it. Define __FLT_RADIX__ and + __FLT_EVAL_METHOD__. + * defaults.h (TARGET_FLT_EVAL_METHOD): New. + * config/i386/i386.h (TARGET_FLT_EVAL_METHOD): New. + * config/m68k/m68k.h (TARGET_FLT_EVAL_METHOD): New. + * doc/tm.texi (INTEL_EXTENDED_IEEE_FORMAT): Mention moto 96-bit format. + (TARGET_FLT_EVAL_METHOD): New. + + * config/float-c4x.h, config/float-i128.h, config/float-i32.h, + config/float-i386.h, config/float-i64.h, config/float-m68k.h, + config/float-sh.h, config/float-sparc.h, config/float-vax.h: Remove. + * ginclude/float.h: New. + +2002-09-03 Stan Shebs + + * config/darwin.h (WARN_FOUR_CHAR_CONSTANTS): Remove, never used. + (DWARF2_DEBUGGING_INFO): Remove until assembler accepts Dwarf-2. + (PREFERRED_DEBUGGING_TYPE): Ditto. + (ASM_OUTPUT_IDENT): Remove empty definition. + +2002-09-03 Steve Ellcey + + * config.gcc (ia64*-*-hpux*): Add ia64-c.o to c_target and + cxx_target. + * config/ia64/hpux.h (REGISTER_TARGET_PRAGMAS): Register pragma + handling routine for builtin pragma. + * config/ia64/ia64-protos.h (ia64_hpux_handle_builtin_pragma): + Registered pragma handling routine. + * ia64-c.c (ia64_hpux_handle_builtin_pragma): Ditto. + (ia64_hpux_add_pragma_builtin) New subroutine used by above. + If builtin pragma seen for math routine and C89 conformance is + requested use different math function in order to set errno. + * t-ia64 (ia64-c.o): Add new rule for new file. + +2002-09-03 Ulrich Weigand + + * config/s390/s390.md ("movti"): Add Q->Q alternative. + ("*movdi_64", "*movdi_31", "*movsi", "movhi", "movqi_64", + "movqi", "*movdf_64", "*movdf_31", "*movsf"): Likewise. + + ("*movti_ss", "*movdi_ss", "*movsi_ss", "*movdf_ss", + "*movsf_ss"): Remove. + +2002-09-03 John David Anglin + + * pa32-regs.h (CLASS_CANNOT_CHANGE_MODE, CLASS_CANNOT_CHANGE_MODE_P): + Delete macros. + +2002-09-03 Arati Dikey + + * h8300.c (asm_file_start): Corrected optimization comment. + +2002-09-03 Stan Shebs + + * c-lang.c (recognize_objc_keyword): Remove, no longer used. + * c-tree.h (recognize_objc_keyword): Remove decl. + * c-typeck.c (comp_target_types): Update a comment. + +2002-09-03 Ulrich Weigand + + * config/s390/s390.c (s390_decompose_address): Remove STRICT parameter + and register validity checks. + (general_s_operand): Adapt to s390_decompose_address interface change. + (q_constraint): Likewise. + (s390_expand_plus_operand): Likewise. + (legitimiate_address_p): Likewise. + (legitimate_la_operand_p): Likewise. + (legitimize_la_operand): Likewise. + (print_operand_address): Likewise. + (print_operand): Likewise. + +2002-09-03 Nicola Pero + + PR objc/5956: + * objc/objc-act.c (build_typed_selector_reference): Fix typo which + was causing the new selector never to match the existing ones + (Patch by Alexander Malmberg ). + +2002-09-03 Graham Stott + + * config/i386/i386.md ("femms"): Add "memory" attr "none". + +2002-09-03 Graham Stott + + * expr.c (expand_expr): Remove extraneous comment and code. + +2002-08-31 Richard Henderson + + * expr.c (block_move_libcall_safe_for_call_parm): Fix thinko. + +2002-08-31 John David Anglin + + * pa.c (pa_globalize_label): Add ATTRIBUTE_UNUSED to prototype. + +2002-08-30 Richard Henderson + + PR opt/7515 + * c-objc-common.c: Include target.h. + (c_cannot_inline_tree_fn): Don't auto-inline functions that + don't bind locally. Factor setting DECL_UNINLINABLE. + * Makefile.in (c-objc-common.o): Update. + +2002-08-30 Janis Johnson + + * doc/install.texi (Configuration, Building): Fix a typo and + some formatting directives. + +2002-08-30 Paul Koning + + * doc/c-tree.texi (RDIV_EXPR): Fix typo. + * doc/rtl.texi (post_modify): Remove misplaced text, remove "not + implemented" note. + * doc/md.texi (IP2K): Move machine-specific constraints before MIPS + for alphabetic order. + * doc/tm.texi (TARGET_FLOAT_FORMAT): Update description for + VAX_FLOAT_FORMAT. Remove reference to HOST_FLOAT_FORMAT. + (VAX_HALFWORD_ORDER): Document. + (LARGEST_EXPONENT_IS_NORMAL): Remove note about being only for + IEEE float format. + (TARGET_SCHED_ISSUE_RATE): Reword reference to MAX_DFA_ISSUE_RATE. + (ASM_OUTPUT_LABEL_REF): Fix font. + (CASE_VECTOR_SHORTEN_MODE): Ditto. + +2002-08-30 Denis Chertykov + + * config/ip2k/ip2k.c (ip2k_set_compare): Remove all const_double + stuff. + (ip2k_gen_unsigned_comp_branch): Handle CONST_INT and + CONST_DOUBLE constants. + +2002-08-30 Jason Thorpe + + * config/alpha/alpha.h (TARGET_CPU_CPP_BUILTINS): Move language- + related defines to... + (SUBTARGET_LANGUAGE_CPP_BUILTINS): ...here. + * config/alpha/netbsd.h (SUBTARGET_LANGUAGE_CPP_BUILTINS): Redefine + as a no-op. + +2002-08-30 Krister Walfridsson + + * config/arm/arm.c (arm_asm_output_labelref): New function. + * config/arm/arm.h (ASM_OUTPUT_LABELREF): Call arm_asm_output_labelref. + * config/arm/arm-protos.h: Add prototype for arm_asm_output_labelref. + +2002-08-29 Rodney Brown + + * doc/install.texi (Specific, alpha*-dec-osf*): Add "virtual + memory exhausted" workarounds. + +2002-08-30 Gabriel Dos Reis + + * diagnostic.c (fancy_abort): Don't repeat "internal error". + * toplev.c (crash_signal): Likewise. + +2002-08-30 Nicola Pero + + * doc/cpp.texi (__NEXT_RUNTIME__): Extended documentation. + * doc/invoke.texi (-fnext-runtime, -Wno-protocol, -Wselector): + Extended, updated documentation. + (-Wundeclared-selector): Documented. + +2002-08-29 Jason Thorpe + + * config/chorus.h: Consistently define *_DEBUGGING_INFO with + the value 1. Do not undef before defining. + * config/darwin.h: Likewise. + * config/dbx.h: Likewise. + * config/dbxcoff.h: Likewise. + * config/dbxelf.h: Likewise. + * config/elfos.h: Likewise. + * config/interix.h: Likewise. + * config/lynx-ng.h: Likewise. + * config/lynx.h: Likewise. + * config/netware.h: Likewise. + * config/psos.h: Likewise. + * config/svr3.h: Likewise. + * config/alpha/alpha.h: Likewise. + * config/alpha/elf.h: Likewise. + * config/alpha/vms.h: Likewise. + * config/arc/arc.h: Likewise. + * config/arm/aout.h: Likewise. + * config/arm/coff.h: Likewise. + * config/c4x/c4x.h: Likewise. + * config/h8300/h8300.h: Likewise. + * config/i386/cygwin.h: Likewise. + * config/i386/djgpp.h: Likewise. + * config/i386/gas.h: Likewise. + * config/i386/gstabs.h: Likewise. + * config/i386/i386-coff.h: Likewise. + * config/i386/i386-interix.h: Likewise. + * config/i386/sco5.h: Likewise. + * config/i386/svr3dbx.h: Likewise. + * config/i386/sysv3.h: Likewise. + * config/i386/win32.h: Likewise. + * config/i386/x86-64.h: Likewise. + * config/i960/i960.h: Likewise. + * config/ia64/ia64.h: Likewise. + * config/ip2k/ip2k.h: Likewise. + * config/m32r/m32r.h: Likewise. + * config/m68k/3b1.h: Likewise. + * config/m68k/3b1g.h: Likewise. + * config/m68k/ccur-GAS.h: Likewise. + * config/m68k/coff.h: Likewise. + * config/m68k/hp2bsd.h: Likewise. + * config/m68k/hp310g.h: Likewise. + * config/m68k/hp320g.h: Likewise. + * config/m68k/hp3bsd.h: Likewise. + * config/m68k/hp3bsd44.h: Likewise. + * config/m68k/linux-aout.h: Likewise. + * config/m68k/m68k-aout.h: Likewise. + * config/m68k/mot3300.h: Likewise. + * config/m68k/netbsd.h: Likewise. + * config/m68k/openbsd.h: Likewise. + * config/m68k/pbb.h: Likewise. + * config/m68k/plexus.h: Likewise. + * config/m68k/sun2.h: Likewise. + * config/m68k/sun3.h: Likewise. + * config/m68k/tower-as.h: Likewise. + * config/m68k/vxm68k.h: Likewise. + * config/m88k/aout-dbx.h: Likewise. + * config/m88k/m88k-aout.h: Likewise. + * config/mcore/mcore-elf.h: Likewise. + * config/mcore/mcore-pe.h: Likewise. + * config/mips/elf.h: Likewise. + * config/mips/elf64.h: Likewise. + * config/mips/iris5gas.h: Likewise. + * config/mips/iris6.h: Likewise. + * config/mips/mips.h: Likewise. + * config/mips/sni-gas.h: Likewise. + * config/mmix/mmix.h: Likewise. + * config/ns32k/netbsd.h: Likewise. + * config/pa/pa64-hpux.h: Likewise. + * config/romp/romp.h: Likewise. + * config/rs6000/sysv4.h: Likewise. + * config/rs6000/xcoff.h: Likewise. + * config/sh/coff.h: Likewise. + * config/sh/elf.h: Likewise. + * config/sparc/linux64.h: Likewise. + * config/sparc/liteelf.h: Likewise. + * config/sparc/netbsd.h: Likewise. + * config/sparc/openbsd.h: Likewise. + * config/sparc/pbd.h: Likewise. + * config/sparc/sp64-elf.h: Likewise. + * config/sparc/sp86x-elf.h: Likewise. + * config/sparc/sparc.h: Likewise. + * config/vax/vax.h: Likewise. + * config/vax/vaxv.h: Likewise. + +2002-08-29 "Dhananjay R. Deshpande" + + * h8300.c (shift_alg_hi): Various tweaks to improve performance + of HImode shifts. + (get_shift_alg): Corresponding changes. + +2002-08-29 John David Anglin + + * som.h (ALWAYS_STRIP_DOTDOT): Define to 1. + +2002-08-29 Richard Henderson + + * expr.h (enum block_op_methods): New. + (emit_block_move): Update prototype. + * expr.c (block_move_libcall_safe_for_call_parm): New. + (emit_block_move_via_loop): New. + (emit_block_move): Use them. New argument METHOD. + (emit_push_insn): Always respect the given alignment. + (expand_assignment): Update call to emit_block_move. + (store_expr, store_field, expand_expr): Likewise. + * builtins.c (expand_builtin_apply): Likewise. + (expand_builtin_memcpy, expand_builtin_va_copy): Likewise. + * function.c (expand_function_end): Likewise. + * config/sh/sh.c (sh_initialize_trampoline): Likewise. + * config/sparc/sparc.c (sparc_va_arg): Likewise. + * calls.c (expand_call, emit_library_call_value_1): Likewise. + (save_fixed_argument_area): Use emit_block_move with + BLOCK_OP_CALL_PARM instead of move_by_pieces. + (restore_fixed_argument_area): Likewise. + (store_one_arg): Fix alignment parameter to emit_push_insn. + +2002-08-29 John David Anglin + + * install.texi (hppa64-hp-hpux11*): Document installation procedure. + +2002-08-29 Catherine Moore + + * config/v850/v850.h (MULDI3_LIBCALL, UCMPDI2_LIBCALL, CMPDI2_LIBCALL, + NEGDI2_LIBCALL, INIT_TARGET_OPTABS, MASK_STRICT_ALIGN): Define. + (PREDICATE_CODES): Include new predicates. + (RTX_COSTS): Handle UMOD and UDIV. Tune MULT for v850e. + (TARGET_SWITCHES): Add strict-align. + (TARGET_STRICT_ALIGN): New. + (MASK_DEFAULT, STRICT_ALIGNMENT): Redefine. + * config/v850/t-v850 (MULTILIB_OPTIONS, MULTILIB_DIRNAMES): + Define. + (LIB1ASMFUNCS): Add v850_negdi2, v850_cmpdi2, v850_ucmpdi2, + v850_muldi3. + * config/v850/lib1funcs.asm (L_callt_save_r2_r29, L_return_r2_r29, + L_callt_save_r2_r31, L_return_r2_r31, + L_save_all_interrupt): Change addi to add. + (L_save_interrupt, L_return_interrupt): Rework. + (__return_r31): Correct .size directive. + (mulsi3, divsi3, udivsi3, umodsi3, modsi3): Tune for v850e. + (v850_negdi2, v850_cmpdi2, v850_ucmpdi2, v850_muldi3): + New routines. + * config/v850/v850.c (expand_prologue): Call + gen_callt_save_interrupt, gen_callt_restore_all_interrupt, + gen_callt_return_interrupt and gen_callt_save_all_interrupt. + (reg_or_int9_operand): New predicate. + (reg_or_const_operand): New routine. + * config/v850/v850.md (return_interrupt): Changed from + restore_interrupt. + (callt_save_all_interrupt): Changed from save_all_interrupt_v850e. + (callt_save_interrupt): Change save sequence. + (callt_return_interrupt): New. + (save_interrupt): Don't use runtime function for LONG_CALLS + and TARGET_PROLOG_FUNCTION. + (save_all_interrupt): Likewise. + (mulsi3): Use new predicate. + (moviscc): Disallow some combination of constants. + Fix define_split for sasf insns, so that it will not generate bad + code if operand0 and operand5 are the same. + * config/v850/v850-protos.h: Prototype new predicates. + +2002-08-28 Gabriel Dos Reis + + * c-common.c (builtin_define_type_precision): New function. + (cb_register_builtins): Use it. Define __WCHAR_UNSIGNED__ is + wchar_t is unsigned in C++. + * doc/cpp.texi (Common Predefined Macros): Document + __WCHAR_UNSIGNED__, __CHAR_BIT__, __WCHAR_BIT__, __SHRT_BIT__, + __INT_BIT__, __LONG_BIT__, __LONG_LONG_BIT__, __FLOAT_BIT__, + __DOUBLE_BIT__, __LONG_DOUBLE_BIT__. + +2002-08-28 Sylvain Pion + + * doc/invoke.texi (-Wreorder): Remove remaining pieces from the generic + section. Mention that it is enabled by -Wall. + (-Wall): Mention that there can be language-specific warnings as well. + (-Wctor-dtor-privacy): Mention that it is enabled by default. + (-Wnon-virtual-dtor): Mention that it is enabled by -Wall. + +2002-08-28 J"orn Rennecke + + * sh.c (calc_live_regs): Save FPSCR_REG in an interrupt handler + if it is ever live. + + * sh.c (sh_handle_interrupt_handler_attribute): Reject interrupt_handler + attribute for SHCOMPACT. + + * sh.h (OVERRIDE_OPTIONS): If align_function isn't set, set it + appropriately. + (FUNCTION_BOUNDARY): Specify only the minimum alignment required + by the ABI. + + * sh.h (SH5_WOULD_BE_PARTIAL_NREGS): Also handle TImode case. + +2002-08-28 Jason Thorpe + + * config.gcc (mips*-*-netbsd*): Set target_cpu_default to + "MASK_GAS|MASK_ABICALLS". + * config/mips/netbsd.h (TARGET_ENDIAN_DEFAULT) + (TARGET_DEFAULT): Remove. + (MACHINE_TYPE): Undefine before defining. + (DBX_DEBUGGING_INFO, PREFERRED_DEBUGGING_TYPE): Remove. + +2002-08-27 Mark Mitchell + + * c-common.c (warn_abi): New variable. + * c-common.h (warn_abi): Likewise. + * c-opts.c (COMMAND_LINE_OPTIONS): Add -Wabi. + (c_common_decode_option): Handle it. + * doc/invoke.texi: Document -Wabi. + +2002-08-27 Nicola Pero + + * c-common.c (warn_undeclared_selector): New variable. + * c-common.h (warn_undeclared_selector): Idem. + * c-opts.c (c_common_decode_option): Set warn_undeclared_selector + to on when -Wundeclared-selector is found. + (COMMAND_LINE_OPTIONS): Added -Wundeclared-selector. + * objc/objc-act.c (build_selector_expr): If + warn_undeclared_selector is set, check that the selector has + already been defined, and emit a warning if not. + +2002-08-27 Nick Clifton + Catherine Moore + Jim Wilson + + * config.gcc: Add v850e-*-* target. + Add --with-cpu= support for v850. + * config/v850/lib1funcs.asm: Add v850e callt functions. + * config/v850/v850.h: Add support for v850e target. + * config/v850/v850.c: Add functions to support v850e target. + * config/v850/v850-protos.h: Add prototypes for new functions in v850.c. + * config/v850/v850.md: Add patterns for v850e instructions. + * doc/invoke.texi: Document new v850e command line switches. + +2002-08-27 J"orn Rennecke + Aldy Hernandez + + * doc/tm.texi: Applied numerous fixes to the automaton based + scheduler descrition. + +2002-08-27 Jan Hubicka + + * i386.c (classify_argument): Handle variable sized objects. + +2002-08-27 Jan Hubicka + + * i386.c (ix86_expand_int_movcc): Fix RTL sharing problem + +2002-08-27 Jan Hubicka + + * libgcc2.c (__bb_exit_func): Properly write the summarized statistics. + +2002-08-27 Jan Hubicka + + * i386.c (classify_argument): Properly compute word size of the analyzed object. + +2002-08-27 J"orn Rennecke + + * sh.md (attribute type): Add types mt_group, fload, pcfload, fpul_gp, + mac_gp ftrc_s and cwb. Add / Adjust definitions in individual insn + accordingly. + (attribute insn_class): Provide default definitions based on type. + Remove all insn-specific settings. + (various function units): Remove old SH4 scheduling. + (branch_zero, dfp_comp, late_fp_use, any_fp_comp, any_int_load): + New attributes. Set them where appropriate. + (cpu unit FS): Don't define / use. + (F3, load_store): New cpu units. + (F01): New reservation. + (all insn_reservations): Make dependent on sh4 pipeline model. + Fix latencies. + (nil, reg_mov, freg_mov, sh4_fpul_gp, sh4_call): New insn_reservations. + (sh4_mac_gp, fp_arith_ftrc, arith3, arith3b): Likewise. + (mt insn_reservation): Use type mt_group. + (insn_reservation load_store): Split into sh4_load, sh4_load_si, + sh4_fload and sh4_store. + (insn_reservation branch_zero and branch): Replace with sh4_branch. + (insn_reservation branch_far): Replace with sh4_return. + (insn_reservation return_from_exp): Rename to: + (sh4_return_from_exp). Change to be just d_lock*5. + (insn_reservation lds_to_pr): Rename to: + (sh4_lds_to_pr). Change to be just d_lock*2. + (insn_reservation ldsmem_to_pr, sts_from_pr): Change to be just + d_lock*2. + (insn_reservation prload_mem): Rename to: + (sh4_prstore_mem). Change to d_lock*2,nothing,memory. + (insn_reservation fpscr_store): Rename to: + (fpscr_load). Change to d_lock,nothing,F1*3. + (insn_reservation fpscr_store_mem): Rename to: + (fpscr_load_mem). Change to d_lock,nothing,(F1+memory),F1*2. + (insn_reservation multi): Change to + d_lock,(d_lock+f1_1),(f1_1|f1_2)*3,F2. + (insn_reservation fp_arith): Change to issue,F01,F2. + (insn_reservation fp_div: Change to issue,F01+F3,F2+F3,F3*7,F1+F3,F2. + (insn_reservation dp_float): Change to issue,F01,F1+F2,F2. + (insn_reservation fp_double_arith): Change to issue,F01,F1+F2,fpu*4,F2. + (insn_reservation fp_double_cmp): Change to + d_lock,(d_lock+F01),F1+F2,F2. + (insn_reservation dp_div): Change to + issue,F01+F3,F1+F2+F3,F2+F3,F3*16,F1+F3,(fpu+F3)*2,F2. + * sh.c (flow_dependent_p, flow_dependent_p_1): New functions. + (sh_adjust_cost, SHcompact): Differentiate between different + kinds of dependencies. Drop factor of ten for superscalar. + Use new instruction types. Add new exception rules. + + * sh.md (mulhisi3, umulhisi3: Add a REG_EQUAL note. + + * sh.md (mperm_w): Add DONE. + +2002-08-27 David Edelsohn + + * longlong.h: Import current PowerPC defintion from GMP-4.1. + + * config/rs6000/rs6000.h (MIN_UNITS_PER_WORD): Add IN_LIBGCC2 case. + + * config/rs6000/linux64.h (ADJUST_FIELD_ALIGN): Undef before define. + +2002-08-27 J"orn Rennecke + + * sh.h (MAX_FIXED_MODE_SIZE): Define. + +2002-08-27 Gabriel Dos Reis + + * doc/cpp.texi (Common Predefined Macros): Don't mess with table + delimiter. + +2002-08-27 Gabriel Dos Reis + + * c-common.c (cpp_define_data_format): New function. + (cb_register_builtins): Call it. + + * doc/cpp.texi (Common Predefined Macros): Document + __TARGET_BITS_ORDER__, __TARGET_BYTES_ORDER__, + __TARGET_INT_WORDS_ORDER__, __TARGET_FLOAT_WORDS_ORDER__, + __TARGET_FLOAT_FORMAT__, __TARGET_USES_VAX_F_FLOAT__, + __TARGET_USES_VAX_D_FLOAT__, __TARGET_USES_VAX_G_FLOAT__, + __TARGET_USES_VAX_H_FLOAT__. + +2002-08-26 Ziemowit Laski + + * objc/objc-act.c (get_super_receiver): If inside a class method + of a category, cast the receiver to 'id' before accessing the 'isa' + field so that is not needed. For NeXT runtime. + +2002-08-26 Ulrich Weigand + + * config/s390/s390-protos.h (s390_function_prologue, + s390_function_epilogue): Remove. + config/s390/s390.c (s390_function_prologue, s390_function_epilogue, + TARGET_ASM_FUNCTION_PROLOGUE, TARGET_ASM_FUNCTION_EPILOGUE): Remove. + + config/s390/s390.c (s390_machine_dependent_recorg): New function. + config/s390/s390-protos.h (s390_machine_dependent_reorg): Declare it. + config/s390/s390.h (MACHINE_DEPENDENT_REORG): Call it. + config/s390/s390.c (s390_split_branches, s390_chunkify_pool): Adapt + to being called from MACHINE_DEPENDENT_REORG. Update regs_ever_live. + + config/s390/s390.c (s390_frame_info): Inline save_fprs_p. Always + assume BASE_REGISTER and RETURN_REGNUM need to be saved. + (s390_emit_prologue): Assume RETURN_REGNUM to be saved iff + function is not a leaf function. Use save_gprs and restore_gprs. + (s390_emit_epilogue): Likewise. + (save_gprs, restore_gprs): New functions. + (struct s390_frame): Remove return_reg_saved_p member. + (save_fprs_p): Remove. + (s390_optimize_prolog): New function. + (s390_legitimate_reload_constant): Remove now unnecessary check. + + (s390_function_count): Remove. + (s390_output_symbolic_const): Replace s390_function_count by + current_function_funcdef_no. + (s390_output_constant_pool): Likewise. + + (legitimize_pic_address): Use regs_ever_live to track PIC register + instead of current_function_uses_pic_offset_table. + (s390_emit_prologue): Likewise. + config/s390/s390.md ("call", "call_value"): Likewise. + +2002-08-26 Neil Booth + + * c-opts.c (find_opt): Don't complain about wrong languages + here. Return exact matches even for wrong language. + (c_common_decode_option): Complain about wrong languages + here. + +2002-08-24 Stuart Hastings + + * function.h (struct function): Add flag + all_throwers_are_sibcalls. + * except.c (set_nothrow_function_flags): Replaces + nothrow_function_p. Set new flag. + * except.h (set_nothrow_function_flags): Replaces + nothrow_function_p. + * dwarf2out.c (struct dw_fde_struct): Add flag + all_throwers_are_sibcalls. + (output_call_frame_info): Test it. + (dwarf2out_begin_prologue) Propagate it from cfun to + dw_fde_struct. + * toplev.c (rest_of_compilation): Update calls to + nothrow_function_p. + +2002-08-23 Zack Weinberg + + * ggc-page.c (compute_inverse): Short circuit calculation for + object sizes larger than half a page. + +2002-08-23 David Edelsohn + + * config/rs6000/rs6000.c (rs6000_elf_select_section): Treat + DEFAULT_ABI == ABI_AIX like PIC. Test PIC & reloc for readonly + default. + (rs6000_elf_unique_section): Likewise. + +2002-08-23 Kaveh R. Ghazi + + * ns32k.c (ns32k_globalize_label): Delete. + * ns32k.h (ASM_OUTPUT_LABEL, TARGET_ASM_GLOBALIZE_LABEL): Delete. + +2002-08-23 Alan Modra + + * config/rs6000/rs6000.c (output_mi_thunk): Don't determine insns + for loading delta with num_insns_constant_wide. Calculate + delta_low, delta_high without using a conditional. + +2002-08-22 Jason Merrill + + * c-common.h (RETURN_STMT_EXPR): Rename from RETURN_EXPR. + * c-common.def: Adjust. + * c-dump.c (c_dump_tree): Adjust. + * c-semantics.c (genrtl_return_stmt): Adjust. + * c-pretty-print.c (pp_c_statement): Adjust. + * tree-inline.c (copy_body_r): Adjust. + +2002-08-22 Zack Weinberg + + * ggc-page.c: Avoid division in ggc_set_mark. + (DIV_MULT, DIV_SHIFT, OFFSET_TO_BIT, inverse_table, + compute_inverse): New. + (ggc_set_mark, ggc_marked_p): Use OFFSET_TO_BIT. + (init_ggc): Initialize inverse_table. + +2002-08-22 Tom Tromey + + * doc/install.texi (Configuration): Document --datadir. + +2002-08-22 Alexandre Oliva + + * Makefile.in ($(BUILD_PREFIX_1)varray.o): Depend on $(GGC_H). + +2002-08-22 Hans-Peter Nilsson + + * gengtype-lex.l (ID): Allow underscore as first character. + +2002-08-21 David Edelsohn + + * config/rs6000/rs6000.c (rs6000_xcoff_asm_globalize_label): New + function. + (rs6000_xcoff_asm_named_section): Rename. + * config/rs6000/xcoff.h (TARGET_ASM_GLOBALIZE_LABEL): Define. + +2002-08-21 Tom Tromey + + For PR java/6005 and PR java/7611: + * fold-const.c (fold_truthop): Use can_use_bit_fields_p. + (fold): Likewise. + * langhooks.c (lhd_can_use_bit_fields_p): New function. + * langhooks-def.h (lhd_can_use_bit_fields_p): Declare. + (LANG_HOOKS_CAN_USE_BIT_FIELDS_P): New define. + (LANG_HOOKS_INITIALIZER): Use it. + * langhooks.h (struct lang_hooks) [can_use_bit_fields_p]: New + field. + +2002-08-21 Stan Shebs + + * tree.c (finish_vector_type): Fix a typo in a comment. + * Makefile.in: Fix "the the" stutters in comments. + * genautomata.c: Ditto. + * ifcvt.c: Ditto. + * regrename.c: Ditto. + * config/alpha/alpha.c: Ditto. + * config/alpha/vms-crt0-64.c: Ditto. + * config/alpha/vms-crt0.c: Ditto. + * config/alpha/vms-psxcrt0-64.c: Ditto. + * config/alpha/vms-psxcrt0.c: Ditto. + * config/d30v/d30v.h: Ditto. + * config/fr30/fr30.h: Ditto. + * config/rs6000/rs6000.c: Ditto. + * config/stormy16/stormy16.h: Ditto. + * doc/md.texi: Ditto. + 2002-08-21 John David Anglin * cppinit.c (remove_dup_nonsys_dirs): Fix warning and return value. +2002-08-21 Joseph S. Myers + + * c-decl.c (grokdeclarator): Make invalid combinations with long, + short, signed or unsigned into hard errors. Fixes PR c/4319. + Also make duplicate modifiers such as "short short" into hard + errors. + +2002-08-21 Andrew Pinski + Kaveh R. Ghazi + + * doc/tm.texi (TARGET_ASM_GLOBALIZE_LABEL): Move '@end deftypefn' + to the actual end. Add '@end table' and '@table @code'. + +2002-08-20 Geoffrey Keating + + * doc/tm.texi (Label Output): Add missing '@end deftypefn'. + + * unroll.c (biv_total_increment): Don't try to compute the total + increment for FP BIVs. + +2002-08-20 Kaveh R. Ghazi + + * alpha.c (TARGET_ASM_GLOBALIZE_LABEL): Define for unicosmk. + * alpha/elf.h (ASM_OUTPUT_EXTERNAL_LIBCALL, + ASM_OUTPUT_ALIGNED_BSS): Use target hook. + * alpha/osf.h (ASM_OUTPUT_WEAK_ALIAS): Likewise. + * alpha/unicosmk.h (ASM_GLOBALIZE_LABEL): Delete. + * arm/aof.h (ASM_GLOBALIZE_LABEL): Likewise. + (GLOBAL_ASM_OP): Define. + * arm.c (aof_globalize_label): New function. + (TARGET_ASM_GLOBALIZE_LABEL): Define for AOF. + * arm/unknown-elf.h (ASM_OUTPUT_ALIGNED_BSS): Use target hook. + * c4x.c (c4x_globalize_label): New function. + (TARGET_ASM_GLOBALIZE_LABEL): Define for c4x. + * c4x.h (ASM_GLOBALIZE_LABEL): Delete. + (GLOBAL_ASM_OP): Define. + * cris/aout.h (ASM_OUTPUT_EXTERNAL_LIBCALL): Use target hook. + * darwin-protos.h (darwin_globalize_label): Declare. + * darwin.c (darwin_globalize_label): New function. + * darwin.h (ASM_DECLARE_CLASS_REFERENCE): Use target hook. + (ASM_GLOBALIZE_LABEL): Delete. + (GLOBAL_ASM_OP, TARGET_ASM_GLOBALIZE_LABEL): Define. + * dsp16xx.c (asm_output_common): Use target hook. + * elfos.h (ASM_OUTPUT_EXTERNAL_LIBCALL): Likewise. + * frv.h (ASM_GLOBALIZE_LABEL): Delete. + (GLOBAL_ASM_OP): Define. + * i370.c (i370_globalize_label): New function. + (TARGET_ASM_GLOBALIZE_LABEL): Define for i370. + * i370.h (ASM_GLOBALIZE_LABEL): Delete. + * i386.c (ix86_asm_file_end): Use target hook. + * i386/sco5.h (ASM_GLOBALIZE_LABEL): Don't undef. + (ASM_OUTPUT_EXTERNAL_LIBCALL): Use target hook. + * ia64.c (ia64_asm_output_external): Likewise. + * ia64/sysv4.h: Update comment. + * m32r.h (ASM_OUTPUT_ALIGNED_BSS): Use target hook. + * mips/elf.h (ASM_OUTPUT_ALIGNED_BSS): Likewise. + * mips/iris5.h (ASM_OUTPUT_WEAK_ALIAS): Use target hook. + * mips/linux.h (ASM_OUTPUT_ALIGNED_BSS): Likewise. + * mips.h (ASM_OUTPUT_ALIGNED_DECL_COMMON): Use target hook. + * mmix-protos.h (mmix_asm_globalize_label): Delete. + * mmix.c (mmix_asm_globalize_label): Likewise. + * mmix.h (ASM_GLOBALIZE_LABEL): Likewise. + (GLOBAL_ASM_OP): Define. + * ns32k.c (ns32k_globalize_label): New function. + * ns32k.h (TARGET_ASM_GLOBALIZE_LABEL): Define for ns32k. + (ASM_GLOBALIZE_LABEL): Delete. + * pa/pa-linux.h (ASM_GLOBALIZE_LABEL): Don't undef. + (TARGET_ASM_GLOBALIZE_LABEL): Undefine. + * pa.c (pa_globalize_label): New function. + * pa.h (ASM_GLOBALIZE_LABEL): Delete. + (TARGET_ASM_GLOBALIZE_LABEL): Define for pa. + * rs6000/darwin.h (ASM_GLOBALIZE_LABEL): Delete. + (GLOBAL_ASM_OP): Define. + (TARGET_ASM_GLOBALIZE_LABEL): Undef. + * rs6000/sysv4.h (ASM_OUTPUT_ALIGNED_BSS): Use target hook. + * rs6000/xcoff.h (ASM_GLOBALIZE_LABEL): Delete. + (GLOBAL_ASM_OP): Define. + * v850.c (v850_output_aligned_bss): Use target hook. + * vax.c (vms_globalize_label): New function. + (TARGET_ASM_GLOBALIZE_LABEL): Define for vms. + * vax/vms.h (ASM_GLOBALIZE_LABEL): Delete. + (GLOBAL_ASM_OP): Define. + * defaults.h (ASM_GLOBALIZE_LABEL): Delete. + * doc/tm.texi: Update docs. + * dwarf2out.c (default_eh_frame_section, output_die_symbol): Use + target hook. + * final.c (output_alternate_entry_point): Likewise. + * hooks.c (hook_FILEptr_constcharptr_void): New function. + * hooks.h (hook_FILEptr_constcharptr_void): Declare. + * output.h (assemble_global): Delete. + (default_globalize_label): Declare. + * system.h (ASM_GLOBALIZE_LABEL): Poison. + * target-def.h (TARGET_ASM_GLOBALIZE_LABEL): Define. + (TARGET_ASM_OUT): Add TARGET_ASM_GLOBALIZE_LABEL. + * target.h (gcc_target): Add globalize_label member. + * varasm.c (asm_output_bss, asm_output_aligned_bss, + globalize_decl): Use target hook. + (assemble_global): Delete. + (default_globalize_label): New function. + +2002-08-20 Kaveh R. Ghazi + + * dsp16xx.h (dsp16xx_umulhi3_libcall): Delete. + +2002-08-20 Devang Patel + * tree.c (get_qualified_type): Add TYPE_CONTEXT check. + +2002-08-20 Kaveh R. Ghazi + + * arc.c (output_shift): Use stdio instead of asm_fprintf. + * arm.c (thumb_output_function_prologue): Likewise. + * avr.c (print_operand): Likewise. + * c4x.c (c4x_print_operand): Likewise. + * c4x.h (ASM_OUTPUT_INTERNAL_LABEL, TRAMPOLINE_TEMPLATE, + ASM_OUTPUT_REG_PUSH, ASM_OUTPUT_REG_POP): Likewise. + * cris.c (cris_target_asm_function_prologue, + cris_asm_output_mi_thunk): Likewise. + * h8300.c (print_operand): Likewise. + * h8300.h (ASM_OUTPUT_ADDR_VEC_ELT): Likewise. + * ip2k.c (print_operand): Likewise. Fix format specifier. + * m68hc11.c (asm_print_register, print_operand, + print_operand_address): Use stdio instead of asm_fprintf. + (print_operand_address): Fix format specifier. + * m68hc11.h (FUNCTION_PROFILER, ASM_OUTPUT_ADDR_DIFF_ELT, + ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ALIGN): Use stdio instead of + asm_fprintf. + * m68k/amix.h (ASM_OUTPUT_INTERNAL_LABEL): Likewise. + * m68k/atari.h (ASM_OUTPUT_INTERNAL_LABEL): Likewise. + * m68k.c (m68k_output_function_prologue, + m68k_output_function_epilogue, print_operand): Likewise. + * mmix.c (mmix_asm_output_mi_thunk, mmix_asm_weaken_label): + Likewise. Fix format specifier. + * mn10200.h (ASM_OUTPUT_ADDR_VEC_ELT): Likewise. + * mn10300.h (ASM_OUTPUT_ADDR_VEC_ELT): Likewise. + * v850.h (ASM_OUTPUT_ADDR_VEC_ELT): Likewise. + +2002-08-15 Eric Christopher + Jeff Knaggs + + * config.gcc (mipsisa64sr71k-elf): New target. + * config/mips/sr71k.md: New file. + * config/mips/mips.md: Use it. + (rot*): Add sr71k specifics. + * config/mips/t-sr71k: New file. + * config/mips/mips.h (sr71k): New cpu. + (TARGET_SR71K): Use it. + (TUNE_SR71K): Ditto. + (GENERATE_BRANCHLIKELY): Ditto. + (ISA_HAS_MULHI, ISA_HAS_MULS, ISA_HAS_MSAC, ISA_HAS_MACC, + ISA_HAS_ROTR_SIISA_HAS_ROTR_DI): Ditto. + * config/mips/mips.c (sr71k): New cpu. + (mips_use_dfa_pipeline_interface): Use. + +2002-08-15 Eric Christopher + Richard Sandiford + Aldy Hernandez + Graham Stott + Michael Meissner + Gavin Romig-Koch + Ken Raeburn + Alexandre Oliva + + * config.gcc (mips64vr-elf): New target. + * config/mips/5400.md: New file. + * config/mips/5500.md: Ditto. + * config/mips/mips.md: Use them. + (frsqrt): New. + * config/mips/mips.c (vr4111, vr4121, vr4320, vr5400, vr5500): New + cpus. + (mips_issue_rate): Use them. + (mips_use_dfa_pipeline_interface): New function. Use for 5400 and 5500. + (TARGET_SCHEDUSE_DFA_PIPELINE_INTERFACE): Define. Use above. + * config/mips/mips.h (vr4111, vr4121, vr4320, vr5400, vr5500): New + cpus. + (TARGET_MIPSx): Use them. + (TUNE_MIPSx): Ditto. + (GETNATE_MULT3_SI): Ditto. + (ISA_HAS_BRANCHLIKELY): Ditto. + (ISA_HAS_CONDMOVE): Ditto. + (ISA_HAS_NMADD_NMSUB): Ditto. + (ISA_HAS_MULHI): New. Ditto. + (ISA_HAS_MULS): Ditto. + (ISA_HAS_MSAC): Ditto. + (ISA_HAS_MACC): Ditto. + (ISA_HAS_ROTR_SI): Ditto. + (ISA_HAS_ROTR_DI): Ditto. + (RTX_COSTS): Use. + 2002-08-20 John David Anglin * cppinit.c (remove_dup_dir): Add head_ptr argument to handle removal @@ -1131,246 +12101,162 @@ Thu Sep 5 00:34:33 2002 J"orn Rennecke this option. * doc/invoke.texi (-I): Update. -2002-09-30 Richard Earnshaw +2002-08-20 Richard Henderson + + * expr.c (TARGET_MEM_FUNCTIONS): Transform to boolean. + (emit_block_move): Split out subroutines. + (emit_block_move_via_movstr): New. + (emit_block_move_via_libcall): New. Emit bcopy via normal call also. + (emit_block_move_libcall_fn): New. Construct function prototype for + bcopy as well. + (clear_storage): Split out subroutines. + (clear_storage_via_clrstr): New. + (clear_storage_via_libcall): New. Emit bzero as a normal call also. + (clear_storage_libcall_fn): New. Construct function prototype for + bzero as well. + (emit_push_insn): Use emit_block_move. + (expand_assignment): Booleanize TARGET_MEM_FUNCTIONS. + (store_constructor): Likewise. + +2002-08-19 Ziemowit Laski + + * objc/objc-act.c (building_objc_message_expr): Rename to + current_objc_message_selector. + +2002-08-19 Ziemowit Laski + + * objc/objc-act.c (build_ivar_chain): Remove. + (objc_copy_list): Likewise. + (get_class_ivars): Inline call to removed build_ivar_chain + function. Save off a clean copy of ivars in the CLASS_OWN_IVARS + slot; use that slot (rather than CLASS_IVARS) when accessing + ivars for base classes. Call copy_list and chainon instead of + objc_copy_list. + (build_private_template): Call get_class_ivars instead of + build_ivar_chain. + (start_class): Allocate room for the CLASS_OWN_IVARS slot. + (continue_class): Call get_class_ivars instead of + build_ivar_chain. + (encode_field_decl): Check for DECL_BIT_FIELD_TYPE instead + of DECL_BIT_FIELD (which may have been cleared). + * objc/objc-act.h (CLASS_OWN_IVARS): New accessor macro. + +2002-08-19 Kaveh R. Ghazi + + * genautomata.c (output_translate_vect, output_state_ainsn_table, + output_min_issue_delay_table): Mark variable with ATTRIBUTE_UNUSED + in output file. + (output_internal_min_issue_delay_func): Initialize variable in + output file. + +2002-08-19 Alexandre Oliva + + * Makefile.in (GCC_FOR_TARGET): Prepend STAGE_CC_WRAPPER. + (stage2_build, stage3_build, stage4_build): Likewise, to CC. + +2002-08-19 Geoffrey Keating + Steve Ellcey + + * machmode.h (SCALAR_INT_MODE_P): New macro to test for + scaler integer mode (MODE_INT or MODE_PARTIAL_INT). + * explow.c (trunc_int_for_mode): Abort when the mode is not + a scaler integer mode. + * combine.c (expand_compound_operation): Don't expand Vector + or Complex modes into shifts. + (expand_field_assignment): Don't do bitwise arithmatic and + shifts on Vector or Complex modes. + (simplify_comparison): Don't call trunc_int_for_mode + for VOIDmode. + * recog.c (general_operand): Likewise. + (immediate_operand): Likewise. + (nonmemory_operand): Likewise. + +2002-08-19 David Edelsohn + + * config/rs6000/rs6000.c (rs6000_emit_set_const): Inline + multi-instruction SImode constant. Add REG_EQUAL note. + * config/rs6000/rs6000.md (movsi splitter): Use + rs6000_emit_set_const. + +2002-08-19 Kaveh R. Ghazi + + * tree-inline.c (initialize_inlined_parameters): Wrap variable in + the macro test controlling its use. + +2002-08-18 H.J. Lu (hjl@gnu.org) + + * config.gcc (*-*-linux*): Set extra_parts="crtbegin.o + crtbeginS.o crtbeginT.o crtend.o crtendS.o", gas=yes and + gnu_ld=yes. + (alpha*-*-linux*, cris-*-linux*, i370-*-linux*, + i[34567]86-*-linux*, x86_64-*-linux*, mips*-*-linux*, + s390-*-linux*, s390x-*-linux*, sparc-*-linux*, sparc64-*-linux*, + xtensa-*-linux*): Remove setting extra_parts, gas, and gnu_ld + here. + (cris-*-linux*): Remove setting thread_file here. + +2002-08-18 Neil Booth + + PR preprocessor/7602 + * cppinit.c (path_include): Treat the system environment + variables as being cxx_aware. + +2002-08-17 Joseph S. Myers + + * c-decl.c (flexible_array_type_p): New function. + (grokdeclarator, finish_struct): Use it. + * doc/extend.texi: Document constraints on use of structures with + flexible array members. + +2002-08-17 Richard Sandiford + + * config/mips/t-coff, config/mips/t-elf, config/mips/t-isa3264, + config/mips/t-r3900 (MULTILIB_MATCHES): Define. + * config/mips/mips.h (ASM_SPEC): Use %(endian_spec). + +2002-08-16 Stan Shebs - * 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. + * c-common.c (cb_register_builds): Define __NEXT_RUNTIME__ + for ObjC with -fnext-runtime. + * doc/cpp.texi: Document it. -2002-09-29 David S. Miller +2002-08-16 Janis Johnson + + * doc/install.texi (Final installation): Replace links to individual + build status pages with a link to a common page that lists them all. + +2002-08-16 Sylvain Pion + + * doc/invoke.texi: Fix typo. + +2002-08-16 David Edelsohn - * config/sparc/linux64.h (STARTFILE_SPEC32, ENDFILE_SPEC32): Kill - hardcoded paths. + * doc/install.texi (*-ibm-aix*): Explain AIX shared object versioning. -2002-09-27 Alexander N. Kabaev +2002-08-16 Andrew Haley - 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. + * 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-09-26 David S. Miller +2002-08-15 Richard Henderson - PR optimization/7335 - * calls.c (emit_library_call_value_1): Passing args by reference - converts a CONST function into a PURE one. + * 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-09-26 Richard Henderson - - PR c/7160 - * sched-deps.c (sched_analyze_insn): Make clobber insns depend - on call insns. - -2002-09-27 Alan Modra - - * doloop.c (doloop_modify_runtime ): Adjust - by absolute loop increment, not loop increment. - -2002-09-25 David S. Miller - - PR target/7842 - * config/sparc/sparc.c (set_extends): SImode ASHIFT does not - extend. - -2002-09-20 Jeroen Dobbelaere - - * config/arm/arm.md (sign_extract_onebit, not_signextract_onebit): - Add clobber of the condition code register. - -2002-09-18 Richard Earnshaw (rearnsha@arm.com) - - PR optimization/7967 - * arm.md (ne_zeroextractsi): Add clobber of the condition code - register. - -2002-09-17 Richard Henderson - - * sibcall.c (optimize_sibling_and_tail_recursive_call): Also remove - RTX_UNCHANGING_P markers for successful tail-recursive replacement. - -2002-09-16 Richard Henderson - - PR opt/7515 - * c-objc-common.c (c_cannot_inline_tree_fn): Don't auto-inline - functions that don't bind locally. - -2002-09-17 Alan Modra - - Merge from mainline. - 2002-07-20 Alan Modra - PR optimization/7130 - * loop.h (struct loop_info): Add "preconditioned". - * unroll.c (unroll_loop): Set it. - * doloop.c (doloop_modify_runtime): Correct count for unrolled loops. - - 2002-06-24 Alan Modra - PR optimization/6984 - * doloop.c (doloop_valid_p): Correct comment. - (doloop_modify_runtime ): Simplify. - (doloop_modify_runtime ): Don't emit code when NE. - -2002-09-16 Jeff Law - - * libgcc2.c: Do not include machmode.h. - -2002-09-16 Jason Merrill - Danny Smith - - * config/i386/winnt.c (ix86_handle_dll_attribute): Set - DECL_EXTERN and TREE_PUBLIC for dllimported variables here... - (i386_pe_mark_dllimport): Not here. - -2002-09-14 Stephane Carrez - - * config/m68hc11/m68hc11.md ("movdi_internal"): Allow any offsetable - memory operand when source is 0 (K constraint). - ("movsi_internal"): Likewise. - ("movdf_internal"): Likewise. - ("movsf_internal"): Likewise. - -2002-09-14 Alan Modra - - Merge from mainline. - 2002-09-14 Alan Modra - * doc/tm.texi (DBX_OUTPUT_NFUN): Describe. - * dbxout.c (dbxout_function_end): Use DBX_OUTPUT_NFUN. - * config/rs6000/linux64.h (DBX_OUTPUT_NFUN): Define. - - 2002-08-27 David Edelsohn - * config/rs6000/linux64.h (ADJUST_FIELD_ALIGN): Undef before define. - - 2002-08-02 Alan Modra - * config/rs6000/linux64.h (DBX_OUTPUT_BRAC): Define. - (DBX_OUTPUT_LBRAC, DBX_OUTPUT_RBRAC): Define. - * config/rs6000/rs6000.c (output_toc): Don't use lshift_double when - HOST_BITS_PER_WIDE_INT == 64. - - 2002-07-27 Alan Modra - * config/rs6000/rs6000.c (output_profile_hook): Don't generate profile - label reference when NO_PROFILE_COUNTERS. - - 2002-07-11 Alan Modra - * config/rs6000/linux64.h (ASM_SPEC): Define. - -2002-09-13 Alan Modra - - Merge from mainline. - 2002-07-24 Alan Modra - PR c/7150, target/7380 - * config/rs6000/rs6000.md: Remove scratch reg on insns using - addze and similar (plus (comparison r1 r2) r3) insns. Add - missing scratch reg in one case. Formatting fixes. - - 2002-07-18 Alan Modra - PR other/7114, target/5967 - * config/rs6000/rs6000.c (first_reg_to_save): Remove bogus - adjustments to first_reg for profiling case. - (output_function_profiler): Correct lr save slot for ABI_AIX_NODESC. - Disable profiling for 64 bit code on both ABI_V4 and ABI_AIX_NODESC. - Save static chain reg to sp + 12 on ABI_AIX_NODESC. - * config/rs6000/sysv4.h (ASM_OUTPUT_REG_PUSH): Define. - (ASM_OUTPUT_REG_POP): Define. - * config/rs6000/linux64.h (ASM_OUTPUT_REG_PUSH): Undef. - (ASM_OUTPUT_REG_POP): Undef. - - 2002-06-30 Alan Modra - PR optimization/7120 - * unroll.c (loop_iterations): Handle EQ loops. - -2002-09-13 Alan Modra - - * config/rs6000/rs6000.c (rs6000_emit_load_toc_table): Remove "if" - nesting. Correct test for non-PowerPC64 ELF ABI_AIX. - * config/rs6000/rs6000.md (load_toc_v4_PIC*): Disable when ABI_AIX. - -2002-09-12 Janis Johnson - - * doc/compat.texi: New file with new chapter, Binary Compatibility. - -2002-09-12 Jason Merrill - - * calls.c (store_one_arg): Use size_in_bytes to determine the - amount of space to push. - -2002-09-12 Jakub Jelinek - - * config/sparc/linux64.h (STARTFILE_SPEC32): Fix a typo. - -2002-09-12 Alan Modra - - * emit-rtl.c (set_mem_size): New function. - * expr.h (set_mem_size): Declare. - * config/rs6000/rs6000.c (expand_block_move_mem): Exterminate. - (expand_block_move): Instead, use adjust_address and - replace_equiv_address to generate proper aliasing info. - Move common code out of conditionals. Localize vars. - -2002-09-11 Alexander Kabaev - - Wed Apr 24 13:48:25 CEST 2002 Jan Hubicka - * loop.c (canonicalize_condition): Use gen_int_mode. - -2002-09-11 Janis Johnson - - * Makefile.in (TEXI_GCC_FILES): Add compat.texi. - * doc/gcc.texi (Top): Add new chapter, Binary Compatibility, and - include its file, compat.texi. - * doc/trouble.texi (Interoperation): Update information about C++ ABI - issues. - * doc/invoke.texi (-fshort-wchar): Move to Code Generation Options. - (-fpcc-struct-return, -freg-struct-return, -fshort-enums, - -fshort-double, -fshort-wchar, -fpack-struct, -fleading-underscore): - Warn that these options can break ABI compatibility. - (Many places): Fix overfull hboxes. - - * doc/extend.texi: Fix a broken link; fix overfull hboxes. - * doc/install.texi: Fix a typo, some formatting directives, and - overfull hboxes. - * doc/c-tree.texi: Fix overfull hboxes. - * doc/cppopts.texi: Ditto. - * doc/makefile.texi: Ditto. - * doc/rtl.texi: Ditto. - * doc/standards.texi: Ditto. - * doc/tm.texi: Ditto. - -2002-09-08 Alan Modra - - * reload.c (find_reloads

): Pass operand_mode to - find_reloads_address. - -2002-09-07 Scott Snyder - - PR target/7374 - * config/alpha/alpha.md (abstf2): Fix typo: 'neg' for 'abs'. - -2002-09-07 Glen Nakamura - - PR opt/7814 - * sched-deps.c (sched_analyze_insn): Make sure to add insn - to reg_last->sets after flushing the dependency lists to guarantee - that subsequent clobbers will be dependent on it. - -2002-09-07 Alan Modra - - * config/rs6000/linux64.h (ASM_PREFERRED_EH_DATA_FORMAT): Define. - -2002-09-06 Jakub Jelinek - - * configure.in (HAVE_AS_OFFSETABLE_LO10): Use -xarch=v9 - unconditionally when gcc_cv_as_flags64 checks are gone. - * configure: Rebuilt. - -2002-09-04 Eric Botcazou - - PR c/7102 - * optabs.c (expand_binop): Convert CONST_INTs in all cases. - -2002-09-04 Jason Thorpe - - * config/sparc/t-netbsd64: Disable multilib for now. - -2002-09-01 Alexandre Oliva +2002-08-15 Alexandre Oliva * c-tree.h (skip_evaluation): Move declaration... * c-common.h: ... here. @@ -1380,153 +12266,785 @@ Thu Sep 5 00:34:33 2002 J"orn Rennecke around TYPEOF. (typespec_nonreserved_nonattr): Use it. -2002-09-01 Marek Michalkiewicz +2002-08-15 Douglas B Rupp - 2002-08-13 Denis Chertykov - * config/avr/avr.md: Call CC_STATUS_INIT in all peepnoles - which can change CC0. + * 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-29 Rodney Brown +2002-08-15 Steve Ellcey - * doc/install.texi (Specific, alpha*-dec-osf*): Add "virtual - memory exhausted" workarounds. + * 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-29 John David Anglin +2002-08-15 Kaveh R. Ghazi - * install.texi (hppa64-hp-hpux11*): Document installation procedure. + * loop.c (scan_loop, move_movables, count_one_set): Cast to avoid + signed/unsigned warnings. -2002-08-28 Jason Merrill + * regclass.c (init_reg_sets_1, choose_hard_reg_mode, + record_reg_classes): Likewise. - * 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. + * reload.c (reload_inner_reg_of_subreg, push_reload, + find_reloads_address_1): Likewise. -2002-08-28 Daniel Berlin +2002-08-15 David Edelsohn - * tree-inline.c (expand_call_inline): Make the statement - expression we generate have a COMPOUND_STMT. + * rs6000.c (output_mi_thunk): Return to function section on + TARGET_ELF. -2002-08-27 Mark Mitchell + * rs6000-c.c (rs6000_cpu_cpp_builtins): Define __PPC405__ if PPC405. - * doc/invoke.texi: Document -Wabi. +2002-08-15 Ulrich Weigand -2002-08-23 David Edelsohn + * config/s390/s390.c (legitimize_address): Optimize loading + of large displacements. - * config/rs6000/rs6000.c (rs6000_select_section): Treat - DEFAULT_ABI == ABI_AIX like PIC. Test PIC & reloc for readonly - default. - (rs6000_unique_section): Likewise. +2002-08-14 Douglas B Rupp -2002-08-22 Jason Merrill + * config/alpha/alpha-protos.h: Update. - * 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/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. -2002-08-23 Alan Modra + (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. - * 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. + (alpha_need_linkage): Rewrite. + (alpha_use_linkage): New global function. + (alpha_write_linkage): Rewrite and make static. + (alpha_write_one_linkage): Rewrite -2002-08-20 Andreas Jaeger + (alpha_start_function): Remove procedure descriptor output. + (alpha_end_function): Write linkages at end of each function. - Merge from trunk: - Wed Jul 17 00:20:48 CEST 2002 Jan Hubicka + * config/alpha/alpha.md (call_vms, call_value_vms): Rewrite. + (call_vms_1, call_value_vms_1): Rewrite. - * i386.md (prefetch): Fix for 64bit mode. - (prefetch_sse_rex, prefetch_3dnow_rex): New patterns. + * config/alpha/vms.h (ASM_FILE_END): Remove. - 2002-08-11 Andreas Jaeger - PR target/7531: - * doc/invoke.texi (i386 and x86-64 Options): Document -mcmodel. +2002-08-14 Richard Henderson -2002-06-24 Jeff Law + * 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. - * flow.c (propagate_one_insn): When removing an insn - with a REG_LIBCALL note but not the entire libcall sequence, - delete the associated REG_RETVAL note. +2002-08-14 Richard Henderson -2002-06-04 Jeff Law - Michael Matz + * calls.c: Include target.h. + * Makefile.in (calls.o): Update. - * 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. + * config/alpha/alpha.c (alpha_end_function): Use targetm.binds_local_p. + * config/alpha/alpha.h (FUNCTION_OK_FOR_SIBCALL): Likewise. - * haifa-sched.c (schedule_block): Do not count USE or CLOBBER - insns against the issue rate. +2002-08-14 Richard Henderson -2002-05-30 Jeff Law - - * flow.c (propagate_one_insn): Revise yesterday's patch. Delete - a dead insn with a REG_RETVAL note when the entire libcall is not - dead and remove the associated REG_LIBCALL note at the same time. - -2002-05-29 Jeff Law - - * flow.c (propagate_one_insn): Do not remove a dead insn if it - contains a REG_RETVAL note. - - * haifa-sched (sched_analyze): Remove another useless clearing - of SCHED_GROUP_P I missed yesterday. - -2002-05-28 David Edelsohn - Jeff Law - - * optabs.c (expand_binop): Fix nwords sign warnings. - generate pseudo for add_optab. - - * sched-deps.c (sched_analyze): Do not clear SCHED_GROUP_P. - * haifa-sched.c (move_insn): Clear SCHED_GROUP_P after it is used. - -2002-08-18 Neil Booth - - PR preprocessor/7602 - * cppinit.c (path_include): Treat the system environment - variables as being cxx_aware. - -2002-08-16 David Edelsohn - - * collect2.c (is_ctor_dtor): Add other possible JOINER values. - - * config/rs6000/rs6000.c (output_mi_thunk): Return to function - section on TARGET_ELF. - - * doc/install.texi (*-ibm-aix*): Explain AIX shared object versioning. - (Binaries): Update Bull Freeware URL. + * Makefile.in (LOOSE_WARN): Add -fno-common. + * c-common.h (constant_string_class_name): Add missing extern. 2002-08-15 Neil Booth PR preprocessor/7358 - 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 + * c-opts.c (check_deps_environment_vars): 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. + * cppfiles.c (stack_include_file): Ignore main file if + appropriate. + * cpplib.h (struct cpp_options): New member in deps. * doc/cppenv.texi: Update. -2002-08-14 Release Manager +2002-08-14 Neil Booth - * GCC 3.2 Released. + PR preprocessor/7526 + * cpplib.c (run_directive): Kludge so _Pragma dependency works. + +2002-08-14 Nathan Sidwell + + * doc/invoke.texi (-a): Remove documentation. + (-fprofile-arcs): Remove reference to -a, -ax options. + * doc/gcov.texi (Gcov Data Files): Data might be merged. + +2002-08-14 Gabriel Dos Reis + + Fix PR/7566 + * c-semantics.c (genrtl_case_label): Don't (mis)use + warning_with_decl. + +2002-08-14 Dale Johannesen + + * explow.c (emit_stack_restore): Emit memory clobbers + preceding the stack pop, to prevent the scheduler from + moving refs to variable arrays below this pop. + * reload1.c (reload): Preserve these clobbers for sched2. + * doc/rtl.texi: Document clobber (mem:BLK (scratch)). + +2002-08-14 Neil Booth + + * c-opts.c (c_common_post_options): Correct test. + +2002-08-14 Kaveh R. Ghazi + + * m88k.h (ASM_OUTPUT_SOURCE_FILENAME): Fix incorrect argument + order in call to fprintf. + +2002-08-14 Rainer Orth + + * config/sparc/sol2.h (SUBTARGET_EXTRA_SPECS): Define. + +2002-08-14 Ulrich Weigand + + * reload.c (find_reloads): Handle constraint letters marked by + EXTRA_ADDRESS_CONSTRAINT and EXTRA_MEMORY_CONSTRAINT. + (alternative_allows_memconst): Likewise. + * reload1.c (maybe_fix_stack_asms): Likewise. + * recog.c (asm_operand_ok, preprocess_constraints, + constrain_operands): Likewise. + * regclass.c (record_operand_costs, record_reg_classes): Likewise. + * local-alloc.c (block_alloc, requires_inout): Likewise. + * stmt.c (parse_output_constraint, parse_input_constraint): Likewise. + + * defaults.h (EXTRA_MEMORY_CONSTRAINT): Provide a default. + (EXTRA_ADDRESS_CONSTRAINT): Likewise. + * doc/tm.texi: Document these two new target macros. + + * config/s390/s390.c (s390_expand_plus_operand): Accept already + valid operands. + (q_constraint): New function. + config/s390/s390-protos.h (q_constraint): Declare it. + config/s390/s390.h (EXTRA_CONSTRAINT): Use it. + (EXTRA_MEMORY_CONSTRAINT): New macro. + + * config/s390/s390.md: Throughout the machine description, + replace all instances of the constraint combinations 'Qo' + or 'oQ' with simply 'Q'. + +2002-08-14 Stephane Carrez + + * config/m68hc11/m68hc11.h (LINK_SPEC): Support -mrelax. + * config/m68hc11/t-m68hc11-gas (LIBGCC2_DEBUG_CFLAGS): Can use -g now. + (LIBGCC2_CFLAGS): Compile with -mrelax. + +2002-08-14 Stephane Carrez + + * doc/invoke.texi: Document -minmax for 68HC12. + + * config/m68hc11/m68hc11.md ("umaxqi3"): Use TARGET_MIN_MAX. + ("uminqi3"): Likewise. + ("uminhi3", "umaxhi3"): Likewise. + + * config/m68hc11/m68hc11.h (MASK_MIN_MAX): Define. + (TARGET_MIN_MAX): Define. + (TARGET_SWITCHES): New option -minmax/-mnominmax. + +2002-08-14 Stephane Carrez + + * config/m68hc11/t-m68hc11-gas (LIB1ASMFUNCS): Build __far_trampoline. + (MULTILIB_OPTIONS): Must also generate for -mlong-calls. + + * config/m68hc11/larith.asm: Put a mode for ELF ABI flags. + (ret, declare, farsym): New gas macros. + (__premain, exit, abort, _cleanup, memcpy, memset, ___adddi3, + ___subdi3, ___notdi2, __mulhi32, __mulsi3): Use them to use 'rtc' + and declare the symbol far when compiled with -mlong-calls. + (__far_trampoline): New for 68HC12 trampoline code to invoke a + far handler using jsr/bsr. + + * config/m68hc11/m68hc11-crt0.S: Put a mode for ELF ABI flags. + (jsr): New macro to transform a 'jsr' into a 'call'. + +2002-08-14 Stephane Carrez + + * doc/invoke.texi: Document -mlong-calls for 68HC12. + + * config/m68hc11/m68hc11.h (CPP_SPEC): Pass -D__USE_RTC__ when + -mlong-calls is specified. + (ASM_DECLARE_FUNCTION_NAME): Define to generate .far and .interrupt + assembler directives. + (TARGET_LONG_CALL, MASK_LONG_CALL): Declare. + (TARGET_SWITCHES): Add -mlong-calls options. + (current_function_far): Declare. + + * config/m68hc11/m68hc11.c (m68hc11_initial_elimination_offset): Take + into account the page register saved on the stack. + (m68hc11_override_options): Take into account -mlong-calls option. + (m68hc11_asm_file_start): Put a mode for the ELF flags ABI. + + * config/m68hc11/m68hc11.md ("*return_32bit"): Return rtc + if the function is going to be in 68HC12 banked memory (-mlong-calls). + ("*return_16bit"): Likewise. + ("*return_void"): Likewise. + ("call", "call_value"): Use call for a far function call. + +2002-08-14 Neil Booth + + * toplev.c (parse_options_and_default_flags): Don't call + post_options here. + (general_init): Initialize GC, pools and tree hash here, + instead of lang_independent_init. + (lang_independent_init): Rename backend_init. + (do_compile): Call post_options hook; exit early if there + have been errors after switch processing. + (toplev_main): Update. + +2002-08-14 Gabriel Dos Reis + + * c-pretty-print.h: Guard against multiple inclusion. + Robustify macros. + (pp_c_attributes): Declare. + * c-pretty-print.c (pp_c_attributes): New function. + +2002-08-13 Kaveh R. Ghazi + + * m68k.c (m68k_output_function_prologue, + m68k_output_function_epilogue): Delete versions for DPX2/MOTOROLA + and NEWS/MOTOROLA. + * genattrtab.c: Remove dpx2 comment. + * libgcc2.c (__enable_execute_stack): Delete versions for + NeXT/__MACH__, __convex__, __sysV88__, __pyr__ and + sony_news/SYSTYPE_BSD. + * longlong.h: Delete code for __a29k__, _AM29K, __clipper__, + __gmicro__, __i860__, __NeXT__ and __pyr__. + * rtl.h: Remove convex comment. + * varasm.c: Likewise. + +2002-08-13 Kaveh R. Ghazi + + * c-opts.c (lang_flags): Const-ify. + * ra-build.c (undef_table): Likewise. + * ra.c (eliminables): Likewise. + +2002-08-14 Gabriel Dos Reis + + * tree.h: Guard against multiple inclusion. + +2002-08-14 Hans-Peter Nilsson + + * reload1.c (reload_cse_simplify): Before checking + REG_FUNCTION_VALUE_P, check REG_P. + +2002-08-13 Geoffrey Keating + + * Makefile.in (attribs.o): Remove $(OBSTACK_H) dependency. + +2002-08-13 Neil Booth + + * c-opts.c (c_common_init_options): Extra braces needed. + +2002-08-13 J"orn Rennecke + + * sh.c (sh_init_builtins): Add PARAMS to declaration. + (sh_media_init_builtins, sh_expand_builtin): Likewise. + (sh_expand_unop_v2sf): Use PARAMS for variable declaration. + (sh_expand_binop_v2sf): Likewise. + * sh-protos.h (sh_expand_unop_v2sf): Add PARAMS to declaration. + (sh_expand_binop_v2sf, sh_cfun_interrupt_handler_p): Likewise. + (sh_initialize_trampoline): Likewise. + +2002-08-13 Ulrich Weigand + + * s390-modes.def [CCL1, CCL2, CCT1, CCT2, CCT3, CCUR, CCSR]: Declare + new condition code modes. + s390.c (s390_match_ccmode_set): Handle those new CC modes. + (s390_select_ccmode): Likewise. + (s390_branch_condition_mask): Likewise. + + * s390-protos.h (s390_tm_ccmode): Declare. + s390.c (s390_tm_ccmode): New function. + (s390_match_ccmode): Allow VOIDmode as REQ_MODE. + + * s390.md ("*cmpdi_tm2"): Rename to "*tmdi_ext". + ("*cmpsi_tm2"): Rename to "*tmsi_ext". + ("*cmpqi_tm2"): Rename to "*tmqi_ext". + + ("*cmpdi_tm_reg", "*cmpdi_tm_mem", "*cmpsi_tm_reg", "*cmpsi_tm_mem", + "*cmphi_tm_sub","*cmphi_cct_0", "*cmpqi_tm", "*cmpqi_tm_sub", + "*cmpqi_cct_0", "*tm_0"): Remove, replace by ... + ("*tmdi_reg", "*tmsi_reg", "*tmdi_mem", "*tmsi_mem", "*tmhi_mem", + "*tmqi_mem", "*tmhi_full", "*tmqi_full"): ... these new patterns. + + ("*ltgr", "*cmpdi_ccs_0_64", "*cmpdi_ccs_0_31", "*ltr", "*icm15", + "*icm15_cconly", "*cmpsi_ccs_0", "*icm3", "*cmphi_ccs_0", "*icm1", + "*cmpqi_ccs_0"): Remove, replace by ... + ("*tstdi_sign", "*tstdi", "*tstdi_cconly", "*tstdi_cconly_31", + "*tstsi", "*tstsi_cconly", "*tstsi_cconly2", "*tsthi", "*tsthi_cconly", + "*tstqi", "*tstqi_cconly"): ... these new patterns. + + ("*cmpsidi_ccs"): Remove, replace by ... + ("*cmpsi_ccs_sign"): ... this new pattern. + ("*cmpdi_ccs_sign", "*cmpdi_ccu_zero"): New patterns. + + ("*cmpqi_ccu_0", "*cmpqi_ccu_immed"): Remove, replace by ... + ("*cli"): ... this new pattern. + + ("*adddi3_sign", "*adddi3_zero_cc", "*adddi3_zero_cconly", + "*adddi3_zero", "*adddi3_cc", "*adddi3_cconly", "*adddi3_cconly2"): + New patterns. + ("adddi3_64"): Rename to "*adddi3_64". + ("adddi3_31"): Replace by insn and splitter "*adddi3_31". + ("adddi3"): Adapt expander. + + ("*addsi3_cc"): Allow "general_operand" for operand 2. + ("*addsi3_carry1_cc", "*addsi3_carry1_cconly", + "*addsi3_carry2_cc", "*addsi3_carry2_cconly"): New patterns. + + ("addhi3", "addqi3"): Remove, replace by ... + ("*addsi3_sign", "*addsi3_sub"): ... these new patterns. + + ("*subdi3_sign", "*subdi3_zero_cc", "*subdi3_zero_cconly", + "*subdi3_zero", "*subdi3_cc", "*subdi3_cconly"): New patterns. + ("subdi3"): Replace by insn and splitter "*subdi3_31". + ("subdi3"): New expander. + + ("*subsi3_borrow_cc", "*subsi3_borrow_cconly"): New patterns. + + ("subhi3", "subqi3"): Remove, replace by ... + ("*subsi3_sign", "*subsi3_sub"): ... these new patterns. + + ("*muldi3_sign"): New pattern. + ("muldi3"): Do not clobber CC. + ("mulsi3"): Likewise. + ("mulsi_6432"): Likewise. + +2002-08-13 Denis Chertykov + + * config/avr/avr.md: Call CC_STATUS_INIT in all peepnoles + which can change CC0. + +2002-08-13 J"orn Rennecke + + * gcse.c (adjust_libcall_notes): New function. + (do_local_cprop): Use it. Add fourth parameter. Changed caller. + +2002-08-13 Nathan Sidwell + + * libgcc2.c (L_bb): Remove unneeded #includes. + (__global_counters, __gthreads_active): Remove unused globals. + (__bb_exit_func): Merge counts into files rather than appending. + * Makefile.in (INTERNAL_CFLAGS): Move COVERAGE_FLAGS from here ... + (ALL_CFLAGS): ... to here. + +2002-08-13 Denis Chertykov + + * config/ip2k/ip2k.c (commands_in_file): Variable removed. + (function_epilogue): Don't calculate function size. + (ip2k_set_compare): Don't use lookup_const_double. + (asm_file_start): Initialization of commands_in_file removed. + (asm_file_end): Output of commands_in_file removed. + + * config/ip2k/ip2k.c (CPP_PREDEFINES): Remove definition of + __INT_MAX__. + +2002-08-13 Neil Booth + + * c-opts.c (c_common_init_options): Check option array is + sorted if checking enabled. + +2002-08-13 Gabriel Dos Reis + + * c-pretty-print.c: #include "c-tree.h". + (pp_c_simple_type_specifier): Tweak. + (pp_c_storage_class_specifier): New. + (pp_c_function_specifier): Likewise. + (pp_c_declaration_specifiers): Likewise. + (pp_c_init_declarator): Likewise. + (pp_c_declaration): Likewise. + (pp_c_direct_declarator): Stub. + (pp_c_declarator): Likewise. + (pp_c_parameter_declaration): Likewise. + +2002-08-13 Neil Booth + + * c-opts.c (deps_seen, deps_file, deferred_count, deferred_size, + handle_deferred_opts, sanitize_cpp_opts, defer_opt, + struct deferred_opt): New. + (COMMAND_LINE_OPTIONS): Add -M*. + (missing_arg): Update. + (c_common_decode_option): Handle -M*. + (c_common_post_options): Handle -M*. Use sanitize_cpp_opts; + don't call cpp_post_options. + (c_common_finish, check_deps_environment_vars): Update. + * cppfiles.c (stack_include_file, handle_missing_header): Update. + * cpphash.h (CPP_PRINT_DEPS): Remove. + * cppinit.c: Don't include version.h. + (cpp_create_reader): Don't call deps_init. Initialize + warn_long_long. + (cpp_read_main_file): Init deps if necessary. + (cpp_destroy): Conditionally free deps. + (cpp_finish): Update. + (no_tgt): Remove. + (COMMAND_LINE_OPTIONS, cpp_handle_option): Remove -M*. + (cpp_post_options): Rename post_options. + * cpplib.h (struct cpp_options): Remove some dependency options; + move others to a new structure. + (cpp_post_options): Remove. + (cpp_finish): Comment. + * fix-header.c (read_scan_file): Don't call cpp_post_options. + +2002-08-12 Hans-Peter Nilsson + + * config/mmix/mmix.md (define_constants): Add MMIX_rR_REGNUM. + ("divdi3", "*divdi3_nonknuth", "moddi3", "*moddi3_nonknuth"): Mark + MMIX_rR_REGNUM as clobbered. + * config/mmix/mmix.h (MMIX_REMAINDER_REGNUM): Use MMIX_rR_REGNUM. + +2002-08-12 Gabriel Dos Reis + + * diagnostic.h (output_formatted_scalar): Rename from + output_formatted_integer. + * diagnostic.def: Add DK_DEBUG. + * diagnostic.c (output_decimal): Adjust. + (output_long_decimal): Likewise. + (output_unsigned_decimal): Likewise. + (output_octal): Likewise. + (output_long_octal): Likewise. + (output_hexadecimal): Likewise. + (output_long_hexadecimal): Likewise. + * c-pretty-print.c (pp_c_type_specifier): New function. + (pp_c_specifier_qualifier_list): Likewise. + (pp_c_abstract_declarator): Likewise. + (pp_c_char): Replace pp_format_integer with pp_format_scalar. + +2002-08-12 David Edelsohn + + * doc/trouble.texi (Disappointments): Add static constructor and + destructor dependency information for AIX. + +2002-08-12 Neil Booth + + * cpphash.h (struct printer): New from cppmain.c. + (cpp_reader): New member. + * cppmain.c (struct printer): Move to cpphash.h. + (options, print): Remove. + (account_for_newlines, print_line, maybe_print_line, + cpp_preprocess_file, setup_callbacks, scan_translation_unit, + scan_translation_unit_trad, cb_line_change, cb_ident, + cb_define, cb_undef, cb_include, cb_file_change, dump_macro, + cb_def_pragma): Make reentrant. + +2002-08-12 Kaveh R. Ghazi + + * real.c (ieee_64): Always define. + (ieee_113): Guard with INTEL_EXTENDED_IEEE_FORMAT == 0. + (dec_h): Not used yet, hide it. + (emdnorm): Mark parameter in ATTRIBUTE_UNUSED. Guard label with + macro controlling use. + (TFbignan, TFlittlenan): Guard with INTEL_EXTENDED_IEEE_FORMAT == 0. + +2002-08-12 Jan Hubicka + + * i386.md (tablejump): Sign extend the operand. + * i386.c (classify_argument): Fix missed case from previous patch. + +2002-08-12 Neil Booth + + * c-common.c (STDC_0_IN_SYSTEM_HEADERS, c_common_init): Move + to c-copts.c. + (warn_multichar): Die. + (cb_register_builtins): Export. + * c-common.h (warn_multichar, preprocess_file): Remove. + (cb_register_builtins): New. + * c-lang.c (c_init): Remove. + (LANG_HOOKS_INIT): Use c_objc_common_init. + * c-lex.c (init_c_lex): Don't canonicalize filename. + * c-opts.c (in_fname, STDC_0_IN_SYSTEM_HEADERS): New. + (preprocess_file): Make static. Update for cpplib. + (c_common_decode_option): Remove warn_multichar. Use in_fname. + (c_common_post_options): Set some cpp options here. + (c_common_init): Move from c-common.c. + * cppinit.c (cpp_post_options): Don't canonicalize in_fname. + * cpplib.h (struct cpp_options): Remove in_fname. + (cpp_preprocess_file): Update. + * cppmain.c (cpp_preprocess_file): Update for new prototypes. + +2002-08-11 Kaveh R. Ghazi + + * config.gcc (mips*-*-netbsd*): Include ${tm_file}. + +2002-08-11 Kaveh R. Ghazi + + * i370.h (TARGET_CPU_CPP_BUILTINS): Remove spurious trailing + backslash in comment preceeding macro definition. + * i370/linux.h (TARGET_OS_CPP_BUILTINS): Likewise. + * i370/mvs.h (TARGET_OS_CPP_BUILTINS): Likewise. + * i370/oe.h (TARGET_OS_CPP_BUILTINS): Likewise. + +2002-08-12 Hans-Peter Nilsson + + * expr.c (store_expr): In condition for checking if value is + generated in TARGET, move call to expr_size last. + +2002-08-11 Neil Booth + + * c-common.c (c_common_init): Call preprocess_file instead. + (c_common_finish): Move to c-opts.c. + * c-common.h (preprocess_file): new. + * c-opts.c (out_fname, out_stream, deps_append, preprocess_file, + check_deps_environment_vars, c_common_finish): New. + (c_common_decode_option): Update for out_fname and dependencies. + * cppinit.c (init_dependency_output, output_deps): Remove. + (cpp_destroy): Update prototype. + (cpp_add_dependency_target): New. + (cpp_read_main_file): Don't overlay a buffer. + (cpp_finish): Take a deps output stream and write deps to it. + Return the error count. + (cpp_post_options): Don't canonicalize out_fname, or do anything + with dependencies. + * cpplib.h (struct cpp_options): Remove out_fname and + preprocess_only. + (cpp_add_dependency_target): New. + (cpp_destroy, cpp_finish, cpp_preprocess_file): Update. + * cppmain.c (cpp_preprocess_file): Update prototype. Don't + set preprocess_only. Don't handle the output stream directly. + +2002-08-11 Kaveh R. Ghazi + + * dsp16xx.c (print_operand): Fix format specifier. + * dsp16xx.md: Avoid automatic aggregate initialization. + * frv.h (REG_CLASS_FROM_LETTER): Avoid char as array index. + * h8300.c (emit_a_rotate, h8300_adjust_insn_length): Avoid U + integer constant modifier. + * ip2k.c (ip2k_set_compare): Avoid signed/unsigned warning. + * mmix-protos.h (mmix_use_simple_return): Move outside TREE_CODE + guards. + * sh/netbsd-elf.h (FUNCTION_PROFILER): Fix format specifier. + * v850.c (v850_select_section): Mark parameter with + ATTRIBUTE_UNUSED. + * global.c (global_alloc): Const-ify. + * ra-colorize.c (hardregset_to_string): Fix format specifier. + +2002-08-11 Kaveh R. Ghazi + + * darwin-c.c (darwin_pragma_options): Const-ify. + * darwin.c (machopic_non_lazy_ptr_name, + machopic_validate_stub_or_non_lazy_ptr): Likewise. + (machopic_indirect_data_reference): Wrap variables in macros + controlling their use. + (machopic_finish, update_non_lazy_ptrs, update_stubs): Const-ify. + (machopic_select_section): Use parentheses around && within ||. + * i386/darwin.h (ASM_OUTPUT_ALIGN): Avoid ambiguous-else. + +2002-08-11 Kaveh R. Ghazi + + * ip2k.c (mdr_resequence_xy_yx, mdr_propagate_reg_equivs, + mdr_try_move_dp_reload, ip2k_check_can_adjust_stack_ref, + ip2k_adjust_stack_ref, mdr_try_move_pushes, mdr_try_propagate_clr, + ip2k_xexp_not_uses_reg_for_mem, mdr_try_propagate_move, + mdr_try_remove_redundant_insns, track_w_reload, + mdr_try_wreg_elim): Make function static to match prototype. + * mmix.c (mmix_target_asm_function_epilogue): Likewise. Mark + parameter with ATTRIBUTE_UNUSED. + +2002-08-11 Kaveh R. Ghazi + + * arc.c (arc_init): Don't use ISO C style function definitions. + * arm.c (count_insns_for_constant, thumb_far_jump_used_p, + arm_get_strip_length, arm_strip_name_encoding): Likewise. + * avr.h (progmem_section): Likewise. + * h8300.c h8300_asm_insn_count): Likewise. + * m32r.c (init_idents): Likewise. + * s390.c (s390_split_branches, s390_chunkify_pool): Likewise. + * sh.c (sh_cfun_interrupt_handler_p): Likewise. + * xtensa.c (xtensa_build_va_list): Likewise. + +2002-08-11 Neil Booth + + * c-common.h (enum c_language_kind): Emphasize that clk_c is 0. + * c-opts.c (parse_option): Rename find_opt. + (set_std_c99): New function. + (COMMAND_LINE_OPTIONS): Handle -remap and -o. Remove OPT_std_bad. + (missing_arg): Remove OPT_std_bad. Handle -o. + (c_common_decode_option): Handle input and output file names, + -o and -remap. Clean up -std= handling. + * cppinit.c (COMMAND_LINE_OPTIONS): Remove OPT_o and OPT_remap. + (cpp_handle_option): Similarly. Don't handle filenames. + +2002-08-11 Jan Hubicka + + * i386.c (classify_argument): Fix computing of field's offsets. + +2002-08-11 Andreas Jaeger + + PR target/7531: + * doc/invoke.texi (i386 and x86-64 Options): Document -mcmodel. + +2002-08-10 Ziemowit Laski + + * config/alpha/alpha.h (TARGET_CPU_CPP_BUILTINS): Replace + reference to clk_objective_c with flag_objc. + * config/i386/i386-interix.h (TARGET_OS_CPP_BUILTINS): + Likewise. + * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Likewise. + +2002-08-10 Neil Booth + + * c-opts.c (set_std_cxx98, set_std_c89): New. + (COMMAND_LINE_OPTIONS): Move more from cppinit.c. + (c_common_decode_option): Handle new switches from cppinit.c. + Add -std=gnu++98. + * cppinit.c (set_lang): Rename cpp_set_lang. Export. + (no_arg, no_num): Remove. + (COMMAND_LINE_OPTIONS): Move more to c-opts.c. Drop all lang- + switches apart from -lang-objc and lang-asm. + (cpp_handle_option): Similarly. + * cpplib.h (cpp_set_lang): New. + * doc/cppopts.texi, doc/invoke.texi: Document -std=c++98, + -std=gnu++98. + * objc/lang-specs.h: Remove -ansi. + +2002-08-10 Jan Hubicka + Graham Stott + + * cfg.c (redirect_edge_succ_nodup): Avoid overflows due to roundoff + errors. + +2002-08-10 Kaveh R. Ghazi + + * emit-rtl.c (emit_jump_insn_before, emit_call_insn_before, + emit_jump_insn): Fix uninitialized variable. + * gcov.c (init_line_info): Likewise. + * genautomata.c (transform_3): Add braces around ambiguous + else. + * ifcvt.c (cond_exec_process_insns): Mark parameter with + ATTRIBUTE_UNUSED. + * ra-build.c (parts_to_webs_1): Fix uninitialized variable. + * regrename.c (copyprop_hardreg_forward): Fix uninitialized + variable. + + * gengtype.c (write_gc_structure_fields): Avoid signed/unsigned + warnings in output files. + +2002-08-09 Ziemowit Laski + + * c-common.c (flag_objc): New. + * c-common.h (c_language_kind): Get rid of clk_objective_c + enum value. + (flag_objc): New extern declaration. + * c-decl.c (implicitly_declare): Call objc_check_decl + instead of maybe_objc_check_decl. + (finish_decl): Likewise. + (grokfield): Likewise. + (finish_struct): Likewise. + * c-lang.c (maybe_objc_check_decl): Rename to objc_check_decl. + (maybe_objc_comptypes): Rename to objc_comptypes. + (maybe_building_objc_message_expr): Rename to + objc_message_selector. + * c-lex.c (lex_charconst): Remove uses of clk_objective_c, + replace with flag_objc as needed. + * c-opts.c (c_common_init_options): Likewise. + (c_common_decode_option): Likewise. + * c-parse.in (init_reswords): Likewise. + * c-tree.h (maybe_objc_check_decl): Rename to objc_check_decl. + (maybe_objc_comptypes): Rename to objc_comptypes. + (maybe_building_objc_message_expr): Rename to + objc_message_selector. + * c-typeck.c (comptypes): Call objc_comptypes instead of + maybe_objc_comptypes, and/or objc_message_selector instead of + maybe_building_objc_message_expr. + (comp_target_types): Likewise. + (convert_for_assignment): Likewise. + (warn_for_assignment): Likewise. + * cppinit.c (init_builtins): Set __OBJC__ manifest constant + independently of those for other languages. + * objc/objc-act.c (maybe_objc_comptypes): Delete. + (maybe_objc_check_decl): Delete. + (maybe_building_objc_message_expr): Rename to + objc_message_selector. + * objc/objc-lang.c (objc_init_options): Use clk_c instead of + clk_objective_c; set flag_objc flag. + +2002-08-09 Toshiyasu Morita + + * ifcvt.c (find_if_case_2): Test correct basic block for size. + +2002-08-09 Dale Johannesen + + * config/rs6000/rs6000.md: Add sibcall patterns. + * config/rs6000/rs6000.h (FUNCTION_OK_FOR_SIBCALL): Define. + * config/rs6000/rs6000.c (rs6000_ra_ever_killed): + Rewritten to handle sibcalls. + * config/rs6000/rs6000.c (function_ok_for_sibcall): New. + * config/rs6000/rs6000-protos.h (function_ok_for_sibcall): New. + +2002-08-08 Nathan Sidwell + + * profile.c (da_file_name): New static var. + (init_branch_prob): Initialize it. + (end_branch_prob): Remove da file. + + * Makefile.in (stage1_build): Pass empty COVERAGE_FLAGS. + * configure.in (coverage_flags): Default to nothing. + * configure: Rebuilt. + +2002-08-09 Neil Booth + + * Makefile.in (c-opts.o): Update + * c-opts.c: Include intl.h. + (print_help): Move from cppinit.c. Remove unused options. + (COMMAND_LINE_OPTIONS): Move more from cppinit.c. + (missing_arg): Complain for switches without an argument. + (c_common_decode_option): Reject missing joined arguments. + Handle new switches from cppinit.c. + * cppinit.c (COMMAND_LINE_OPTIONS): Move some switches to c-opts.c. + (cpp_handle_option): Similarly. + (print_help): Moved to c-opts.c. + * cpplib.h (struct cpp_options): Remove help_only. + * gcc.c (cpp_unique_options): Remove -$. + * doc/cppopts.texi: Undocument -h. + +2002-08-08 Jakub Jelinek + + * config/i386/i386.c (legitimate_constant_p): UNSPEC_TP is not + legitimate constant. + (legitimate_pic_operand_p): Neither pic operand. + (legitimate_address_p): But legitimate address. + (get_thread_pointer): Generate MEM/u instead of CONST around + UNSPEC_TP. + (print_operand): Remove printing of UNSPEC_TP. + (print_operand_address): And print it here. + +2002-08-08 Devang Patel + + * objc/objc-act.c (build_selector_translation_table): Issue warning, + when -Wselector is used,if method for which selector is being + created does not exist. + +2002-08-08 Stephen Clarke + + * config/sh/sh.c (prepare_move_operands): Only call + target_reg_operand if TARGET_SHMEDIA. 2002-08-08 Jakub Jelinek @@ -1535,6 +13053,12 @@ Thu Sep 5 00:34:33 2002 J"orn Rennecke two patches. * config/rs6000/sysv4.h: Likewise, remove #undef ADJUST_FIELD_ALIGN. +2002-08-08 Lars Brinkhoff + Richard Henderson + + * emit-rtl.c (gen_rtx_REG): After reload, only return + frame_pointer_rtx or hard_frame_pointer_rtx if frame_pointer_needed. + 2002-08-08 Jakub Jelinek * config/rs6000/rs6000-protos.h (rs6000_field_alignment): Remove. @@ -1542,12 +13066,75 @@ Thu Sep 5 00:34:33 2002 J"orn Rennecke * config/rs6000/rs6000.h (ADJUST_FIELD_ALIGN): ...inline into the macro. +2002-08-08 Adam Nemet + + * config/arm/arm.c (thumb_unexpanded_epilogue): Stack the PIC + register. + (thumb_expand_prologue): Likewise. + (thumb_output_function_prologue): Likewise. + * config/arm/arm.h (THUMB_INITIAL_ELIMINATION_OFFSET): Account for + the additional push of the PIC register. + +2002-08-08 Nathan Sidwell + + * configure.in (enable_coverage): New enable switch. + * configure: Rebuilt. + * Makefile.in (COVERAGE_FLAGS, coverageexts): New variables. + (INTERNAL_CFLAGS): Append COVERAGE_FLAGS. + (ALL_FLAGS): Reorder so INTERNAL_CFLAGS comes after CFLAGS. + (mostlyclean): Remove coverage files. + * doc/install.texi: Document enable_coverage. + + * cp/Make-lang.in (c++.mostlyclean): Remove coverage files. + * ada/Make-lang.in (ada.mostlyclean): Remove coverage files. + * f/Make-lang.in (f.mostlyclean): Remove coverage files. + * java/Make-lang.in (java.mostlyclean): Remove coverage files. + * objc/Make-lang.in (objc.mostlyclean): Remove coverage files. + * treelang/Make-lang.in (treelang.mostlyclean): Remove coverage + files. + +2002-08-08 Neil Booth + + * c-opts.c (cpp_opts): New. + (COMMAND_LINE_OPTIONS): Add switches from cppinit.c. + (c_common_decode_options): Handle cpplib switches. + (c_common_init_options): Set cpp_opts. + * cppinit.c (COMMAND_LINE_OPTIONS): Move some switches to c-opts.c. + (cpp_handle_option): Similarly. + +2002-08-08 David Edelsohn + + * config/rs6000/aix.h (TARGET_ALTIVEC): Define to 0. + (TARGET_ALTIVEC_ABI): Same. + (TARGET_ALTIVEC_VRSAVE): Same. + + * config/rs6000/rs6000.c (rs6000_expand_ternop_builtin): Check + icode not CODE_FOR_nothing. Change switch to if. + +2002-08-08 Alan Modra + + * config/rs6000/rs6000.h (ASM_CPU_SPEC): Pass -mpower4 when cpu=power4. + 2002-08-08 Jakub Jelinek * stor-layout.c (place_union_field): For bitfields if PCC_BITFIELD_TYPE_MATTERS and TYPE_USER_ALIGN, set record's TYPE_USER_ALIGN. +2002-08-07 John David Anglin + + * pa.c (struct deferred_plabel): Constify name field. + +2002-08-07 Neil Booth + + * cppmacro.c (_cpp_builtin_macro_text): Remove unused variable. + +2002-08-07 John David Anglin + + * configure.in (PREFIX_INCLUDE_DIR): Don't define if prefix and + local_prefix are the same. + * configure: Rebuilt. + 2002-08-07 Jakub Jelinek Richard Henderson @@ -1556,8 +13143,7 @@ Thu Sep 5 00:34:33 2002 J"orn Rennecke 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. + DECL_USER_ALIGN here. * config/rs6000/rs6000.c (rs6000_field_alignment): New. * config/rs6000/rs6000-protos.h (rs6000_field_alignment): New prototype. @@ -1568,10 +13154,107 @@ Thu Sep 5 00:34:33 2002 J"orn Rennecke * config/rs6000/sysv4.h (ADJUST_FIELD_ALIGN): Remove. * doc/tm.texi (ADJUST_FIELD_ALIGN): Update description. +2002-08-07 Neil Booth + + * Makefile.in (c-opts.o, c-common.o, C_AND_OBJC_OBJS): Update. + * c-common.c: Don't include tree-inline.h. + (c_common_init_options, c_common_post_options): Move to c-opts.c. + * c-common.h (c_common_decode_option): New. + * c-decl.c (c_decode_option): Remove. + * c-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option. + * c-opts.c: New file. + * c-tree.h (c_decode_option): Remove. + * doc/passes.texi: Update. + * objc/objc-act.c (objc_decode_option): Remove. + * objc/objc-act.h (objc_decode_option): Remove. + * objc/ojbc-lang.c (LANG_HOOKS_DECODE_OPTION): Use + c_common_decode_option. + +2002-08-07 Chris Demetriou + + * config/mips/mips.md (sunlt_sf, suneq_sf, sunle_sf): Remove + dependency on TARGET_DOUBLE_FLOAT. + +2002-08-07 Stephen Clarke + + * config/sh/lib1funcs.asm (GCC_shcompact_incoming_args): Don't + overwrite callee-save registers. Fix comment. + +2002-08-06 Chris Demetriou + + * config/mips/mips.c (override_options): Set MASK_BRANCHLIKELY + in target_flags based on ISA, if it was not set on the command + line. Warn if MASK_BRANCHLIKLEY is set but the ISA does not + support Branch Likely instructions. + * config/mips/mips.h (MASK_BRANCHLIKLEY): New macro. + (TARGET_BRANCHLIKELY): Likewise. + (TARGET_SWITCHES): Add -mbranch-likely and -mno-branch-likely. + (GENERATE_BRANCHLIKELY): Use TARGET_BRANCHLIKELY rather than + ISA_HAS_BRANCHLIKELY. + (ISA_HAS_BRANCHLIKELY): Do not include MIPS16 check. + * doc/invoke.texi: Document new MIPS -mbranch-likely and + -mno-branch-likely options. + +2002-08-06 Kaveh R. Ghazi + + * ip2k.c (ip2k_set_compare): Add missing iteration variable. + + * Makefile.in (dummy-conditions.o): Depend on $(HCONFIG_H) not + $(GCONFIG_H). + +2002-08-06 Aldy Hernandez + + * c-decl.c (duplicate_decls): Error out for incompatible TLS + declarations. + + * testsuite/gcc.dg/tls/diag-3.c: New. + +2002-08-06 Dale Johannesen + + * c-common.c (fname_decl): Use line number 0 for + __func__, to avoid confusing debuggers. + +2002-08-06 Nathan Sidwell + + * gcov.c: Tidy. + (struct line_info, struct coverage): New structures. + (gcov_file_name, gcov_file): Remove globals. + (output_data): Take source file parameter. Fix memory leak. Break + up into ... + (init_line_info, output_line_info, make_gcov_file_name, + accumulate_branch_counts): ... here. + (calculate_branch_probs, function_summary): Adjust. + (main): Adjust. + (function_*): Remove global variables. + +2002-08-06 Neil Booth + + * dwarf2out.c: Remove unused macros. + +2002-08-06 Neil Booth + + * function.c (TRAMPOLINE_ALIGNMENT): Always defined. + +2002-08-06 Neil Booth + + * cppinit.c (struct lang_flags): Rename trigraphs std. + (set_lang): Update. + * cpplib.h (struct cpp_options): New member std. + * cppmacro.c (_cpp_builtin_macro_text): Use std. + (collect_args): Flag whether to swallow a possible future + comma pasted with varargs. + (replace_args): Use this flag. + * doc/cpp.texi: Update varargs extension documentation. + 2002-08-06 Jakub Jelinek * config/i386/mmintrin.h (__m64): Make the type 64-bit aligned. +2002-08-06 Jakub Jelinek + + * config/i386/i386.c (x86_field_alignment): Apply min for all MODE_INT + and MODE_CLASS_INT modes. + 2002-08-06 Jakub Jelinek * config.gcc (*-*-linux*): Default to --enable-threads=posix if no @@ -1582,63 +13265,1978 @@ Thu Sep 5 00:34:33 2002 J"orn Rennecke s390x-*-linux*, sh-*-linux*, sparc-*-linux*, sparc64-*-linux*): Remove thread_file setting here. -2002-08-04 Mark Mitchell +2002-08-06 David Edelsohn - * doc/install.texi (Installing GCC): Refer to buildstat.html, - rather than listing version-specific build status files. + * doc/install.texi (Binaries): Update Bull Freeware URL. + +2002-08-06 Gerald Pfeifer + + * doc/gcc.texi (Top): Rename Index to Keyword Index. + +2002-08-05 Nathan Sidwell + + * gcov.c (output_data): Round to % to nearest, tweak formatting. + +2002-08-05 Jakub Jelinek + + * fold-const.c (associate_trees): Only optimize NEGATE_EXPR in one + of the operands into MINUS_EXPR if code is PLUS_EXPR. + +2002-08-05 Douglas B Rupp + + * config.gcc (i[34567]86-*-interix*): Replace interix.o with winnt.o + * config/i386/i386-interix.h (TARGET_NOP_FUN_DLLIMPORT, + drectve_section): Define. + * config/i386/t-interix: Replace interix.o rule with winnt.o. + * config/i386/interix.c: Remove. + +2002-08-05 Geoffrey Keating + + * attribs.c: Don't include obstack.h. + * builtins.c: Likewise. + * cfganal.c: Likewise. + * cfgbuild.c: Likewise. + * cfgcleanup.c: Likewise. + * emit-rtl.c: Likewise. + * loop.c: Likewise. + * stmt.c: Likewise. + + * Makefile.in (s-gtype): Re-add dependency on $(GTFILES). + +2002-08-05 Gabriel Dos Reis + + * doc/c-tree.texi (Expression trees): Document VA_ARG_EXPR + +2002-08-04 Chris Demetriou + + * doc/invoke.texi: Remove duplicated paragraph describing + TARGET_SWITCHES. + +2002-08-04 Geoffrey Keating + + * Makefile.in (sdbout.o): Doesn't need $(OBSTACK_H). + * collect2.h (permanent_obstack): Delete declaration. + * collect2.c (permanent_obstack): Delete definition. + (main): Don't initialize permanent_obstack. Use xstrdup instead. + * expr.c: Don't include obstack.h. + (permanent_obstack): Delete declaration. + * function.c: Don't include obstack.h. + (permanent_obstack): Delete declaration. + * integrate.c: Don't include obstack.h. + (function_maybepermanent_obstack): Delete declaration. + * print-tree.c (debug_tree): Use x*alloc not permalloc. + * sdbout.c (gen_fake_label): Use x*alloc not permalloc. + * tlink.c (pfgets): Use xstrdup not permanent_obstack. + * toplev.c (lang_independent_init): Rename init_obstacks to init_ttree. + * tree.h: Rename init_obstacks to init_ttree. Remove declarations + of permalloc, expralloc, perm_calloc. + * tree.c (permanent_obstack): Delete definition. + (init_ttree): Rename from init_obstacks. + (permalloc): Delete. + (perm_calloc): Delete. + (dump_tree_statistics): Don't print information about + permanent_obstack. + * varasm.c (assemble_start_function): Use xstrdup instead of + permalloc/strcpy. + (assemble_variable): Likewise. + * config/alpha/alpha.c (unicosmk_need_dex): Use xmalloc instead of + permalloc. + (unicosmk_add_extern): Likewise. + * config/c4x/c4x.c (c4x_external_ref): Likewise. + (c4x_global_label): Likewise. + * config/frv/frv.c (frv_encode_section_info): Likewise. + * config/i386/winnt.c (i386_pe_record_external_function): Likewise. + (i386_pe_record_exported_symbol): Likewise. + * config/mips/mips.c (mips_output_external): Likewise. + (mips_output_external_libcall): Likewise. + * config/pa/pa.c: (permanent_obstack): Delete declaration. + (output_call): Use ggc_strdup instead of allocating on + permanent_obstack. + * config/romp/romp.c: Include ggc.h. + (get_symref): Don't declare permanent_obstack, use ggc_strdup + intead of permanent_obstack. + * config/rs6000/aix31.h (ASM_OUTPUT_EXTERNAL): Use concat + instead of permalloc. + * config/rs6000/rs6000.c (rs6000_gen_section_name): Use xmalloc + instead of permalloc + * config/rs6000/xcoff.h (ASM_OUTPUT_EXTERNAL): Use concat + instead of permalloc. + * config/vax/vax.c (vms_check_external): Use xmalloc instead of + permalloc. + +2002-08-04 Bernd Schmidt + + Contribute a port developed primarily by Michael Meissner, + Catherine Moore, and Richard Sandiford . + * config.gcc: Add frv-elf target. + * config/frv/cmovd.c: New file. + * config/frv/cmovh.c: New file. + * config/frv/cmovw.c: New file. + * config/frv/frv-abi.h: New file. + * config/frv/frv-asm.h: New file. + * config/frv/frv-modes.def: New file. + * config/frv/frv-protos.h: New file. + * config/frv/frv.c: New file. + * config/frv/frv.h: New file. + * config/frv/frv.md: New file. + * config/frv/frvbegin.c: New file. + * config/frv/frvend.c: New file. + * config/frv/lib1funcs.asm: New file. + * config/frv/media.h: New file. + * config/frv/modi.c: New file. + * config/frv/t-frv: New file. + * config/frv/uitod.c: New file. + * config/frv/uitof.c: New file. + * config/frv/ulltod.c: New file. + * config/frv/ulltof.c: New file. + * config/frv/umodi.c: New file. + * config/frv/xm-frv.h: New file. + + * config/frv/media.h: Removed again. + +2002-08-04 Nathan Sidwell + + * gcov.c (bb_file_time): New static variable. + (object_directory): May also be object file. + (preserve_paths): New static variable. + (print_usage): Adjust. + (options): Adjust. + (process_args): Adjust. + (open_files): Simplify. Cope when OBJECT_DIRECTORY is an object + file. Find modification date on bb file. + (read_profile): Don't rewind a NULL file. + (format_hwint): New static function. + (function_summary): Use format_hwint. + (output_data): SOURCE_FILE_NAME is never relative to + OBJECT_DIRECTORY. Use format_hwint. Adjust gcov file name + mangling. Adjust output format to make it more machine readable. + * doc/gcov.texi: Document & clarify semantics. 2002-08-04 Joseph S. Myers - * doc/include/gcc-common.texi (version-GCC): Increase to 3.2. + * doc/include/gcc-common.texi (version-GCC): Increase to 3.3. + +2002-08-04 Nathan Sidwell + + * gcc.c (cc1_options): Pass output file as auxbase when + appropriate. + * profile.c (init_branch_prob): FILENAME has already had ending + stripped. + * final.c (end_final): Likewise. + * toplev.c (aux_base_name): New global. + (compile_file): Pass aux_base_name to init init_branch_prob and + end_final. + (independent_decode_option, case 'a'): New auxinfo options. + (case 'd'): Protect against mising basename. + (do_compile): Initialize aux_base_name. + * toplev.h (aux_base_name): New global. + * doc/invoke.texi: Adjust documentation. + +2002-08-04 Nathan Sidwell + + * config/i386/i386.c (x86_field_alignment): Remove duplicate test + of TARGET_ALIGN_DOUBLE. + +2002-08-04 Gabriel Dos Reis + + * diagnostic.c (inform): New function. + * diagnostic.h (inform): Declare. + +2002-08-03 David Edelsohn + + * config/rs6000/rs6000.md (movsi_internal1): Add nop mnemonic. + (movhi_internal): Same. + (movqi_internal): Same. + (movdi_internal64): Same. + + * config/rs6000/t-ppccomm (MULTILIB_MATCHES_FLOAT): Add mcpu=405. + + * config/rs6000/xcoff.h (SKIP_ASM_OP): Define. + (ASM_OUTPUT_SKIP): Use it. SIZE unsigned. + (COMMON_ASM_OP): Define. + (ASM_OUTPUT_ALIGNED_COMMON): Use it. SIZE unsigned. + Use ALIGN parameter. + (LOCAL_COMMON_ASM_OP): Define. + (ASM_OUTPUT_LOCAL): Use it. SIZE unsigned. + +2002-08-03 Roger Sayle + + * builtins.def: Define new builtin functions exp, expf, expl, + log, logf and logl (and their __builtin_* variants). + * optabs.h (enum optab_index): Add new OTI_exp and OTI_log. + Define exp_optab and log_optab. + * optabs.c (init_optans): Initialize exp_optab and log_optab. + * genopinit.c (optabs): Implement exp_optab and log_optab + using exp?f2 and log?f2 patterns. + * builtins.c (expand_builtin_mathfn): Handle BUILT_IN_EXP* + and BUILT_IN_LOG* using exp_optab and log_optab respectively. + (expand_builtin): Ignore the new builtins (and all cos and + sin variants) when not optimizing. Expand new builtins via + expand_builtin_mathfn when flag_unsafe_math_optimizations. + + * doc/extend.texi: Document new exp and log builtins. + * doc/md.texi: Document new exp?f2 and log?f2 patterns + (and previously undocumented cos?f2 and sin?f2 patterns). + +2002-08-03 Jason Merrill + + * explow.c (int_expr_size): New fn. + * expr.c (expand_expr) [CONSTRUCTOR]: Use it. + * expr.h: Declare it. + +2002-08-02 Krister Walfridsson + + * Makefile.in (gengtype-lex.o, gengtype-yacc.o): Add path to + gengtype-* dependencies. + +2002-08-02 Eric Christopher + + * config.gcc (mips*-*-linux*): Fix ordering of tm_file. + * config/mips/mips.h (READONLY_DATA_SECTION_ASM_OP): Change + #ifndef to #undef. + (TARGET_MEM_FUNCTIONS): Define instead of define to 1. + +2002-08-02 David Edelsohn + + PR optimize/7067 + * config/rs6000/rs6000.h (RTX_COSTS): Artificially make MULT + small if optimizing for size. + +2002-08-02 Daniel Jacobowitz + + * configure.in (FORBUILD): Use $build_alias. + * configure: Regenerated. + +2002-08-02 Richard Sandiford + + * config.gcc: Don't include mips/abi64.h in $tm_file. + * hard-reg-set.h (call_really_used_regs): Declare. + * config/mips/abi64.h: Remove file. + * config/mips/linux.h, + * config/mips/iris6.h: Don't include it. + * config/mips/mips-protos.h (mips_conditional_register_usage): Declare. + * config/mips/mips.h (CONDITIONAL_REGISTER_USAGE): Use it. + (REG_PARM_STACK_SPACE, STACK_BOUNDARY, STRICT_ARGUMENT_NAMING, + FUNCTION_ARG_PASS_BY_REFERENCE, FUNCTION_ARG_PADDING, + FUNCTION_ARG_CALLEE_COPIES, MUST_PASS_IN_STACK, MIPS_STACK_ALIGN): + Bring across definitions from abi64.h. + (GP_ARG_LAST, FP_ARG_LAST): Use MAX_ARGS_IN_REGISTERS. + (BIGGEST_MAX_ARGS_IN_REGISTERS): New. + (struct mips_args): Use it. + * config/mips/mips.c (mips_conditional_register_usage): Define. + +2002-08-02 Jason Merrill + + * langhooks-def.h (LANG_HOOKS_EXPR_SIZE): New macro. + * langhooks.c (lhd_expr_size): Define default. + * langhooks.h (struct lang_hooks): Add expr_size. + * explow.c (expr_size): Call it. + * expr.c (store_expr): Don't copy an expression of size zero. + (expand_expr) [CONSTRUCTOR]: Use expr_size to calculate how much + to store. + * Makefile.in (builtins.o): Depend on langhooks.h. + +2002-08-02 Kaveh R. Ghazi + + * Makefile.in (ra-debug.o): Depend on $(TM_P_H). + * ra-debug.c: Include "tm_p.h". + * ra-rewrite.c (is_partly_live_1): Change return type to bool. + +2002-08-02 Toon Moene + + * simplify-rtx.c (simplify_binary_operation): x * 1 is allowed + when not honoring signalling NaNs. + (simplify_ternary_operation): a == b has a definite value + when not honoring NaNs. + +2002-08-02 Jason Merrill + + * gdbinit.in (pct): New macro. + +2002-08-01 Stan Shebs + Andreas Tobler + + * ginclude/stddef.h (_BSD_SIZE_T_DEFINED_): Define if not defined, + plays nice with Darwin headers. + (_BSD_RUNE_T_DEFINED_): Likewise. + +2002-08-01 Zack Weinberg + + * c-common.c (c_common_init): -Wtraditional also implies -Wlong-long. + * cppinit.c (cpp_post_options): Likewise. + + * cppexp.c (cpp_classify_number): Suppress -Wtraditional + warning about 'LL' suffix (but not 'ULL' etc) when + -Wno-long-long is in effect. + + * cppmacro.c (_cpp_builtin_macro_text) [BT_TIME, BT_DATE]: + Check for failing time()/localtime(), issue a warning, and + make __TIME__ and __DATE__ expand to fallback strings. + + * doc/cpp.texi, doc/extend.texi: Document behavior of __DATE__ + and __TIME__ when the date and time cannot be determined. + +2002-08-02 Alan Modra + + * config/rs6000/rs6000.c (output_cbranch): Hint differently for power4. + +2002-08-01 Daniel Jacobowitz + + * Makefile.in ($(BUILD_PREFIX_1)ggc-none.o): Use $(GGC_H). + +2002-08-01 Chris Demetriou + + * config.gcc (mipsisa64sb1-*-elf*): New configuration. + (mipsisa64sb1el-*-elf*): Likewise. + * config/mips/mips.c (mips_cpu_info_table): Add sb1. + * config/mips/mips.h (processor_type): Add PROCESSOR_SB1. + (TARGET_SB1, TUNE_SB1): New macros. + * doc/invoke.texi: Add sb1 to documentation for MIPS -march and + -mtune flags. + +2002-08-01 David Edelsohn + + * varasm.c (asm_emit_uninitialized): Return false if global BSS + and ASM_EMIT_BSS not supported by target. + (assemble_variable): Do not duplicate uninitialized logic. + Fall through if asm_emit_uninitialized failed. + +2002-08-01 Chris Demetriou + + * config/mips/mips.h (BRANCH_LIKELY_P): Remove unused macro. + +2002-08-02 Alan Modra + + * config/rs6000/linux64.h (DBX_OUTPUT_BRAC): Define. + (DBX_OUTPUT_LBRAC, DBX_OUTPUT_RBRAC): Define. + + * config/rs6000/rs6000.c (output_toc): Don't use lshift_double when + HOST_BITS_PER_WIDE_INT == 64. + +2002-08-01 Kaveh R. Ghazi + + * df.c (df_insn_table_realloc): Change parameter to unsigned. + * optabs.c (expand_binop): Make variable unsigned. + * simplify-rtx.c (simplify_subreg): Likewise. + * unroll.c (unroll_loop): Cast to avoid signed/unsigned warnings. + +2002-08-01 Franz Sirl + + * c-common.c (cb_register_builtins): Always define __GXX_ABI_VERSION. + +2002-08-01 Richard Henderson + + * toplev.c (parse_options_and_default_flags): Don't set + flag_reorder_blocks for -Os. + + * config/avr/avr.c (avr_optimization_options): Remove. + * config/avr/avr.h (OPTIMIZATION_OPTIONS): Remove. + * config/m68hc11/m68hc11.c (m68hc11_optimization_options): Remove. + * config/m68hc11/m68hc11.h (OPTIMIZATION_OPTIONS): Remove. + +2002-08-01 H.J. Lu + Richard Henderson + + * output.h (DECL_READONLY_SECTION): Remove. + (decl_readonly_section): Declare. + * varasm.c (decl_readonly_section): New. + (default_section_type_flags, default_select_section): Use it. + * config/arm/pe.c (arm_pe_unique_section): Likewise. + * config/i386/interix.c (i386_pe_unique_section): Likewise. + * config/i386/winnt.c (i386_pe_unique_section): Likewise. + * config/mcore/mcore.c (mcore_unique_section): Likewise. + * config/mips/mips.c (mips_unique_section): Likewise. + +2002-08-01 Richard Henderson + + * integrate.c (copy_rtx_and_substitute): Squash MEM_EXPR when it + refers to a subroutine parameter. + +2002-08-01 Jakub Jelinek + + * varasm.c (assemble_visibility): Strip name encoding. + +2002-08-01 Ian Dall + + * config/ns32k/ns32k.h (TARGET_IEEE_COMPARE): Correct earlier patch. + (RETURN_ADDR_RTX): Cannot determine return address for FRAME > 0 + when there is no frame pointer. + (INITIAL_FRAME_POINTER_OFFSET): Count stack space for saved fp + registers properly. + * config/ns32k/__unorddf2.c: New file. + * config/ns32k/__unordsf2.c: New file. + * config/ns32k/t-ns32k: New file. + * config.gcc (ns32k-*-netbsd*): Use it. + +2002-08-01 Aldy Hernandez + + * config/rs6000/rs6000.h (SPU_CONST_OFFSET_OK): Change to 0xff. + +2002-08-01 Neil Booth + + * c-common.c (__GXX_ABI_VERSION): Correct spelling. 2002-08-01 Benjamin Kosnik - * gcc.c: Set __GXX_ABI_VERSION to 102. + * c-common.c (cb_register_builtins): Set __GXX_ABI_VERSION__ to 102. + +2002-08-01 Richard Sandiford + + * config/mips/mips.md: Add [!]TARGET_MIPS16 to sgtu conditions. + +2002-08-01 Zdenek Dvorak + + * gcse.c (expr_hash_table_size, n_exprs, set_hash_table_size, + n_sets): Removed. + (expr_hash_table, set_hash_table): Type changed to ... + (struct hash_table): New type. + (hash_scan_insn, hash_scan_set, hash_scan_clobber, hash_scan_call, + insert_expr_in_table, insert_set_in_table, compute_hash_table, + dump_hash_table, lookup_expr, lookup_set, compute_local_properties, + compute_ae_gen, compute_ae_kill): Modified to pass the table explicitly. + (alloc_set_hash_table, alloc_expr_hash_table): Merged to ... + (alloc_hash_table): New. + (free_set_hash_table, free_expr_hash_table): Merged to ... + (free_hash_table): New. + (compute_set_hash_table, compute_expr_hash_table): Merged to ... + (compute_hash_table_work): New. + (classic_gcse, one_classic_gcse_pass, compute_cprop_data, + find_avail_set, one_cprop_pass, find_bypass_set, compute_pre_data, + pre_edge_insert, pre_insert_copies, pre_delete, pre_gcse, + one_pre_gcse_pass, compute_transpout, compute_code_hoist_vbeinout, + hoist_code, one_code_hoisting_pass, + trim_ld_motion_mems): Altered due to changed type of hash tables. + +2002-08-01 Zack Weinberg + + * final.c (output_alternate_entry_point): + If ASM_OUTPUT_TYPE_DIRECTIVE is defined, use it. + +2002-08-01 Kaveh R. Ghazi + + * objc/objc-act.c (encode_complete_bitfield): Add prototype and + avoid ISO C style function definition. + + * expr.c (expand_assignment): Delete unused variable. + +2002-08-01 Toon Moene + + * c-common.c (cb_register_builtins): Set + __FINITE_MATH_ONLY__ to 1 if -ffinite-math-only + is given, and to 0 otherwise. + * combine.c (simplify_if_then_else): HONOR_NANS + implies FLOAT_MODE_P. + +2002-08-01 Neil Booth + + * cppinit.c (COMMAND_LINE_OPTIONS): Remove OPT_dollar. + (cpp_handle_option): Don't handle it. + (print_help): Update. + * doc/cppopts.texi: Update. + +2002-08-01 Neil Booth + + * c-common.c (cb_register_builtins): If C++, define + __EXCEPTIONS, __DEPRECATED and __GXX_ABI_VERSION as appropriate. + * gcc.c (cpp_unique_options): Remove __GXX_ABI_VERSION. +cp: + * lang-specs.h: Simplify in accordance with new code in + c-common.c. + +2002-08-01 Neil Booth + + * c-common.c: Define all C/ObjC/C++ warning and flag variables. + * c-common.h: Declare all C/ObjC/C++ warning and flag variables. + * c-decl.c: Move all warning and flag variables to c-common.c. + * c-format.c: Move all warning variables to c-common.c. + * c-tree.h: Move all warning and flag declarations to c-common.h. + * objc/objc-act.c: Move all warning variables to c-common.c. + (flag_warn_protocol): Rename warn_protocol. + +2002-07-31 John David Anglin + + * pa-linux.h (GLOBAL_ASM_OP): Fix typo. + +2002-07-31 Graham Stott + + * config/stormy16/stormy16.h (BSS_SECTION_ASM_OP): Add missing + .section prefix. + +2002-07-31 Stan Shebs + + * config.gcc (i[34567]86-*-darwin*): New configuration. + * config/darwin.h (TARGET_ENCODE_SECTION_INFO): Undefine before + defining. + (TARGET_ENCODE_SECTION_INFO): Ditto. + (ASM_PREFERRED_EH_DATA_FORMAT): Ditto. + * config/darwin.c (machopic_indirect_data_reference): Remove + setting of RTX_UNCHANGING_P. + (machopic_legitimize_pic_address): Move RTX_UNCHANGING_P up so as + not to be applied to sums. + * config/i386/t-darwin: New file. + * config/i386/darwin.h: New file. + * config/i386/i386.h (TARGET_MACHO): Add default definition. + * config/i386/i386.md (tablejump): Add TARGET_MACHO case. + * config/i386/i386.c (output_set_got): For Mach-O, output Mach-O + label and not the GOT add. + (constant_address_p): For Mach-O, seeing a CONST is enough. + (legitimate_pic_address_disp_p): Add a Mach-O case. + (legitimate_address_p): Also test machopic_operand_p if Mach-O. + (legitimize_pic_address): Use generic Mach-O code to legitimize. + (output_pic_addr_const): Suppress @PLT if Mach-O, and parens + if outputting a difference. + (ix86_output_addr_diff_elt): Add Mach-O case. + (ix86_expand_move): Similarly. + (ix86_expand_call): Similarly. + (current_machopic_label_num): New global. + (machopic_output_stub): New function. + (ix86_value_regno): New function. + (ix86_function_value): Use it instead of VALUE_REGNO. + (ix86_libcall_value): Ditto. + * config/i386/unix.h (VALUE_REGNO): Remove. + +2002-07-31 Graham Stott + + * config/rs6000/rs6000.c(rs6000_hash_constant): Fix + hash for LABEL_REF's. + +2002-07-31 Graham Stott + + * config/rs6000/rs6000.c (spe_init_builtins, + altivec_init_builtins, rs6000_common_init_builtins): + Replace ANSI with K&R function def. + +2002-07-31 David Edelsohn + + * rs6000.c (validate_condition_mode): Test flag_finite_math_only + for CCFPmode. + +2002-07-31 Richard Sandiford + + * config/mips/crtn.asm: Don't use __mips16 to determine the + return-address offset. Define RA to a suitable temporary + register for the return address. + +2002-07-31 Richard Sandiford + + * config/mips/mips.md (eh_set_lr_si, eh_set_lr_di): Change + constraints to 'd'. + +2002-07-30 Chris Demetriou + + * config/mips/elf.h (STARTFILE_SPEC): Define differently if + default ABI is MEABI. (Undoes incorrect change in Eric Christopher's + patch on 2002-07-29.) + * config/mips/elf64.h (STARTFILE_SPEC): Likewise. + +2002-07-30 Kaveh R. Ghazi + + * alpha.h, arc.h, arm/aout.h, avr.h, cris.h, d30v.h, dsp16xx.h, + fr30.h, h8300.h, i370.h, i386/sco5.h, i386/unix.h, i960.h, ia64.h, + ip2k.h, m32r.h, mcore.h, mips.h, mn10200.h, mn10300.h, ns32k.h, + openbsd.h, pa/pa-linux.h, pdp11.h, romp.h, rs6000/sysv4.h, + s390/linux.h, sh.h, sparc.h, stormy16.h, v850.h, vax.h, xtensa.h: + (ASM_GLOBALIZE_LABEL): Delete. + (GLOBAL_ASM_OP): Define. + + * m68hc11.h, m68k.h, m88k.h (ASM_GLOBALIZE_LABEL): Delete. + + * defaults.h (ASM_GLOBALIZE_LABEL): Provide a default. + * doc/tm.texi (ASM_GLOBALIZE_LABEL): Update docs. + +2002-07-30 Geoffrey Keating + + * doc/extend.texi (Hints implementation): Document that GCC + mostly ignores `register'. + +2002-07-30 Toon Moene + + * flags.h: Declare flag_finite_math_only. + Use it in definition of HONOR_NANS and + HONOR_INFINITIES. + * c-common.c (cb_register_builtins): Emit + __FINITE_MATH_ONLY__ when flag_finite_math_only + is set. + * combine.c (simplify_if_then_else): If + flag_finite_math_only is set, a == b has a + definite value. + * toplev.c: Initialize flag_finite_math_only. + (set_flags_fast_math): Set it on -ffast-math. + (flag_fast_math_set_p): Test it. + * doc/invoke.texi: Document -ffinite-math-only. + +2002-07-30 Richard Henderson + + * ifcvt.c (noce_get_alt_condition): Use reg_overlap_mentioned_p. + (noce_process_if_block): Likewise. + +2002-07-30 Bernd Schmidt + + * ifcvt.c (cond_exec_process_if_block): Fix a merging error. + Bail out early if false_expr is NULL and we'd crash due to this. + * genemit.c (gen_expand): Recognize return insns even if the return + appears in a parallel. + * libgcc2.c: Expand macro DECLARE_LIBRARY_RENAMES if it is defined. + * config/fp-bit.c: Likewise. + * doc/tm.texi: Document it. + +2002-07-30 David Edelsohn + Zack Weinberg + + * rs6000.c (rs6000_expand_unop_builtin): Check icode not + CODE_FOR_nothing. Change switch to if. + (rs6000_expand_binop_builtin): Same. + (rs6000_expand_builtin): Expand builtin if target support enabled. + (rs6000_init_builtins): Init builtin if target support enabled. + (rs6000_common_init_builtins): Check icode not CODE_FOR_nothing. 2002-07-30 Franz Sirl * gcc.c (cpp_unique_options): Define __GXX_ABI_VERSION, bump it to 101. +2002-07-30 Richard Sandiford + + * config/mips/mips.h (SUBTARGET_ASM_DEBUGGING_SPEC): Fix typo. + +2002-07-30 J"orn Rennecke + + * sh.md (cond_delay_slot): New attribute. + (cbranch delay): Use it for anulled-true case. + (stuff_delay_slot): New pattern. + * sh.c (print_operand, case '.'): Don't print .s / /s fore zero-length + delay slot insn. + (gen_far_branch): Emit stuff_delay_slot pattern. + +2002-07-30 J"orn Rennecke + + * unroll.c (copy_loop_body): Don't copy NOTE_INSN_LOOP_CONT. + +2002-07-30 Kazu Hirata + + * fold-const.c: Fix comment typos. + * gcse.c: Likewise. + * reload1.c: Likewise. + +2002-07-29 Aldy Hernandez + + * config/rs6000/rs6000.md: Disallow CCEQ compare with crnor/crnot + for TARGET_SPE. + +2002-07-30 Gabriel Dos Reis + + * c-pretty-print.h (pp_c_statement): Declare. + * c-pretty-print.c (pp_c_postfix_expression): #if 0 support for SRCLOC. + (pp_c_statement): Define. + +2002-07-30 Kaveh R. Ghazi + + * alpha.h, arc.h, arm/aout.h, avr.h, c4x.h, cris.h, d30v.h, + darwin.h, dsp16xx.h, fr30.h, h8300.h, i370.h, i386.h, i960.h, + ip2k.h, m32r.h, m68hc11.h, m68k.h, m88k.h, mcore.h, mips.h, + mn10200.h, mn10300.h, ns32k.h, pa/pa-linux.h, pdp11.h, romp.h, + rs6000/sysv4.h, s390/linux.h, sh.h, sparc.h, stormy16.h, + v850.h, vax.h, xtensa.h (ASM_OUTPUT_LABEL): Delete definition. + + * defaults.h (ASM_OUTPUT_LABEL): Provide a default. + * doc/tm.texi (ASM_OUTPUT_LABEL): Update docs. + +2002-07-30 Gabriel Dos Reis + + * c-pretty-print.c (pp_c_primary_expression): Handle STMT_EXPR. + (pp_c_postfix_expression): Handle ARROW_EXPR, FFS_EXPR, + COMPOUND_LITERAL_EXPR, VA_ARG_EXPR. + (pp_c_expression): Update. + +2002-07-29 Kaveh R. Ghazi + + * alpha/vms-cc.c (preprocess_args, main): Use xstrdup and/or + concat in lieu of xmalloc/strcpy/memcpy/sprintf. + * alpha/vms-ld.c (main): Likewise. + * dsp16xx.c (double_reg_to_memory): Likewise. + * mcore.c (mcore_expand_prolog): Likewise. + * cppfiles.c (read_name_map): Likewise. + * gensupport.c (process_rtx, identify_predicable_attribute, + alter_test_for_insn): Likewise. + * vmsdbgout.c (write_rtnbeg, vmsdbgout_init): Likewise. + +2002-07-29 Roger Sayle + + * builtins.c (expand_builtin): Change the default behavior to + only issue an error if the builtin function doesn't have a + fallback library call. Remove several cases handled by the + new default. + +2002-07-29 John David Anglin + + * real.c (ieee_24, ieee_53, ieee_64, ieee_113): Define only if the + floating point format of the target is IEEE. + * (dec_f, dec_d, dec_g, dec_h): Define only if the floating point + format of the target is DEC. + +2002-07-29 Richard Henderson + + * unroll.c (verify_addresses): Remove. + (find_splittable_givs): Never split DEST_ADDR givs. + +2002-07-29 Geoffrey Keating + + * doc/gty.texi (GGC Roots): Clarify that the list of syntaxes + is exhaustive. + (Files): Improve documentation on generated source files. + + * doc/extend.texi (Translation implementation): Document what + diagnostics look like. + (Identifiers implementation): Document that there's normally no + limit on identifier names. + (Integers implementation): Document two's complement. + (Hints implementation): Document that GCC honors 'inline', mostly. + (Preprocessing directives implementation): Document that GCC + requires the current time. + +2002-07-30 Gabriel Dos Reis + + * c-pretty-print.h (struct c_pretty_print_info): Add new member. + (pp_initializer): New macro. + (pp_c_initializer): Declare. + * c-pretty-print.c (pp_c_primary_expression): HAndle TARGET_EXPR. + (pp_c_initializer): Define. + (pp_c_initializer_list): New function. + (pp_c_postfix_expression): Handle ABS_EXPR, COMPLEX_CST, + VECTOR_CST, CONSTRUCTOR. + (pp_c_unary_expression): Handle CONJ_EXPR, REALPART_EXPR, + IMAGPART_EXPR. + (pp_c_cast_expression): Handle FLOAT_EXPR. + (pp_c_assignment_expression): Handle INIT_EXPR. + (pp_c_expression): Update. + +2002-07-30 Neil Booth + + * objc/objc-act.c (objc_init): Return immediately if filename + is NULL. + +2002-07-29 Eric Christopher + + * config/mips/elf.h: Remove ecoff.h and gofast includes. + (DWARF2_DEBUGGING_INFO, DBX_DEBUGGING_INFO): Define unconditionally. + (SDB_DEBUGGING_INFO): Undefine. + (PREFERRED_DEBUGGING_TYPE): Set to DWARF2_DEBUG. + (PUT_SDB_SIZE): Remove. + (SUBTARGET_ASM_DEBUGGING_SPEC): Redefine. + (STARTFILE_SPEC): Add isa3264 define. + * config/mips/elf64.h: Ditto. Move TARGET_MEM_FUNCTIONS from here... + * config/mips/ecoff.h: Remove. and here... + * config/mips/iris3.h: and here... + * config/mips/sni-svr4.h: and here... + * config/mips/mips.h: To here. Remove OBJECT_FORMAT_ROSE ifdefs. + Add assembler -mmdebug options for non-dwarf debugging. + * config/mips/r3900.h: Remove debug info defines. + * config/mips/isa32-linux.h: Remove, move functionality to config.gcc. + * config/mips/isa3264.h: Ditto. + * config/mips/t-isa3264: Fix up for file removal and gofast configure + change. + * config/mips/t-elf: Ditto. + * config/mips/t-ecoff: Ditto. + * config/mips/t-r3900: Ditto. + * config/mips/t-iris5-6: Ditto. + * config/mips/t-isa3264: Ditto. + * config/mips/t-linux: Remove. + * config/mips/t-netbsd: Remove. + * config/mips/t-mips: New file. + * config/mips/t-gofast: Ditto. + * config/mips/netbsd.h: Remove unnecessary undefines. + * config/mips/linux.h: Remove #include of mips.h. + * config.gcc: Add mips.h include for elf targets. Remove tm_file + for ecoff. Add gofast configure option for mips. + +2002-07-29 Chris Demetriou + + * configure.in (mips*-*-*): Add a test to see if MIPS libgloss + linker scripts use STARTUP directives consistently. + * configure: Regenerate. + * config.in: Regenerate. + * config/mips/elf.h (STARTFILE_SPEC): Define conditionally, based + on whether HAVE_MIPS_LIBGLOSS_STARTUP_DIRECTIVES is defined. + * config/mips/elf64.h (STARTFILE_SPEC): Likewise. + * config/mips/isa3264.h (STARTFILE_SPEC): Do not redefine if + HAVE_MIPS_LIBGLOSS_STARTUP_DIRECTIVES is set; the result + will be the same. + +2002-07-29 Aldy Hernandez + + * config/rs6000/rs6000.md ("cpu"): Add ppc8540 to attribute. + +2002-07-29 Aldy Hernandez + + * config/rs6000/rs6000.h (RTX_COSTS): Add MULT case for 8540. + +2002-07-29 Aldy Hernandez + + * config/rs6000/rs6000.md: Move altivec patterns from here... + + * config/rs6000/altivec.md: ...to here. + +2002-07-29 Aldy Hernandez + + * config/rs6000/spe.md ("spe_evmra"): Change to unspec. + +2002-07-29 Richard Henderson + + * emit-rtl.c (set_mem_attributes_minus_bitpos): Rename from + set_mem_attributes and add BITPOS argument. Subtract it from + OFFSET when same is adjusted. + (set_mem_attributes): New wrapper function. + * expr.c (expand_assignment): Use set_mem_attributes_minus_bitpos; + remove offset adjustment hack. + * expr.h (set_mem_attributes_minus_bitpos): Declare. + +2002-07-29 Gabriel Dos Reis + + * Makefile.in (C_OBJS): Include c-pretty-print.o + (c-pretty-print.o): Add depency rule. + * pretty-print.h: Add more macros. + * c-pretty-print.c: New file. + * c-pretty-print.h: Likewise. + +2002-07-29 Aldy Hernandez + + * config/rs6000/spe.h (__internal_ev_mwhgumian): Cast vector + constants to __ev64_s32__. + (__internal_ev_mwhgsmian): Same. + (__internal_ev_mwhgsmfan): Same. + (__internal_ev_mwhgssfan): Same. + (__internal_ev_mwhgumiaa): Same. + (__internal_ev_mwhgsmiaa): Same. + (__internal_ev_mwhgsmfaa): Same. + (__internal_ev_mwhgssfaa): Same. + +2002-07-29 David Edelsohn + + * varasm.c (assemble_variable): Narrow test for uninitialized + without BSS target support. + +2002-07-29 Nathan Sidwell + + * profile.c: Add file comment describing the overall algorithm and + structures. + (struct edge_info): Add comments. + (struct bb_info): Add comments. + * basic-block.h (EDGE_*): Add comments. + * doc/gcov.texi (Gcov Data Files): Document bit flags. + +2002-07-29 Bob Wilson + + * config/xtensa/elf.h, config/xtensa/linux.h + (TARGET_OS_CPP_BUILTINS): Define. + (CPP_PREDEFINES): Remove. + * config/xtensa/xtensa.h (TARGET_CPU_CPP_BUILTINS): Define. + (CPP_SPEC): Remove. + +2002-07-29 Zack Weinberg + + * gensupport.c: Include hashtab.h. + (insn_elision, condition_table, hash_c_test, cmp_c_test, + maybe_eval_c_test): New routines and data structures to + support insn elision. + (init_md_reader): Read and initialize the condition_table. + (read_md_rtx): Discard insn patterns whose C test is provably + always false. + * gensupport.h: Declare new functions and data structures. + + * genconditions.c, dummy-conditions.c: New files. + * Makefile.in: Build genconditions; run it to construct + insn-conditions.c; build that and link it into most gen* + programs. + (HOST_SUPPORT, HOST_EARLY_SUPPORT): New variables. + (GEN): Delete, unused. + (STAGESTUFF): Update. + + * gencodes.c: (gen_insn): #define CODE_FOR_xxx equal to + CODE_FOR_nothing for all elided patterns. + (main): Tweaked to support this. + * genflags.c (gen_proto): Emit a static inline generator + function here for all elided patterns, which simply returns + NULL_RTX. + (gen_insn): Do not define HAVE_xxx for elided patterns. + (main): Tweaked to support this. No need to forward-declare + struct rtx_def. + * genrecog.c: Do not bother emitting the C test if it's known + to be true at compile time. + +2002-07-29 Mike Stump + + * config.gcc (target_gtfiles): Initialize, as otherwise cross + compilers hosted on powerpc-apple-darwin6.0 won't even build. + +2002-07-29 Richard Earnshaw + + * arm.md (sibcall, sibcall_value): Add RETURN as part of the pattern, + remove clobber of LR. + (sibcall_insn, sibcall_value_insn): Update accordingly. + (sibcall_epilogue): Remove debugging comment from assembler stream. + +2002-07-29 Gabriel Dos Reis + + * pretty-print.h: Define more macros. + * diagnostic.h (output_formatted_integer): Moved from... + * diagnostic.c: ... here. + +2002-07-28 Kaveh R. Ghazi + + * stormy16.h (ASM_OUTPUT_SYMBOL_REF): Use ASM_OUTPUT_LABEL_REF. + +2002-07-28 Zack Weinberg + + * defaults.h (ASM_OUTPUT_MEASURED_SIZE): Take only two + arguments. Always use ".-symbol" as expression argument. + * doc/tm.texi: Update to match. Document requirement for + ".size symbol, .-symbol" to be acceptable to assembler. + + * config/elfos.h, config/netbsd-aout.h, config/openbsd.h, + config/arm/elf.h, config/avr/avr.h, config/cris/aout.h, + config/i386/freebsd-aout.h, config/i386/sco5.h, + config/ip2k/ip2k.h, config/m88k/m88k.h, config/xtensa/elf.h, + config/xtensa/linux.h: Update uses of ASM_OUTPUT_MEASURED_SIZE. + +2002-07-28 Kaveh R. Ghazi + + * Makefile.in (gengtype-lex.c): Fix error in last change. + + * alpha/freebsd.h (TARGET_OS_CPP_BUILTINS): Add missing + backslash. + + * Makefile.in (vmsdbgout.o): Depend on function.h. + + * vmsdbgout.c: Include function.h. + +2002-07-28 Alan Modra + + * prefix.c (update_path): Don't strip single `.' path components + unless stripping a later `..' component. Exit loop as soon as + a valid path is found. + +2002-07-27 Roger Sayle + + * builtins.def [DEF_GCC_BUILTIN]: Require an explicit ATTRS + argument. Mark BUILT_IN_RETURN, BUILT_IN_EH_RETURN, + BUILT_IN_LONGJMP and BUILT_IN_TRAP as noreturn, the ISO C99 + floating point unordered comparisons (e.g. __builtin_isgreater) + as const, and leave the remaining GCC_BUILTINs unchanged. + + * c-decl.c (builtin_function): No need to explicitly mark + BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn. + +2002-07-27 Roger Sayle + + * Makefile.in: rtlanal.o now depends upon real.h. + + * flags.h [flag_signaling_nans]: New flag. + [HONOR_SNANS]: New macro. + + * toplev.c [flag_signaling_nans]: Initialize to false. + (f_options): Add processing for "-fsignaling-nans". + (set_fast_math_flags): Clear flag_signaling_nans with -ffast-math. + (process_options): flag_signaling_nans implies flag_trapping_math. + + * c-common.c (cb_register_builtins): Define __SUPPORT_SNAN__ + when -fsignaling-nans. First step to implementing WG14's N965. + + * fold-const.c (fold) [MULT_EXPR]: Conditionalize transforming + 1.0 * x into x, and -1.0 * x into -x on !HONOR_SNANS. + [RDIV_EXPR]: Conditionalize x/1.0 into x on !HONOR_SNANS. + + * simplify-rtx.c (simplify_relational_operation): Conditionalize + transforming abs(x) < 0.0 into false on !HONOR_SNANS. + + * rtlanal.c: #include real.c for TARGET_FLOAT_FORMAT definitions + required by HONOR_SNANS. (may_trap_p): Floating point DIV, MOD, + UDIV, UMOD, GE, GT, LE, LT and COMPARE may always trap with + -fsignaling_nans. EQ and NE only trap for flag_signaling_nans + not flag_trapping_math (i.e. HONOR_SNANS but not HONOR_NANS). + + * doc/invoke.texi: Document new -fsignaling-nans compiler option. + +2002-07-27 Kaveh R. Ghazi + + * Makefile.in (gengtype-lex.c): Work around a bug in flex. + * gengtype-lex.l (YY_USE_PROTOS): Undef. + (YY_DECL): Define. + +2002-07-27 Roger Sayle + + * doc/invoke.texi: Document that both -fno-builtin-foo and + -fno-builtin are supported by the g++ front-end. + +2002-07-27 Stan Shebs + + * configure.in: Rename config_gtfiles to target_gtfiles. + * configure: Regenerate. + * doc/gty.texi: Update reference. + * config.gcc (powerpc-*-darwin*): Set target_gtfiles + instead of appending to it. + +2002-07-25 Aldy Hernandez + + * config/rs6000/rs6000.c (function_arg_advance): SPE vararg + vectors are split into two registers. + (function_arg): Same. + +2002-07-26 J"orn Rennecke + + * pa.md (extv): Check predicates before emitting extv_32. + +2002-07-27 Alan Modra + + * config/rs6000/rs6000.c (rs6000_traceback_name): New var. + (rs6000_traceback): New var. + (rs6000_override_options): Set rs6000_traceback. + (rs6000_output_function_epilogue): Implement traceback options. + * config/rs6000/rs6000.h (TARGET_OPTIONS): Add "traceback=". + (rs6000_traceback_name): Declare. + + * config/rs6000/rs6000.c (output_profile_hook): Don't generate profile + label reference when NO_PROFILE_COUNTERS. + +2002-07-26 Jason Merrill + + * function.c (assign_parms): Handle frontend-directed pass by + invisible reference. + +2002-07-26 Neil Booth + + * doc/cppopts.texi: Update. + +2002-07-26 Neil Booth + + * cppmacro.c (_cpp_create_definition): Don't attempt redefinition + warnings on assertions. + +2002-07-26 Neil Booth + + * c-common.h (RID_AND, RID_AND_EQ, RID_NOT, RID_NOT_EQ, + RID_OR, RID_OR_EQ, RID_XOR, RID_XOR_EQ, RID_BITAND, RID_BITOR, + RID_COMPL): Remove. + * c-parse.in (rid_to_yy): Similarly. + +2002-07-26 Jason Merrill + + * c-dump.c: Resurrect. + * tree-dump.c: Move C-specific stuff to c-dump.c. + * c-common.h: Declare c_dump_tree. + * c-lang.c (LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN): Define. + * Makefile.in (C_AND_OBJC_OBJS): Add c-dump.o. + (c-dump.o): New rule. + +2002-07-26 Alan Modra + + * config/rs6000/rs6000.md: Enable patterns using rlwinm for + PowerPC64. Replace "T" and "S" constraints with "n" when the + predicate will do. Formatting fixes. + (extzvsi_internal2): Use "andi.", "andis." and attr type of "compare" + as for extzvsi_internal1. + +2002-07-25 Neil Booth + + * dwarfout.c (VERSION_ASM_OP, DERIV_BEGIN_LABEL_FMT, + DERIV_END_LABEL_FMT): Remove. + (SL_BEGIN_LABEL_FMT, SL_END_LABEL_FMT): Move. + +2002-07-25 Neil Booth + + * objc/objc-act.c (UTAG_STATICS, UTAG_PROTOCOL_LIST, USERTYPE): + Remove. + +2002-07-25 Stan Shebs + + * config/rs6000/rs6000.c (rs6000_emit_prologue): Remove unused + local var dwarfp. + (output_compiler_stub): Remove unused locals. + (output_call): Always initialize line number. + +2002-07-25 J"orn Rennecke + + * sh.h (LOAD_EXTEND_OP): QImode zero-extends on SHmedia. + * sh.md (truncdiqi2, movqi_media): Likewise. + +2002-07-25 Neil Booth + + * gcse.c (obstack_chunk_alloc): Remove. + (gcse_alloc): Fix to count allocated bytes. + * collect2.c (SYMBOL__MAIN): Remove. + +2002-07-25 Neil Booth + + * gcc.c (TARGET_EXECUTABLE_SUFFIX): Only used if + HAVE_TARGET_EXECUTABLE_SUFFIX. + +2002-07-25 J"orn Rennecke + + * rtl.h (mem_attrs): Spell out more clearly the roles of ALIGN, + SIZE, EXPR and OFFSET. + +2002-07-25 Richard Henderson + + * emit-rtl.c (set_mem_attributes): Fix size and alignment thinkos + in ARRAY_REF of DECL_P case. + +2002-07-25 Richard Sandiford + + * doc/invoke.texi: Document -mabi=meabi, and expand on the EABI + description. Document -mips32, -mips64, and the associated -march + values. Describe the "mipsN" arguments to -march. Say that the + -mipsN options are equivalent to -march. Reword the description + of default type sizes. + * toplev.h (target_flags_explicit): Declare. + * toplev.c (target_flags_explicit): New var. + (set_target_switch): Update target_flags_explicit. + * config/mips/abi64.h (SUBTARGET_TARGET_OPTIONS): Undefine. + * config/mips/elf64.h (MIPS_ISA_DEFAULT): Undefine. + * config/mips/iris6.h (SUBTARGET_ASM_SPEC): -mabi=64 implies -mips3. + * config/mips/isa3264.h (MIPS_ENABLE_EMBEDDED_O32): Undefine. + * config/mips/mips.h (mips_cpu_info): New struct. + (mips_cpu_string, mips_explicit_type_size_string): Remove. + (mips_cpu_info_table, mips_arch_info, mips_tune_info): Declare. + (MIPS_CPP_SET_PROCESSOR): New macro. + (TARGET_CPP_BUILTINS): Declare a macro for each supported processor. + Define _MIPS_ARCH and _MIPS_TUNE. + (MIPS_ISA_DEFAULT): Don't provide a default value. Instead... + (MIPS_CPU_STRING_DEFAULT): Set to "from-abi" if neither it nor + MIPS_ISA_DEFAULT were already defined. + (MULTILIB_DEFAULTS): Add MULTILIB_ABI_DEFAULT. + (TARGET_OPTIONS): Remove -mcpu and -mexplicit-type-size. + (ABI_NEEDS_32BIT_REGS, ABI_NEEDS_64BIT_REGS): New. + (GAS_ASM_SPEC): Remove -march, -mcpu, -mgp* and -mabi rules. + (ABI_GAS_ASM_SPEC): Remove. + (MULTILIB_ABI_DEFAULT, ASM_ABI_DEFAULT_SPEC): New macros. + (ASM_SPEC): Add -mgp32, -mgp64, -march, -mabi=eabi and -mabi=o64. + Invoke %(asm_abi_default_spec) if no ABI was specified. + (CC1_SPEC): Remove ISA -> register-size rules. + (EXTRA_SPECS): Remove abi_gas_asm_spec. Add asm_abi_default_spec. + * config/mips/mips.c (mips_arch_info, mips_tune_info): New vars. + (mips_cpu_string, mips_explicit_type_size_string): Remove. + (mips_cpu_info_table): New array. + (mips_set_architecture, mips_set_tune): New fns. + (override_options): Rework to make -mipsN equivalent to -march. + Detect more erroneous cases, including those removed from CC1_SPEC. + Don't change the ABI based on architecture, or vice versa. + Unify logic with GAS. + (mips_asm_file_start): Get architecture name from mips_arch_info. + (mips_strict_matching_cpu_name_p, mips_matching_cpu_name_p): New fns. + (mips_parse_cpu): Take the name of the option as argument. Handle + 'from-abi'. Raise an error if the option is wrong. + (mips_cpu_info_from_isa): New fn. + +2002-07-25 Richard Sandiford + + * config/mips/mips.md (tablejump_mips161): Use gen_rtx_LABEL_REF. + (tablejump_mips162): Likewise. + +2002-07-25 J"orn Rennecke + + * simpify-rtx.c (simplify_subreg): Don't pass MODE_CC mode to + int_mode_for_mode. + +2002-07-25 Gabriel Dos Reis + + * c-common.c (c_sizeof_or_alignof_type): Take a third argument for + complaining. + * c-common.h (c_sizeof): Adjust definition. + (c_alignof): Likewise. + * c-tree.h (c_sizeof_nowarn): Now macro. + * c-typeck.c (c_sizeof_nowarn): Remove definition. + +2002-07-25 Neil Booth + + * c-decl.c (c_decode_option): No need to handle switches + cpplib handles. + +2002-07-24 Zack Weinberg + + * defaults.h (ASM_OUTPUT_TYPE_DIRECTIVE, ASM_OUTPUT_SIZE_DIRECTIVE, + ASM_OUTPUT_MEASURED_SIZE): New default definitions of new macros. + * doc/tm.texi: Document them. Also document SIZE_ASM_OP, + TYPE_ASM_OP, and TYPE_OPERAND_FMT. + + * config/elfos.h, config/netbsd-aout.h, config/openbsd.h, + config/alpha/elf.h, config/arm/elf.h, config/avr/avr.h, + config/cris/aout.h, config/i386/freebsd-aout.h, + config/i386/sco5.h, config/ia64/ia64.c, config/ip2k/ip2k.h, + config/m68k/m68kelf.h, config/m68k/m68kv4.h, config/m88k/m88k.h, + config/mcore/mcore-elf.h, config/mips/elf.h, config/mips/elf64.h, + config/mips/iris6.h, config/mips/linux.h, config/pa/pa-linux.h, + config/pa/pa64-hpux.h, config/rs6000/sysv4.h, + config/xtensa/elf.h, config/xtensa/linux.h: + Use the new macros. + Where possible, remove redundant definitions of SIZE_ASM_OP, + TYPE_ASM_OP, and TYPE_OPERAND_FMT. + +2002-07-24 Aldy Hernandez + + * config/rs6000/eabi.h: Define TARGET_SPE_ABI, TARGET_SPE, + TARGET_ISEL, and TARGET_FPRS. + + * doc/invoke.texi (RS/6000 and PowerPC Options): Document + -mabi=spe, -mabi=no-spe, and -misel=. + + * config/rs6000/rs6000-protos.h: Add output_isel. + Move vrsave_operation prototype here. + + * config/rs6000/rs6000.md (sminsi3): Allow pattern for TARGET_ISEL. + (smaxsi3): Same. + (uminsi3): Same. + (umaxsi3): Same. + (abssi2_nopower): Disallow when TARGET_ISEL. + (*ne0): Same. + (negsf2): Change to expand and rename old pattern to *negsf2. + (abssf2): Change to expand and rename old pattern to *abssf2. + + New expanders: fix_truncsfsi2, floatunssisf2, floatsisf2, + fixunssfsi2. + + Change patterns that check for TARGET_HARD_FLOAT or + TARGET_SOFT_FLOAT to also check TARGET_FPRS. + + * config/rs6000/rs6000.c: New globals: rs6000_spe_abi, + rs6000_isel, rs6000_fprs, rs6000_isel_string. + (rs6000_override_options): Add 8540 case to + processor_target_table. + Set rs6000_isel for the 8540. + Call rs6000_parse_isel_option. + (enable_mask_for_builtins): New. + (rs6000_parse_isel_option): New. + (rs6000_parse_abi_options): Add spe and no-spe. + (easy_fp_constant): Treat !TARGET_FPRS as soft-float. + (rs6000_legitimize_address): Check for TARGET_FPRS when checking + for TARGET_HARD_FLOAT. + Add case for SPE_VECTOR_MODE. + (rs6000_legitimize_reload_address): Handle SPE vector modes. + (rs6000_legitimate_address): Disallow PRE_INC/PRE_DEC for SPE + vector modes. + Check for TARGET_FPRS when checking for TARGET_HARD_FLOAT. + (rs6000_emit_move): Check for TARGET_FPRS. + Add cases for SPE vector modes. + (function_arg_boundary): Return 64 for SPE vector modes. + (function_arg_advance): Check for TARGET_FPRS and + Handle SPE vectors. + (function_arg): Same. + (setup_incoming_varargs): Check for TARGET_FPRS. + (rs6000_va_arg): Same. + (struct builtin_description): Un-constify mask field. Move up in + file. + (bdesc_2arg): Un-constify and add SPE builtins. + (bdesc_1arg): Same. + (bdesc_spe_predicates): New. + (bdesc_spe_evsel): New. + (rs6000_expand_unop_builtin): Add SPE 5-bit literal builtins. + (rs6000_expand_binop_builtin): Same. + (bdesc_2arg_spe): New. + (spe_expand_builtin): New. + (spe_expand_predicate_builtin): New. + (spe_expand_evsel_builtin): New. + (rs6000_expand_builtin): Call spe_expand_builtin for SPE. + (rs6000_init_builtins): Initialize SPE builtins. Call + rs6000_common_init_builtins. + (altivec_init_builtins): Move all non-altivec builtin code to... + (rs6000_common_init_builtins): ...here. New function. + (branch_positive_comparison_operator): Allow NE code for SPE. + (ccr_bit): Return correct ccr bit for SPE fp. + (print_operand): Emit crnor in 'D' case for SPE. + New case 't'. + Add SPE code for 'y' case. + (rs6000_generate_compare): Generate rtl for SPE fp. + (output_cbranch): Handle SPE hard floats. + (rs6000_emit_cmove): Handle isel. + (rs6000_emit_int_cmove): New. + (output_isel): New. + (rs6000_stack_info): Adjust stack frame so GPRs are saved in + 64-bits for SPE. + (debug_stack_info): Add SPE info. + (gen_frame_mem_offset): New. + (rs6000_emit_prologue): Save GPRs in 64-bits for SPE abi. + Change mode of frame pointer, when saving it, to Pmode. + (rs6000_emit_epilogue): Restore GPRs in 64-bits for SPE abi. + Misc cleanups and use gen_frame_mem_offset when appropriate. + + * config/rs6000/rs6000.h (processor_type): Add PROCESSOR_PPC8540. + (TARGET_SPE_ABI): New. + (TARGET_SPE): New. + (TARGET_ISEL): New. + (TARGET_FPRS): New. + (FIXED_SCRATCH): New. + (RTX_COSTS): Add PROCESSOR_PPC8540. + (ASM_CPU_SPEC): Add case for 8540. + (TARGET_OPTIONS): Add isel= case. + (rs6000_spe_abi): New. + (rs6000_isel): New. + (rs6000_fprs): New. + (rs6000_isel_string): New. + (UNITS_PER_SPE_WORD): New. + (LOCAL_ALIGNMENT): Adjust for SPE. + (HARD_REGNO_MODE_OK): Same. + (DATA_ALIGNMENT): Same. + (MEMBER_TYPE_FORCES_BLK): New. + (FIRST_PSEUDO_REGISTER): Set to 113. + (FIXED_REGISTERS): Add SPE registers. + (reg_class): Same. + (REG_CLASS_NAMES): Same. + (REG_CLASS_CONTENTS): Same. + (REGNO_REG_CLASS): Same. + (REGISTER_NAMES): Same. + (DEBUG_REGISTER_NAMES): Same. + (ADDITIONAL_REGISTER_NAMES): Same. + (CALL_USED_REGISTERS): Same. + (CALL_REALLY_USED_REGISTERS): Same. + (SPE_ACC_REGNO): New. + (SPEFSCR_REGNO): New. + (SPE_SIMD_REGNO_P): New. + (HARD_REGNO_NREGS): Adjust for SPE. + (VECTOR_MODE_SUPPORTED_P): Same. + (REGNO_REG_CLASS): Same. + (FUNCTION_VALUE): Same. + (LIBCALL_VALUE): Same. + (LEGITIMATE_OFFSET_ADDRESS_P): Same. + (SPE_VECTOR_MODE): New. + (CONDITIONAL_REGISTER_USAGE): Disable FPRs when target does FP on + the GPRs. Set FIXED_SCRATCH fixed in SPE case. + (rs6000_stack): Add spe_gp_size, spe_padding_size, + spe_gp_save_offset. + (USE_FP_FOR_ARG_P): Check for TARGET_FPRS. + (LEGITIMATE_LO_SUM_ADDRESS_P): Same. + (SPE_CONST_OFFSET_OK): New. + (rs6000_builtins): Add SPE builtins. + + * testsuite/gcc.dg/ppc-spe.c: New. + + * config/rs6000/eabispe.h: New. + + * config/rs6000/spe.h: New. + + * config/rs600/spe.md: New. + + * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Define + __SIMD__ for TARGET_SPE. + + * config.gcc: Add powerpc-*-eabispe* case. + Add spe.h to user headers for powerpc. + +2002-07-24 Chris Demetriou + + * config/mips/elf.h (STARTFILE_SPEC): Undo previous change. + * config/mips/elf64.h (STARTFILE_SPEC): Likewise. + * config/mips/isa3264.h (STARTFILE_SPEC): Likewise. + +2002-07-24 Richard Henderson + + * expr.c (expand_expr) [TRY_FINALLY_EXPR]: Use GOTO_SUBROUTINE_EXPR + form when not optimizing. + +2002-07-24 David Mosberger + + * config/ia64/ia64.c (gen_thread_pointer): Fix typo in marking + thread_pointer_rtx as unchanging. + +2002-07-24 Michael Matz + + * ra-colorize.c (INV_REG_ALLOC_ORDER): New macro. + (free_reg): Use it. + +2002-07-24 Richard Earnshaw + + * arm.md (arm_buneq, arm_bltgt): put '\' before ';' in output + pattern. + (arm_buneq_reversed, arm_bltgt_reversed): Likewise. + (movsicc, movsfcc, movdfcc): FAIL if UNEQ or LTGT. + +2002-07-24 Chris Demetriou + + * config/mips/elf.h (STARTFILE_SPEC): Never include crt0.o. + * config/mips/elf64.h (STARTFILE_SPEC): Likewise. + * config/mips/isa3264.h (STARTFILE_SPEC): Do not redefine. + +2002-07-24 Jan Hubicka + + * toplev.c (rest_of_compilation): Dump loops before clobbering + the structure. + +2002-07-24 Jan Hubicka + + * rtlanal.c (keep_with_call_p): Avoid overflow in fixed_regs. + 2002-07-24 Frank van der Linden PR optimization/7291 * config/i386/i386.c (ix86_expand_clrstr): Fix bzero alignment problem on x86_64. -2002-05-16 Jason Merrill +2002-07-24 Gabriel Dos Reis - * config/mips/mips.c (mips_output_external): Don't do sdata - optimization for a variable with DECL_COMDAT set. + * pretty-print.h: Add macros from cp/error.c -2002-01-03 Jakub Jelinek +2002-07-24 Alan Modra + + * config/rs6000/rs6000-protos.h (mask_operand_wrap): Declare. + (mask64_2_operand): Declare. + (build_mask64_2_operands): Declare. + (and64_2_operand): Declare. + (extract_MB): Declare. + (extract_ME): Declare. + * config/rs6000/rs6000.c (mask64_operand): Allow all ones. Remove + CONST_DOUBLE code. + (mask_operand_wrap): New insn predicate. + (mask64_2_operand): Likewise. + (and64_2_operand): Likewise. + (build_mask64_2_operands): New function. + (extract_MB): New function. + (extract_ME): New function. + (print_operand ): Use extract_MB and extract_ME. + (print_operand ): Allow all ones. Remove CONST_DOUBLE support. + * config/rs6000/rs6000.h (EXTRA_CONSTRAINT): Add 't'. + (PREDICATE_CODES): Add and64_2_operand, mask_operand_wrap and + mask64_2_operand. Remove CONST_DOUBLE from mask64_operand. + * config/rs6000/rs6000.md (andsi3_internal3): New + (andsi3_internal3+1): Enable split for powerpc64. + (andsi3_internal3+2): New split. + (andsi3_internal4): Renamed old andsi3_internal3. + (andsi3_internal5): New. + (andsi3_internal5+1): Enable split for powerpc64. + (andsi3_internal5+2): New split. + (andsi3_internal6, andsi3_internal7, andsi3_internal8): New. + (anddi3): Handle 't' constraint. + (anddi3+1): New split. + (anddi3_internal2): Handle 't' constraint. + (anddi3_internal2+1): New split. + (anddi3_internal3): Handle 't' constraint. + (anddi3_internal3+1): New split. + +2002-07-24 Alan Modra + + * config/rs6000/rs6000.md: Remove scratch reg on insns using + addze and similar (plus (comparison r1 r2) r3) insns. Add + missing scratch reg in one case. Formatting fixes. + +2002-07-24 Neil Booth + + * cppexp.c (parse_defined): Mark macro used. + * cpphash.h (struct cpp_macro): New member "used". + (_cpp_mark_macro_used, _cpp_warn_if_unused_macro): New. + (struct cpp_reader): New member. + * cppinit.c (cpp_finish_options): Set first_unused_line. + (cpp_finish): Warn of unused macros if requested. + (OPT_TABLE): New switches. + (cpp_handle_option): Handle them. + * cpplib.c (do_undef): Warn if macro unused. + (do_ifdef, do_ifndef): Mark macro used. + * cpplib.h (struct cpp_options): New member. + * cppmacro.c (_cpp_warn_if_unused_macro): New. + (enter_macro_context): Mark macro used. + (_cpp_create_definition): Mark macro unused; warn if unused + when redefined. + * cpptrad.c (scan_out_logcial_line, push_replacement_text): + Mark macros used. + * doc/cppopts.texi: Update. + +2002-07-23 Neil Booth + + * dwarf2out.c (SECTION_ASM_OP, + ASM_OUTPUT_DEFINE_LABEL_DIFFERENCE_SYMBOL): Remove. + * system.h (SECTION_ASM_OP): Poison. + * tree.c (FILE_FUNCTION_PREFIX_LEN): Remove. + * config/alpha/alpha-interix.h, config/mips/linux.h + (ASM_OUTPUT_DEFINE_LABEL_DIFFERENCE_SYMBOL): Remove. + * config/mmix/mmix-protos.h, config/mmix/mmix.c + (mmix_asm_output_define_label_difference_symbol): Remove. + * config/mmix/mmix.h + (ASM_OUTPUT_DEFINE_LABEL_DIFFERENCE_SYMBOL): Remove. + * doc/tm.texi: Remove documentation. + +2002-07-23 J"orn Rennecke + + * recog.c (asm_operand_ok): Allow float CONST_VECTORs for 'F'. + (constrain_operands): Likewise. + * regclass.c (record_reg_classes): Likewise. + * reload.c (find_reloads): Likewise. + * doc/md.texi: Likewise. + + * reload.c (find_reloads_toplev): Use simplify_gen_subreg. + * simplify-rtx.c (simplify_subreg): When converting to a non-int + mode, try to convert to an integer mode of matching size first. + + * simplify-rtx.x (simplify_subreg): When constructing a CONST_VECTOR + from individual subregs, check that each subreg has been generated + sucessfully. + +2002-07-23 Neil Booth + + * genautomata.c (VLA_HWINT_SHORTEN, VLA_HWINT_LAST): Remove. + * df.c (HANDLE_SUBREG, FOR_EACH_BB_IN_BITMAP_REV, + FOR_EACH_BB_IN_SBITMAP): Remove. + * gcse.c (NEVER_SET, FOLLOW_BACK_EDGES): Remove. + * haifa-sched.c (DONE_PRIORITY, MAX_PRIORITY, TAIL_PRIORITY, + LAUNCH_PRIORITY, DONE_PRIORITY_P, LOW_PRIORITY_P): Remove. + * loop.c (PREFETCH_BLOACK_IN_LOOP_MIN, + PREFETCH_LIMIT_TO_SIMULTANEOUS): Remove. + * regrename.c (REGNO_MODE_OK_FOR_BASE_P): Remove. + +2002-07-23 Gabriel Dos Reis + + * pretty-print.h: New file. + +2002-07-23 Paul Koning + + * real.c (REAL_WORDS_BIG_ENDIAN): Make 1 for DEC. + (LARGEST_EXPONENT_IS_NORMAL): Ditto. + (VAX_HALFWORD_ORDER): Define (1 for DEC VAX, 0 otherwise). + (TARGET_G_FLOAT): Default to 0 if not defined. + (ieeetoe): New, common routine to convert target format floats + to internal form. + (e24toe, e53toe): Change to use ieeetoe, distinguish DEC + vs. others. + (e113toe): Change to use ieeetoe. + +2002-07-23 Roman Lechtchinsky + + * real.c (REAL_WORDS_BIG_ENDIAN): Make sure it is 0 for DEC and 1 for + IBM. + (e53toe): Assume IEEE if non of DEC, IBM and C4X is defined. + (e64toe): Remove special cases for DEC and IBM. Remove support for + ARM_EXTENDED_IEEE_FORMAT. + (e24toe): Remove special cases for DEC. + (significand_size): Simplify. Indent. + (ieee_format, ieee_24, ieee_53, ieee_64, ieee_113): New. + (etoieee, toieee): New. + (etoe113, toe113, etoe64, toe64, etoe53, toe53, etoe24, toe24): Use + etoieee and toieee for IEEE arithmetic. + +2002-07-23 Gabriel Dos Reis + + * doc/extend.texi: Say ISO C90, not ISO C89. + * doc/invoke.texi: Likewise. + * doc/standards.texi: Likewise. + +2002-07-23 Steve Ellcey + + * gcc/explow.c (convert_memory_address): Fix conversion of CONSTs. + Fix permutation of conversion and plus/mult. + * gcc/builtins.c (expand_builtin_memcpy) Ensure return pointer is + ptr_mode and not Pmode when POINTERS_EXTEND_UNSIGNED is defined. + (expand_builtin_strncpy) Ditto. + (expand_builtin_memset) Ditto. + +2002-07-23 Gabriel Dos Reis + + Fix PR/7363: + * c-common.c (c_sizeof_or_alignof_type): New function. + (c_alignof): Remove definition. + * c-common.h (c_sizeof, c_alignof): Define as macros. + (c_sizeof_or_alignof_type): Declare. + (my_friendly_assert): Moved from cp/cp-tree.h + * c-typeck.c (c_sizeof): Remove definition. + +2002-07-23 Jan Hubicka + + * gcse.c (try_replace_reg): Use num_changes_pending. + * recog.c (num_changes_pending): New function. + (validate_replace_src): Use validate_repalce_src_group. + (validate_replace_src_group): New. + * recog.h (validate_repalce_src_group): New. + (num_changes_pending): Likewise. + +2002-07-23 J"orn Rennecke + + * calls.c (emit_library_call_value_1): If + FUNCTION_ARG_PASS_BY_REFERENCE is true, pretend this is neither + libcall, const call nor pure call. + +2002-07-23 Neil Booth + + * config/m88k/m88k.h (SECTION_ASM_OP): Remove. + +2002-07-23 Neil Booth + + * vmsdbgout.c (SECTION_ASM_OP): Remove. + +2002-07-23 Neil Booth + + * config/i386/i386.c (AT_BP): Remove. + +2002-07-23 Neil Booth + + * defaults.h (obstack_chunk_alloc, obstack_chunk_free): + Default definition. + * gcse.c: Don't define obstack_chunk_free. + * collect2.c, conflict.c, df.c, diagnostic.c, fix-header.c, + flow.c, gcc.c, genattrtab.c, genautomata.c, genflags.c, gensupport.c, + integrate.c, loop.c, ra.c, read-rtl.c, regrename.c, reload1.c, + reorg.c, tlink.c, tree.c, config/arm/arm.c, objc/objc-act.c: + Don't define obstack macros. + +2002-07-22 Stephane Carrez + + PR target/6744 + * config/m68hc11/m68hc11.c (m68hc11_z_replacement): Also replace + ASM_OPERANDS instructions. + +2002-07-22 Stephane Carrez + + PR target/7361 + * config/m68hc11/m68hc11.c (go_if_legitimate_address_internal): Accept + constant addresses only on 68HC12. + +2002-07-22 Neil Booth + + * cppfiles.c (stack_include_file): Correct test of whether + a dependency should be output. + +2002-07-22 David Edelsohn + + * collect2.c (is_ctor_dtor): Add other possible JOINER values. + +2002-07-22 Richard Earnshaw + + * arm.md (movqi): If optimizing and we can create pseudos, use + a ZERO_EXTEND to load from memory, then copy the result into the + target. + (movhi): Likewise, but only for ARMv4. + +2002-07-22 Neil Booth + + * ssa-ccp.c (PHI_PARMS): Remove. + +2002-07-22 Richard Sandiford + + * config/mips/mips.h (CLASS_CANNOT_CHANGE_MODE): Include FP_REGS + on big-endian targets. + +2002-07-22 Kaveh R. Ghazi + + * hwint.h (HOST_WIDE_INT_PRINT_DEC_SPACE, + HOST_WIDE_INT_PRINT_UNSIGNED_SPACE, + HOST_WIDEST_INT_PRINT_DEC_SPACE, HOST_WIDEST_INT_PRINT_DEC_SPACE): + New formatting macros. + + * ra-debug.c (dump_static_insn_cost): Avoid string concatenation. + +2002-07-22 J"orn Rennecke + + * rtlanal.c (subreg_regno_offset): Return correct offset for + big endian paradoxical subregs. + + * optabs.c (expand_vector_unop): Don't expand using sub_optab + if we got the wrong mode. + + * hwint.c (define HOST_WIDE_INT_PRINT_DEC_C): New define. + * genrecog.c (write_switch, write_cond): Use it. + * genemit.c (gen_exp): Likewise. + +2002-07-22 Jakub Jelinek * c-decl.c (build_compound_literal): Set decl TREE_READONLY from TYPE. +2002-07-22 Jakub Jelinek + * c-decl.c (build_compound_literal): Defer compound literal decls until until file end to emit them only if they are actually used. -2002-07-25 Release Manager +2002-07-21 Kaveh R. Ghazi - * GCC 3.1.1 Released. + * ra-build.c (check_conflict_numbers): Hide unused function. + (livethrough_conflicts_bb): Avoid automatic aggregate + initialization. + (parts_to_webs_1): Avoid `U' integer constant modifier. + (conflicts_between_webs): Wrap a variable in the macro controlling + its usage. + * ra-debug.c (ra_debug_msg): Use VA_OPEN/VA_CLOSE. + (dump_igraph, dump_graph_cost): Avoid string concatenation + (dump_static_insn_cost): Avoid automatic aggregate + initialization. + * ra-rewrite.c (insert_stores): Avoid automatic aggregate + initialization. + (dump_cost): Avoid string concatenation -2002-07-21 Nick Clifton +2002-07-21 Richard Henderson - * Import following patch from mainline: + * expr.c (expand_expr) [TRY_FINALLY_EXPR]: Don't use + GOTO_SUBROUTINE_EXPR when finally_block can be re-expanded. - 2002-03-18 Bernd Schmidt +2002-07-21 Richard Henderson - * 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. + * unroll.c (find_splittable_givs): Do not split DEST_ADDR givs + that are not unrolled completely. + +2002-07-21 Richard Henderson + + * loop.h (LOOP_AUTO_UNROLL): Rename from LOOP_FIRST_PASS. + * loop.c (strength_reduce): Update. + * toplev.c (rest_of_compilation): Do unrolling in the first + loop pass, not the second. + +2002-07-21 Richard Henderson + + * emit-rtl.c (set_mem_attributes): Preserve indirection of PARM_DECL + when flag_argument_noalias == 2. + * alias.c (nonoverlapping_memrefs_p): Handle that. + * print-rtl.c (print_mem_expr): Likewise. + +2002-07-21 Hartmut Schirmer + + * libgcc2.c (__divdi3, __moddi3): Use unary minus operator + instead of __negdi2 directly. + +2002-07-21 Neil Booth + + * gengenrtl.c (gencode): Don't define obstack_alloc_rtx. + * function.c (SYMBOL__MAIN): Remove definition. + * global.c (SET_CONFLICT, REGBITP, ALLOCNO_LIVE_P): Remove. + * predict.c (PROB_NEVER, PROB_LIKELY, PROB_UNLIKELY): Remove. + * profile.c (GCOV_INDEX_TO_BB): Remove. + * sched-rgn.c (ABS_VALUE, MIN_DIFF_PRIORITY, MIN_PROB_DIFF): Remove. + * simplify-rtx.c (FIXED_BASE_PLUS_P): Remove. + +2002-07-21 Neil Booth + + * c-lex.c (GET_ENVIRONMENT): Remove. + * collect2.c (GET_ENV_PATH_LIST): Remove. + (prefix_from_env): Use GET_ENVIRONMENT. + * cppinit.c (GET_ENV_PATH_LIST): Remove. + (init_standard_includes): Use GET_ENVIRONMENT. + * defaults.h (GET_ENVIRONMENT): Define here if not already. + * gcc.c (GET_ENV_PATH_LIST): Remove. + (make_relative_prefix, process_command): Update. + * protoize.c (GET_ENV_PATH_LIST): Remove. + (do_processing): Update. + +2002-07-21 Gabriel Dos Reis + + * c-decl.c (build_array_declarator): Say 'ISO C90', not 'ISO C89'. + (grokdeclarator): Likewise. + * c-format.c (C_STD_NAME): Likewise. + * c-lex.c (interpret_integer): Likewise. + * c-typeck.c (build_array_ref): Likewise. + * cpplex.c (_cpp_lex_direct): Likewise. + * toplev.c (documented_lang_options): Likewise. + +2002-07-21 Neil Booth + + * c-format.c (T99_I, T99_UI): Remove. + +2002-07-21 Neil Booth + + * c-typeck.c (SAVE_SPELLING_DEPTH): Remove. + +2002-07-21 Jan Hubicka + + * gcse.c (do_local_cprop): Do not extend lifetimes of registers set by + do_local_cprop. + +2002-07-21 Andreas Jaeger + + * reload1.c (fixup_abnormal_edges): Remove unused variable. + +2002-07-21 Bernd Schmidt + + Improvements for the ifcvt pass from Michael Meissner, with patches + by Richard Sandiford + * basic-block.h (struct ce_if_block, ce_if_block_t): New types. + * ifcvt.c (cond_exec_changed_p): New static variable. + (last_active_insn): New function, renamed from last_active_insn_p + and changed to return the last active insn in a basic block. All + callers updated. + (block_fallthru): New function. + (cond_exec_process_insns): New argument CE_INFO. Pass it to + IFCVT_MODIFY_INSN. All callers updated. + Return false if START or END are NULL. + Handle case where we're processing an insn that is already + conditional. + + (noce_process_if_block): CE_INFO argument rather than + multiple args containing the involved basic blocks. All callers + changed. + (process_if_block, merge_if_block, find_if_block, + cond_exec_process_if_block): Likewise. + + (cond_exec_process_if_block): New arg DO_MULTIPLE_P. All callers + changed. + Use new function last_active_insn to simplify some code. + New code to handle multiple tests. + Call IFCVT_MODIFY_CANCEL in all failure cases, otherwise set + cond_exec_changed_p to TRUE. + + (process_if_block): New code to handle multiple tests. + (merge_if_block): Likewise. + (find_if_header): New arg PASS. Changed to return the currently + processed basic block or NULL instead of true/false. All callers + changed. + Call IFCVT_INIT_EXTRA_FIELDS. + (block_jumps_and_fallthru_p): New function. + (find_if_block): Discover opportunities to convert multiple tests. + Add additional debugging output. + Update the ce_info structure before returning. + + (if_convert): Run multiple passes of if-conversion. + * doc/tm.texi (IFCVT_MODIFY_TESTS, IFCVT_MODIFY_INSN, + IFCVT_MODIFY_FINAL, IFCVT_MODIFY_CANCEL, IFCVT_MODIFY_MULTIPLE_TESTS, + IFCVT_INIT_EXTRA_FIELDS, IFCVT_EXTRA_FIELDS): Update documentation for + these macros. + +2002-07-21 Jan Hubicka + + * gcse.c: Include cselib.h + (constptop_register): Break out from ... + (cprop_insn): ... here; kill basic_block argument. + (do_local_cprop, local_cprop_pass): New functions. + (one_cprop_pass): Call local_cprop_pass. + +2002-07-20 Roger Sayle + + * simplify-rtx.c (simplify_relational_operation): Optimize + abs(x) < 0.0 (and abs(x) >= 0.0 when using -ffast-math). + +2002-07-20 Michae Matz + + * ra-build.c: (remember_web_was_spilled): Use GENERAL_REGS. + +2002-07-20 Neil Booth + + * cppexp.c (struct op): Add token pointer. + (check_promotion, CHECK_PROMOTION): New. + (optab): Update. + (_cpp_parse_expr): Update, use token pointer of struct op. + (reduce): Warn about change of sign owing to promotion. + * cppinit.c (cpp_handle_option): New warning if -Wall. + * cpplib.h (struct cpp_options): New member. + +2002-07-19 David Edelsohn + + * config/rs6000/rs6000.md: Remove ppc630 fpcompare from single + fpu list. Separate Power4 compare and delayed_compare. Correct + Power4 fpcompare. + (fix_truncdfsi2_internal): Restore FPR preference. + * config/rs6000/t-aix43 (MULTILIB_MATCHES): Add mcpu?power3, + mcpu?power4, mcpu?604e. Remove mpower, mpower2, mpowerpc. + +2002-07-19 Momchil Velikov + + * reload1.c (reload_as_needed): Duplicate oldpat. + +2002-07-20 Alan Modra + + PR optimization/7130 + * loop.h (struct loop_info): Add "preconditioned". + * unroll.c (unroll_loop): Set it. + * doloop.c (doloop_modify_runtime): Correct count for unrolled loops. + +2002-07-19 Zack Weinberg + + * rtl.def (CODE_LABEL): Remove slot 8. + * rtl.h (struct rtx_def): Document new uses of jump and call fields. + (LABEL_ALTERNATE_NAME): Delete. + (LABEL_KIND, SET_LABEL_KIND, LABEL_ALT_ENTRY_P): New. + * defaults.h: Remove default for ASM_OUTPUT_ALTERNATE_LABEL_NAME. + + * final.c (output_alternate_entry_point): New. + (final_scan_insn): Use it instead of + ASM_OUTPUT_ALTERNATE_LABEL_NAME. Do not consider possibility + of a case label being an alternate entry point. + + * cfgbuild.c (make_edges, find_bb_boundaries): Use LABEL_ALT_ENTRY_P. + * emit-rtl.c (gen_label_rtx): Adjust call to gen_rtx_CODE_LABEL. + Do not clear LABEL_NUSES (unnecessary) or LABEL_ALTERNATE_NAME + (field deleted). + * print-rtl.c, ra-debug.c: Update code to output CODE_LABELs. + + * doc/rtl.texi: Document LABEL_KIND, SET_LABEL_KIND, and + LABEL_ALT_ENTRY_P; not LABEL_ALTERNATE_NAME. + * doc/tm.texi: Delete documentation of + ASM_OUTPUT_ALTERNATE_LABEL_NAME. + +2002-07-19 Rainer Orth + + * config/mips/iris5gas.h (DWARF2_DEBUGGING_INFO): Define. + (PREFERRED_DEBUGGING_TYPE): Use DWARF2_DEBUG. + (LINK_SPEC): Define. + (STARTFILE_SPEC): Define. + (ENDFILE_SPEC): Define. + + * config/mips/iris6-o32.h (LINK_SPEC): Move ... + * config/mips/iris6-o32-as.h (LINK_SPEC): ... here. + + * config/mips/iris6-o32-gas.h: New file. + * config.gcc (mips-sgi-irix6*o32): Use it. + + * config/mips/t-iris5-gas: New file. + * config.gcc (mips-sgi-irix6*o32, mips-sgi-irix5*): Use it. + +2002-07-19 Neil Booth + + * cppexp.c (ALWAYS_EVAL): Remove. + (optab, reduce): Always evaluate. + (num_unary_op, num_binary_op, num_div_op): Issue diagnostics + only if not skipping evaluation. + +2002-07-19 Marek Michalkiewicz + + * config/avr/avr.c (debug_hard_reg_set): Remove. + +2002-07-19 Chris Demetriou + + * gcc.c (cpp_options): Include "%1" (cc1_spec). + +2002-07-19 Richard Henderson + + * loop.c (loop_givs_rescan): Delete the REG_EQUAL note, not the insn. + +2002-07-19 Alan Modra + + * prefix.c (update_path): Don't zap single `.' path components + unless followed by another `.' and fix typo last patch. + +2002-07-18 Neil Booth + + * cppexp.c (cpp_num_mul): Remove unused parameter. + (UNARY, BINARY, OTHER, binary_handler): Remove. + (ALWAYS_EVAL): New. + (optab): Update. + (reduce): Refactor to a large switch, don't use a function + pointer. + +2002-07-18 Bo Thorsen + + * config/i386/linux64.h (STARTFILE_PREFIX_SPEC): Define this always. + +2002-07-18 J"orn Rennecke + + * sh-protos.h (sh_expand_unop_v2sf): Move inside #ifdef RTX_CODE guard. + (sh_expand_binop_v2sf): Likewise. + * sh.c (machine_dependent_reorg): Add move for UNSPEC_MOVA. + (int_gpr_dest, trunc_hi_operand): New functions. + * sh.h (PREDICATE_CODES): Add any_register_operand, int_gpr_dest and + trunc_hi_operand. + (SPECIAL_MODE_PREDICATES, any_register_operand): Define. + * sh.md (cmpeqdi_t+1): Remove comments that genrecog warns about. + (adddi3_compact+1, subdi3_compact+1, ashlsi3_n+1, ashlhi3+1): Likewise. + (ashrsi2_16+1, ashrsi2_31+1, lshrsi3_n+1, ashrdi3+[12]): Likewise. + (and_shl_scratch+[12], zero_extendhidi2+1): Likewise. + (zero_extendhisi2_media+1, extendhidi2+1, extendqidi2+1): Likewise. + (extendhisi2_media+1, extendqisi2_media+1): Likewise. + (movsi_media_nofpu+[12], movhi_media+1, movdi_media_nofpu+1): Likewise. + (movdi_const_16bit+[12], movdf_i4+[123], reload_outdf+[2-5]): Likewise. + (movsf_ie+1): Likewise. + (loaddi_trunc): Use int_gpr_dest predicate. + (use_sfunc_addr, indirect_jump_scratch, sibcall_compact): Add mode(s). + (mova, mova_const, GOTaddr2picreg, ptrel, casesi_worker_0): Likewise. + (casesi_worker_0+[12], casesi_worker): Likewise. + (shcompact_preserve_incoming_args): Likewise. + (mov_nop): Use any_register_operand predicate. + (mperm_w0): Use trunc_hi_operand predicate. + +2002-07-18 John David Anglin + + * pa-linux.h (DWARF2_UNWIND_INFO): Delete define. + * pa.h (EH_RETURN_DATA_REGNO): Revise TARGET_64BIT and correct + numbering. + +2002-07-18 John David Anglin + + * pa.c (output_deferred_plabels): Remove unused millicode enum mulU. 2002-07-18 Richard Henderson @@ -1646,10 +15244,433 @@ Thu Sep 5 00:34:33 2002 J"orn Rennecke * ifcvt.c (noce_get_condition): Make certain that the condition is valid at JUMP. +2002-07-18 J"orn Rennecke + + * sh.c (barrier_align, push): Shut up compiler warnings. + (initial_elimination_offset,sh_media_init_builtins): Likewise. + (reg_no_subreg_operand): Delete. + +2002-07-17 Bo Thorsen + + * config/i386/linux64.h (LINK_SPEC): Remove bogus -Y option. + (STARTFILE_PREFIX_SPEC): Define for NATIVE_CROSS compilations. + (STARTFILE_SPEC): Remove hardcoded library paths. + (ENDFILE_SPEC): Likewise. + +2002-07-18 Jan Hubicka + + * gcse.c (hoist_expr_reaches_here_p): Stop once expr_bb is reached. + + * gcse.c (try_replace_reg): Do not return false positives. + +2002-07-18 Alan Modra + + * prefix.c: (update_path): Strip ".." components when prior dir + doesn't exist. Pass correct var to UPDATE_PATH_HOST_CANONICALIZE. + + * config/rs6000/sysv4.h (ASM_OUTPUT_REG_PUSH): Remove 64-bit support. + (ASM_OUTPUT_REG_POP): Likewise. + +2002-07-18 Alan Modra + + * config/rs6000/rs6000.c (first_reg_to_save): Remove bogus + adjustments to first_reg for profiling case. + (output_function_profiler): Correct lr save slot for ABI_AIX_NODESC. + Disable profiling for 64 bit code on both ABI_V4 and ABI_AIX_NODESC. + Save static chain reg to sp + 12 on ABI_AIX_NODESC. + * config/rs6000/sysv4.h (ASM_OUTPUT_REG_PUSH): Define. + (ASM_OUTPUT_REG_POP): Define. + * config/rs6000/linux64.h (ASM_OUTPUT_REG_PUSH): Undef. + (ASM_OUTPUT_REG_POP): Undef. + +2002-07-17 Neil Booth + + * cpplib.c (do_sccs): Handle #sccs on all systems. + * system.h (SCCS_DIRECTIVE): Poison. + * config/darwin.h, config/freebsd.h, config/netbsd.h, + config/ptx4.h, config/svr3.h, config/svr4.h, config/alpha/elf.h, + config/arm/linux-elf.h, config/c4x/c4x.h, config/d30v/d30v.h, + config/i370/i370.h, config/i386/gas.h, config/i386/sco5.h, + config/i960/i960.h, config/m68hc11/m68hc11.h, config/m68k/3b1.h, + config/m68k/3b1g.h, config/m68k/crds.h, config/m68k/mot3300.h, + config/m68k/pbb.h, config/m88k/m88k.h, config/mips/mips.h, + config/sparc/pbd.h, config/stormy16/stormy16.h, config/vax/vaxv.h: + Remove all references to SCCS_DIRECTIVE. + * doc/cpp.texi, doc/tm.texi: Update. + +2002-07-17 J"orn Rennecke + + * regrename.c (maybe_mode_change): New function. + (find_oldest_value_reg, copyprop_hardreg_forward_1): Use it. + +2002-07-17 Rodney Brown + + * config/i386/i386.c (ix86_expand_int_movcc): In the general case + suppress addition when either ct or cf are zero. + +2002-07-17 Eric Botcazou + Glen Nakamura + + PR optimization/6713 + * loop.c (loop_givs_rescan): Explicitly delete the insn that + sets a non-replaceable giv after issuing the new one. + +2002-07-17 Neil Booth + + * cppexp.c (cpp_interpret_integer, append_digit, parse_defined, + eval_token): Clarify and correct use of "bool" variables. + * cpplib.h (struct cpp_options): Similarly. + * cppmacro.c (parse_params, _cpp_save_parameter): Ditto. + * cpptrad.c (recursive_macro): Similarly. + +2002-07-17 J"orn Rennecke + + * config/sh/lib1funcs.asm (udivsi3_i4): Implement SHcompact version in + SHmedia code. + + * sh.md (cmpgtudi_media): Remove spurious @. + + * config/sh/lib1funcs.asm (FMOVD_WORKS): Don't define for little endian. + * sh.h (OVERRIDE_OPTIONS): Don't set FMOVD_BIT for little endian. + + * config/sh/lib1funcs.asm (init_trampoline): New entry point. + * sh-protos.h (sh_initialize_trampoline): Declare. + * sh.c (sh_initialize_trampoline): New function. + * sh.h (TRAMPOLINE_SIZE): Only 24 for TARGET_SHMEDIA32. + (TRAMPOLINE_ALIGNMENT): Need cache-line alignment for TARGET_SHMEDIA. + (INITIALIZE_TRAMPOLINE): Call sh_initialize_trampoline. + (TRAMPOLINE_ADJUST_ADDRESS): Not needed for SHcompact. + * sh.md (initialize_trampoline, double_shori): New patterns. + (initialize_trampoline_compact): Likewise. + (shmedia32_initialize_trampoline_big): Remove. + (shmedia32_initialize_trampoline_little): Likewise. + + * sh-protos.h (binary_float_operator): Remove declaration. + (sh_expand_unop_v2sf, sh_expand_binop_v2sf): Declare. + * sh.c (print_operand, case 'N'): Check against CONST0_RTX. + (unary_float_operator, sh_expand_unop_v2sf): New functions. + (sh_expand_binop_v2sf): Likewise. + (zero_vec_operand): Delete. + (SH_BLTIN_UDI): New builtin shared signature define. Renumbered + all non-shared ones. + (bdesc): Change all the mextr builtins to use SH_BLTIN_UDI. + Enable nsb and byterev. + * sh.h (CONDITIONAL_REGISTER_USAGE): Initialize DF_HI_REGS. + (HARD_REGNO_MODE_OK): Allow TImode in fp regs. Allow V2SFmode + in general regs. + (enum reg_class, REG_CLASS_NAMES, REG_CLASS_CONTENTS): Add DF_HI_REGS. + (SECONDARY_OUTPUT_RELOAD_CLASS): Likewise. Remove clause for + immediate operands. + (SECONDARY_INPUT_RELOAD_CLASS): Add clause for immediate operands. + Add DF_HI_REGS. + (CLASS_CANNOT_CHANGE_MODE, CLASS_CANNOT_CHANGE_MODE_P): Allow + lowpart fp regs - only for big endian for now. + (LEGITIMATE_CONSTANT_P): Don't allow nonzero float vectors + when FPU is in use. + (EXTRA_CONTRAINT_U): Check against CONST0_RTX. + (LOAD_EXTEND_OP): NIL for SImode. + (REGISTER_MOVE_COST): Add DF_HI_REGS. Const for moves between + general and fp registers is 4. + PREDICATE_CODES: Amend binary_float_operator entry. + Remove zero_vec_operand. Add unary_float_operator. + * sh.md (udivsi3_i4_media): Use truncate instead of paradoxical + subreg SET_DEST. + (truncdisi2, truncdihi2, movv2sf): Allow memory destinations. + (truncdiqi2): Do sign extension. + (movsi_media, movdi_media): Allow to use r63 to an fp register. + (movdf_media, movsf_media): Likewise. + (movv2sf_i, movv2sf_i+1): Don't use f{ld,st}.p or SUBREGS. + Collapse to one define_insn_and_split. Allow immediate sources. + (addv2sf3, subv2sf3, mulv2sf3, divv2sf3): New patterns. + (movv4sf_i): Allow immediate sources. Use simplify_gen_subreg. + (movv4sf): Allow immediate sources. + (movsf_media_nofpu+1): Don't split moves to FP registers. + (unary_sf_op, binary_sf_op, mshflo_w_x, concat_v2sf): New patterns. + (movv8qi_i+3): Check against CONST0_RTX. + (mextr1, mextr2. mextr3. mextr4, mextr5, mextr6, mextr7): Use DImode + for input and output operands. Fix argument 3 to gen_mextr_rl. + (mmul23_wl, mmul01_wl, mmulsum_wq_i): s/const_vector/parallel/ + (msad_ubq_i, mshf4_b, mshf0_b, mshf4_l, mshf0_l, mshf4_w): Likewise. + (mshf0_w, fipr, ftrv): Likewise. + (mshfhi_l_di): Now insn_and_split. Can handle FP regs. + +2002-07-17 Jeroen Dobbelaere + + * arm.h (ARM_NUM_INTS, ARM_NUM_REGS, ARM_NUM_REGS2): Renamed from + NUM_INTS, NUM_REGS and ARM_NUM_REGS2 respectively. All uses changed. + * arm.c: Similarly. + +2002-07-17 Richard Sandiford + + * config/mips/mips-protos.h (mips_sign_extend): Declare. + * config/mips/mips.h (MASK_DEBUG_H, TARGET_DEBUG_H_MODE): Remove. + (TARGET_SWITCHES): Remove debugh. + (ISA_HAS_TRUNC_W): New macro. + (CLASS_CANNOT_CHANGE_MODE): Include FP_REGS if TARGET_FLOAT64. + (PREDICATE_CODES): Remove se_nonimmediate_operand. + * config/mips/mips.c (movdi_operand): Allow sign-extensions of + any SImode move_operand. + (se_nonimmediate_operand): Remove. + (mips_sign_extend): New. + (mips_move_2words): Use it for sign-extended source operands. + (override_options): Allow integers to be put into single FPRs. + (mips_secondary_reload_class): Handle integers in float registers. + * config/mips/mips.md (extendsidi2): Turn into a define_expand. + (fix_truncsfsi2, fix_truncdfsi2): Likewise. + (fix_truncdfsi2_insn, fix_truncdfsi2_macro): New. + (fix_truncsfsi2_insn, fix_truncsfsi2_macro): New. + (fix_truncdfdi2): Provide only a single alternative, in which the + integer is in a float register. Depend on TARGET_FLOAT64 rather + than TARGET_64BIT. + (fix_truncsfdi2, floatdidf2, floatdisf2): Likewise. + (floatsidf2, floatsisf2): Likewise, but no TARGET_FLOAT64 dependency. + (movdi_internal2): Don't allow the source operand to be sign-extended. + Add alternatives for float registers. + (*movdi_internal2_extend): New. Version of movdi_internal2 that + allows sign-extension. + (*movdi_internal2_mips16): Name the existing mips16 movdi pattern. + (movsi_internal2): Rename to movsi_internal. Add alternatives for + float registers. Remove TARGET_DEBUG_H_MODE test. + (movhi_internal1): Rename to movhi_internal. Don't check + TARGET_DEBUG_H_MODE. Fix transposed *d and *f source constraints. + (movqi_internal1): Rename to movqi_internal and remove + TARGET_DEBUG_H_MODE dependency. + (movsi_internal1, movhi_internal2, movqi_internal2): Remove. + +2002-07-16 Jim Wilson + + * toplev.c (lang_dependent_init): Create function context for + init_expr_once. + 2002-07-16 Hans-Peter Nilsson * config/cris/linux.h (CRIS_LINK_SUBTARGET_SPEC): Don't --gc-sections if -r. + * config/cris/cris.h: Ditto. + +2002-07-16 Rodney Brown + + * config/i386/i386.c (ix86_expand_int_movcc): In the case where + the comparison directly gives a mask suppress addition when cf is + zero by complementing the mask. + +2002-07-16 Nathanael Nerode + + * Makefile.in: Delete references to enquire. + * enquire.c: Move to contrib. + +2002-07-16 Stan Shebs + + * config/darwin.h (ASM_OUTPUT_LABEL): Move to here from + config/rs6000/darwin.h. + (ASM_OUTPUT_SKIP): Ditto. + (TEXT_SECTION_ASM_OP): Ditto. + (DATA_SECTION_ASM_OP): Ditto. + (ASM_APP_ON): Define. + (ASM_APP_OFF): Define. + * config/rs6000/darwin.h (ASM_OUTPUT_LABEL, ASM_OUTPUT_SKIP, + TEXT_SECTION_ASM_OP, DATA_SECTION_ASM_OP): Remove. + + * config/darwin.c (func_name_maybe_scoped): Remove unused decl. + (machopic_function_base_name): Declare result to be const. + (machopic_non_lazy_ptr_name): Ditto. + (machopic_stub_name): Ditto. + * config/darwin-protos.h: Ditto for the prototypes. + +2002-07-17 Jan Hubicka + + * m68hc11.c (m68hc11_reorg): Do not rebuild CFG. + +2002-07-17 Jan Hubicka + + * i386.md (prefetch): Fix for 64bit mode. + (prefetch_sse_rex, prefetch_3dnow_rex): New patterns. + +2002-07-17 Jan Hubicka + + * i386.h (MACHINE_DEPENDENT_REORG): New macro. + * i386.c (x86_machine_dependent_reorg): New function. + * i386-protos.h (x86_machine_dependent_reorg): Declare. + +2002-07-16 Zack Weinberg + + * builtins.c (std_expand_builtin_va_start): Remove unused + first argument. + (expand_builtin_va_start): Call EXPAND_BUILTIN_VA_START and + std_expand_builtin_va_start with just two arguments. + * expr.h: Update prototypes. + + * alpha-protos.h, alpha.h, alpha.c, arc-protos.h, arc.h, + arc.c, d30v-protos.h, d30v.h, d30v.c, i386-protos.h, i386.h, + i386.c, i960-protos.h, i960.h, i960.c, m88k-protos.h, m88k.h, + m88k.c, mips-protos.h, mips.h, mips.c, mn10300-protos.h, + mn10300.h, mn10300.c, pa-protos.h, pa.h, pa.c, + rs6000-protos.h, rs6000.h, rs6000.c, s390-protos.h, s390.h, + s390.c, sh-protos.h, sh.h, sh.c, sparc-protos.h, sparc.h, + sparc.c, stormy16-protos.h, stormy16.h, stormy16.c, + xtensa-protos.h, xtensa.h, xtensa.c: Remove unused first + argument from all implementations of EXPAND_BUILTIN_VA_START + and all uses of std_expand_builtin_va_start. + +2002-07-16 J"orn Rennecke + + * regrename.c (copy_value): Don't record high part copies. + +2002-07-16 Steve Ellcey + + * gcc/config/pa/long_double.h (FIXUNS_TRUNCTFDI2_LIBCALL): New define. + (fixunstfdi_libfunc): Change to use FIXUNS_TRUNCTFDI2_LIBCALL. + * gcc/config/pa/quadlib.c (_U_Qfcnvfxt_quad_to_udbl): New function. + +2002-07-16 Ian Dall + + * doc/invoke.texi (NS32K Options): Document -mieee-compare option + + * config/ns32k/ns32k.md (addsi3, *frame_addr, *stack_addr): merge + into addsi3 using register class "x" and "y". + + * config/ns32k/ns32k.md (*madddf, *maddsf, *msubdf, *msubsf): + "earlyclobber" constraint modifier for some alternative. + + * config/ns32k/ns32k.md (tstdf, tstsf, cmpdf, cmpsf, blt, ble) + (*ble, *blt): Flag to indicate bCOND and sCOND should check for + unordered. + config/ns32k/ns32k.h (CC_UNORD): define corresponding mask. + + * config/ns32k/ns32k.h (TARGET_IEEE_COMPARE, MASK_IEEE_COMPARE) + (TARGET_SWITCHES): Add -mieee-compare option. + (OVERRIDE_OPTIONS): 32332 is a subset of + 32532. Don't use IEEE_COMPARE -funsafe-math-optimizations. + (TARGET_SWITCHES): Fix description of bit-field option. + * config/ns32k/netbsd.h (TARGET_DEFAULT): Add + -mieee-compare option. Remove 32332 flag. + +2002-07-16 Steve Ellcey + + * explow.c (convert_memory_address): Remove special handling + when POINTERS_EXTEND_UNSIGNED < 0. + * config/ia64.md (movsi_symbolic): New instruction for ILP32 mode. + (movedi_symbolic): Fix typo. + (load_fptr): Remove mode restriction so it works for SI and DI. + (load_fptr_internal1): Ditto. + (load_gprel): Ditto. + (load_symptr_internal1): Ditto. + (call_pic): Ditto. + * config/ia64.c (call_operand): Modify mode check. + (ia64_expand_load_address): Handle DI and SI addresses and symbols. + (ia64_expand_move): Ditto. + (ia64_assemble_integer): Handle SImode function pointers. + (ia64_expand_fetch_and_op): Handle SImode mem addresses. + (ia64_expand_op_and_fetch): Ditto. + (ia64_expand_compare_and_swap): Ditto. + (ia64_expand_lock_test_and_set): Ditto. + (ia64_expand_lock_release): Ditto. + +2002-07-16 Jeroen Dobbelaere + + * arm.c (emit_sfm): Don't set RTX_FRAME_RELATED_P on DWARF. + +2002-07-16 Jeroen Dobbelaere + Richard Earnshaw + + * arm.h (LEGITIMATE_PIC_OPERAND_P): Only test + CONSTANT_POOL_ADDRESS_P if a SYMBOL_REF. Simplify logic. + +2002-07-16 Richard Earnshaw + + * arm.md (stack_tie): New insn. Use an idiom that the alias code + understands to be a memory clobber. + * arm.c (arm_expand_prologue): Use it. + +2002-07-16 Daniel Berlin + + * ra-rewrite.c: #include reload.h, insn-config.h + * ra-build.c: #include reload.h + * Makefile.in: Update ra-rewrite.o, ra-build.o dependencies to + depend on reload.h, insn-config.h. + +2002-07-16 J"orn Rennecke + + * expr.c (emit_move_insn_1): Handle arbitrary moves that are + the same size as a word. + + * regrename.c (find_oldest_value_reg): Take WORDS_BIG_ENDIAN / + BYTES_BIG_ENDIAN into account. + +2002-07-16 Jan Hubicka + + * i386.md (prefetch): Fix for 64bit mode. + (prefetch_sse_rex, prefetch_3dnow_rex): New patterns. + + * i386.md (movss, movsd): Use xorps/xorpd for Athlon. + +2002-07-16 Marek Michalkiewicz + + * hard-reg-set.h (TEST_HARD_REG_BIT): Return 1 if the bit is set. + +2002-07-15 Zack Weinberg + + * ginclude/varargs.h: Replace with stub which issues #error. + * ginclude/stdarg.h: __builtin_stdarg_start is renamed + __builtin_va_start. + + * builtins.def (BUILT_IN_VARARGS_START): Delete. + (BUILT_IN_VA_START): New. + * builtins.c (expand_builtin_va_start): Eliminate first + argument and code to implement pre-ISO varargs. + (std_expand_builtin_va_start): Ignore first argument; it is + always 1. + (expand_builtin): Handle BUILT_IN_VA_START and + BUILT_IN_STDARG_START identically. Delete + BUILT_IN_VARARGS_START case. + + * function.c (assign_parms): Delete hide_last_arg and all + its uses. + (mark_varargs): Delete function. + * function.h (struct function): Delete 'varargs' bit. + (current_function_varargs): Delete macro. + * tree.h: Don't declare mark_varargs. + + * c-decl.c (c_function_varargs, c_mark_varargs): Delete. + (c_expand_body): Don't call mark_varargs. + * c-objc-common.c: Handle BUILT_IN_VA_START and + BUILT_IN_STDARG_START identically. Delete + BUILT_IN_VARARGS_START case. + * c-tree.h: Don't declare c_mark_varargs. + * c-parse.in: Remove grammar rules for '&...' (which has been + commented out since before 2.7.2) and for '...' in K+R + argument declarations. + + * builtins.c, function.c, integrate.c, sibcall.c, + config/alpha/unicosmk.h, config/arc/arc.c, config/arc/arc.h, + config/avr/avr.c, config/cris/cris.c, config/fr30/fr30.c, + config/i960/i960.c, config/i960/i960.md, config/m32r/m32r.c, + config/m32r/m32r.h, config/m88k/m88k.c, config/m88k/m88k.h, + config/mips/mips.c, config/mmix/mmix.c, config/mmix/mmix.h, + config/mn10300/mn10300.c, config/pa/som.h, config/s390/s390.c, + config/sh/sh.c, config/sh/sh.h, config/sparc/sparc.h, + config/stormy16/stormy16.c: Delete all references to + current_function_varargs, and code predicated on that flag. + + * config/alpha/alpha.c (alpha_va_start), + config/arc/arc.c (arc_va_start), + config/i386/i386.c (ix86_va_start), + config/mips/mips.c (mips_va_start), + config/mn10300/mn10300.c (mn10300_va_start), + config/rs6000/rs6000.c (rs6000_va_start), + config/s390/s390.c (s390_va_start), + config/sh/sh.c (sh_va_start), + Ignore first argument; it is always 1. + + * config/c4x/c4x-protos.h, config/c4x/c4x.c: Delete c4x_va_start. + * config/ia64/ia64-protos.h, config/ia64/ia64.c: Delete ia64_va_start. + * config/m68hc11/m68hc11-protos.h, config/m68hc11/m68hc11.c: + Delete m68hc11_va_start. + * config/c4x/c4x.h, config/ia64/ia64.h, config/m68hc11/m68hc11.h: + No need to define EXPAND_BUILTIN_VA_START. + + * doc/invoke.texi, doc/sourcebuild.texi, doc/tm.texi, + doc/trouble.texi: Remove references to GCC-provided . 2002-07-15 Eric Botcazou @@ -1661,13 +15682,98 @@ Thu Sep 5 00:34:33 2002 J"orn Rennecke * config/sparc/netbsd-elf.h (TRANSFER_FROM_TRAMPOLINE): Remove. -2002-07-15 John David Anglin +2002-07-15 Michael Matz , + Daniel Berlin , + Denis Chertykov - * 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. + Add a new register allocator. + + * ra.c: New file. + * ra.h: New file. + * ra-build.c: New file. + * ra-colorize.c: New file. + * ra-debug.c: New file. + * ra-rewrite.c: New file. + + * Makefile.in (ra.o, ra-build.o, ra-colorize.o, ra-debug.o, + (ra-rewrite.o): New .o files for libbackend.a. + (GTFILES): Add basic-block.h. + + * toplev.c (flag_new_regalloc): New. + (f_options): New option "new-ra". + (rest_of_compilation): Call initialize_uninitialized_subregs() + only for the old allocator. If flag_new_regalloc is set, call + new allocator, instead of local_alloc(), global_alloc() and + friends. + + * doc/invoke.texi: Document -fnew-ra. + * basic-block.h (FOR_ALL_BB): New. + * config/rs6000/rs6000.c (print_operand): Write small constants + as @l+80. + + * df.c (read_modify_subreg_p): Narrow down cases for a rmw subreg. + (df_reg_table_realloc): Make size at least as large as max_reg_num(). + (df_insn_table_realloc): Size argument now is absolute, not relative. + Changed all callers. + + * gengtype.c (main): Add the pseudo-type "HARD_REG_SET". + * regclass.c (reg_scan_mark_refs): Ignore NULL rtx's. + + 2002-06-20 Michael Matz + + * df.h (struct ref.id): Make unsigned. + * df.c (df_bb_reg_def_chain_create): Remove unsigned cast. + + 2002-06-13 Michael Matz + + * df.h (DF_REF_MODE_CHANGE): New flag. + * df.c (df_def_record_1, df_uses_record): Set this flag for refs + involving subregs with invalid mode changes, when + CLASS_CANNOT_CHANGE_MODE is defined. + + 2002-05-07 Michael Matz + + * reload1.c (fixup_abnormal_edges): Don't insert on NULL edge. + + 2002-05-03 Michael Matz + + * sbitmap.c (sbitmap_difference): Accept sbitmaps of different size. + + Sat Feb 2 18:58:07 2002 Denis Chertykov + + * regclass.c (regclass): Work with all regs which have sets or + refs. + (reg_scan_mark_refs): Count regs inside (clobber ...). + + 2002-01-04 Michael Matz + + * df.c (df_ref_record): Correctly calculate SUBREGs of hardregs. + (df_bb_reg_def_chain_create, df_bb_reg_use_chain_create): Only + add new refs. + (df_bb_refs_update): Don't clear insns_modified here, ... + (df_analyse): ... but here. + + * sbitmap.c (dump_sbitmap_file): New. + (debug_sbitmap): Use it. + + * sbitmap.h (dump_sbitmap_file): Add prototype. + + 2001-08-07 Daniel Berlin + + * df.c (df_insn_modify): Grow the UID table if necessary, rather + than assume all emits go through df_insns_modify. + + 2001-07-26 Daniel Berlin + + * regclass.c (reg_scan_mark_refs): When we increase REG_N_SETS, + increase REG_N_REFS (like flow does), so that regclass doesn't + think a reg is useless, and thus, not calculate a class, when it + really should have. + + 2001-01-28 Daniel Berlin + + * sbitmap.h (EXECUTE_IF_SET_IN_SBITMAP_REV): New macro, needed for + dataflow analysis. 2002-07-15 Jakub Jelinek @@ -1678,11 +15784,7 @@ Thu Sep 5 00:34:33 2002 J"orn Rennecke ashlqi3_cmp, ashrsi3_cmp, ashrsi3_cmp_zext, ashrhi3_cmp, ashrqi3_cmp, lshrsi3_cmp, lshrsi3_cmp_zext, lshrhi3_cmp, lshrqi3_cmp): Use it. -2002-06-11 Andreas Schwab - - * config/m68k/m68k.h (PREDICATE_CODES): Define. - -2002-07-15 Alan Modra +2002-07-14 Alan Modra PR target/7282 * config/rs6000/rs6000.md (floatsidf2): Enable for POWERPC64. @@ -1690,6 +15792,21 @@ Thu Sep 5 00:34:33 2002 J"orn Rennecke (floatsidf_ppc64): New insn_and_split. (floatunssidf_ppc64): Likewise. +2002-07-14 Andreas Jaeger + + * config.gcc (sh64): Remove unused + target_requires_64bit_host_wide_int. + +2002-07-12 Roger Sayle + + * expr.c [CLEAR_RATIO]: New macro defining the maximum number + of move instructions to use when clearing memory, c.f. MOVE_RATIO. + [CLEAR_BY_PIECES]: New macro, using CLEAR_RATIO, to determine + whether clear_by_pieces should be used to clear storage. + (clear_storage): Use CLEAR_BY_PIECES instead of MOVE_BY_PIECES. + + * doc/tm.texi: Document these two new target macros. + 2002-07-12 Stephane Carrez * config/m68hc11/m68hc11.md ("zero_extendsidi2"): Use D_REG only for @@ -1702,16 +15819,492 @@ Thu Sep 5 00:34:33 2002 J"orn Rennecke * config/avr/avr.c (test_hard_reg_class): Fix TEST_HARD_REG_BIT usage on 64-bit hosts, return value was truncated to 32 bits. +2002-07-12 J"orn Rennecke + + * simplify-rtx.c (simplify_subreg): Handle floating point + CONST_DOUBLEs. When an integer subreg of a smaller mode than + the element mode is requested, compute a subreg with an + integer mode of the same size as the element mode first. + +2002-07-11 J"orn Rennecke + + * combine.c (try_combine): When converting a paradoxical subreg + to an extension, take LOAD_EXTEND_OP into account. + +2002-07-11 Rainer Orth + + * config.gcc (mips-sgi-irix6*o32): New configuration. + + * configure.in (libgcc_visibility): Disable for mips-sgi-irix6*o32 + configurations. + * configure: Regenerate. + + * config/mips/iris6-o32-as.h: New file. + * config/mips/iris6-o32.h: New file. + + * config/mips/iris5gas.h (TARGET_ASM_NAMED_SECTION): Define. + (NM_FLAGS): Define. + (HAVE_AS_SHF_MERGE): Undefine. + + * config/mips/t-iris5-as: New file. + * config.gcc (mips-sgi-irix6*o32, mips-sgi-irix5*): Use it. + + * config/mips/t-iris6 (SHLIB_EXT, SHLIB_SOLINK, SHLIB_SONAME, + SHLIB_NAME, SHLIB_MAP, SHLIB_OBJS, SHLIB_SLIBDIR_QUAL, SHLIB_LINK, + SHLIB_INSTALL, SHLIB_MKMAP, SHLIB_MAPFILES, FPBIT, DPBIT, + dp-bit.c, fp-bit.c): Move ... + * config/mips/t-iris5-6: ... here. + New file, shared by IRIX 5 and IRIX 6. + * config.gcc (mips-sgi-irix6*o32, mips-sgi-irix6*, + mips-sgi-irix5*): Use it. + + * config/mips/iris6.h: Remove duplicate comment. + + * config/mips/mips.c (TARGET_ASM_UNALIGNED_DI_OP) [TARGET_IRIX5 && + !TARGET_IRIX6]: Define. + (mips_asm_file_start): Don't emit mdebug. sections on IRIX 5/6. + + * config/mips/mips.h (ASM_DECLARE_FUNCTION_NAME): Fix comment. + 2002-07-11 John David Anglin - * pa.md (adddi3): Change predicate of operand 2 to adddi3_operand. - Remove comment. Change predicate of 32-bit adddi3 insn pattern to - arith11_operand. + * pa.md (adddi3): Change predicate of operand 2 to adddi3_operand + and delete code to force constant to register. * pa-protos.h (adddi3_operand): Add prototype. + * pa.c (adddi3_operand): New function. + +2002-07-11 Roger Sayle + + * c-decl.c (duplicate_decls): Preserve the noreturn attribute on + non-ANSI builtin functions. + +2002-07-11 J"orn Rennecke + + * rtl.h (gen_rtx_CONST_VECTOR): Declare. + * gengenrtl.c (special_rtx): Check for CONST_VECTOR. + * emit-rtl.c (gen_rtx_CONST_VECTOR): New function. + (gen_const_vector_0): Use it. + +2002-07-11 John David Anglin + + * pa.md (adddi3): For 32-bit targets, force constants to a register + if they don't fit in an 11-bit immediate. Change insn predicate to + arith11_operand. Remove comment. * pa.c (cint_ok_for_move): Fix comment. - (adddi3_operand): New function. - (emit_move_sequence): Don't directly split DImode constants on - 32-bit targets. + (emit_move_sequence): Don't directly split DImode constants on 32-bit + targets. + +2002-07-11 Tim Josling + + Remove front end hard coding from gengtype.c. + + * Makefile.in + (STAGESTUFF): add gtyp-gen.h + (GTFILES): Remove front end specific files. + (GTFILES_FILES_LANGS): New, from configure.. + (GTFILES_FILES_FILES): Likewise. + (GTFILES_LANG_DIR_NAMES): Likewise. + (GTFILES_SRCDIR): Likewise. + (gtyp-gen.h): Build from configure information. + (s-gtype): Remove command line parameters from gengtype. + (gengtype.o): Remove dependency on GTFILES. Depend on gtyp-gen.h. + (mostlyclean): Delete files generated by and for gengtype. + + * c-config-lang.in: New file. + + * configure.in (all_gtfiles_files_langs): New. Accumulate files + for each language. + (all_gtfiles_files_files): New. Accumulate language for each file + accumulated. + (gtfiles): Pick up value for C. + (srcdir): AC-SUBST this variable. + (all_gtfiles_files_langs): AC-SUBST this variable. + (all_gtfiles_files_files): AC-SUBST this variable. + + * configure: Regenerate. + + * gengtype-lex.l (parse_file): Make parameter const. + + * gengtype.c (toplevel): include gtyp-gen.h. + (BASE_FILE_ unnamed enum): Delete. + (lang_names): Delete (replaced by gtyp-gen.h) + (lang_dir_names): From gtyp-gen.h, replaces lang_names; changed + all references. + (NUM_GT_FILES): New. + (NUM_LANG_FILES): New. + (srcdir_len): New. + (NUM_BASE_FILES): Change calculation. + (open_base_files): Change prototype to avoid warning. + (startswith): Delete. + (get_file_basename): Iterate through generated language list not + hard coded list. + (get_base_file_bitmap): Use generated list of files and languages. + (close_output_files): Add prototype to rmove warning. + (main): Iterate through list of generated files from gtyp-gen.h + rather than command line paramaters. Ignore duplicated file + names. + + * gengtype.h (parse_file): Amend prototype for const parameter. + + * doc/sourcebuild.texi: Document gtfiles variable. + + * doc/gty.texi: Document changes to gtfiles variable for front + ends. + + * objc/config-lang.in (gtfiles): Add files needed for objc front + end. + +2002-07-10 Roger Sayle + + PR c/2454 + * combine.c (nonzero_bits): LOAD_EXTEND_OP should only apply + to SUBREGs of MEMs. (num_sign_bit_copies): Likewise. + +2002-07-10 Roger Sayle + Zack Weinberg + + * builtins.def: Make the argument types of abort and exit + independent of the front-end. + +2002-07-11 Alan Modra + + * config/rs6000/linux64.h (ASM_SPEC): Define. + +2002-07-10 Aldy Hernandez + + * config/rs6000/rs6000.c (emit_frame_save): New. + (rs6000_frame_related): Replace reg2 before reg. + (rs6000_emit_prologue): Use emit_frame_save for saving gprs, fprs, + and eh_return registers. + +2002-07-10 Toon Moene + + Revert all patches for optimization of Complex .op. Real. + * complex_part_zero_p: Remove + * expand_cmplxdiv_straight: Replace complex_part_zero_p(x) + with x. + * expand_cmplxdiv_wide: Ditto. + * expand_binop: Ditto. + +2002-07-10 Marek Michalkiewicz + + * config/avr/avr.md: Fix two 0x80000000 constants to make them + negative also on 64-bit hosts. + + Default to -fno-reorder-blocks when optimizing for size. + * config/avr/avr-protos.h (avr_optimization_options): Declare. + * config/avr/avr.c (avr_optimization_options): New function. + * config/avr/avr.h (OPTIMIZATION_OPTIONS): New. + + Optimize returning from simple functions. + * config/avr/avr-protos.h (avr_simple_epilogue): Declare. + * config/avr/avr.c (avr_simple_epilogue): New function. + * config/avr/avr.md (return): New insn. + +2002-07-10 Douglas B Rupp + + * config/i386/i386.c (ix86_svr3_asm_out_constructor): Add + HAS_INIT_SECTION to protection. + +2002-07-10 Mark Mitchell + + * doc/invoke.texi (Debugging Options): Mention that -gdwarf is + deprecated. + +2002-07-10 J"orn Rennecke + + * combine.c (gen_lowpart_for_combine): Handle vector modes. + Supply non-VOID mode to simplify_gen_subreg. + +2002-07-10 Jan Hubicka + + * i386.c (ix86_init_mmx_sse_builtins): Fix thinko. + +2002-07-10 Jeffrey A Law + + * mn10200.c (expand_prologue): Create REG_MAYBE_DEAD notes + as appropriate. + + * mn10200.c (expand_epilogue): Fix test to determine which scratch + register to use. + +2002-07-10 J"orn Rennecke + + * cse.c (cse_insn): Supply proper SUBREG_BYTE to simplify_gen_subreg. + Get mode from dest. + If simplify_gen_subreg fails, try next equivalent. + +2002-07-09 Gabriel Dos Reis + + * diagnostic.h: #include location.h + (location_t): Move definition to.. + * location.h: ... here. New file. + * tree.h: #include location.h + (DECL_SOURCE_LOCATION): New macro. + (DECL_SOURCE_FILE): Use. + (DECL_SOURCE_LINE): Likewise. + (struct tree_decl): REplace filename and linenum with locus. + * Makefile.in (TREE_H): add location.h + (diagnostic.o): Depends on gt-location.h + (gt-location.h): Depends on s-gtype + +2002-07-09 Matt Kraai + + * config/rs6000/aix.h: Convert CPP_PREDEFINES to + TARGET_OS_CPP_BUILTINS. + * config/rs6000/aix31.h: Likewise. + * config/rs6000/aix41.h: Likewise. + * config/rs6000/aix43.h: Likewise. + * config/rs6000/aix51.h: Likewise. + * config/rs6000/beos.h: Likewise. + * config/rs6000/darwin.h: Likewise. + * config/rs6000/eabi.h: Likewise. + * config/rs6000/eabisim.h: Likewise. + * config/rs6000/linux.h: Likewise. + * config/rs6000/linux64.h: Likewise. + * config/rs6000/lynx.h: Likewise. + * config/rs6000/mach.h: Likewise. + * config/rs6000/rtems.h: Likewise. + * config/rs6000/sysv4.h: Likewise. + * config/rs6000/vxppc.h: Likewise. + +2002-07-09 Devang Patel + * objc/objc-act.c (adjust_type_for_id_default): Fix my previous patch. + Do not allow ObjC objects as a parameter type for Objective-C methods. + My previous patch restricted 'struct' also. + +2002-07-09 Neil Booth + + * cpperror.c (cpp_error): Default to directive_line within + directives here. + * cppexp.c (cpp_interpret_integer): Only use traditional + number semantics in directives. + * cpplib.c (prepare_directive_trad): Don't reset pfile->line. + (do_include_common): Similarly. + * cpptrad.c (scan_out_logical_line): Implement accurate + quoting of <> in #include. + * doc/cpp.texi: Update. + +2002-07-09 Stephen Clarke + J"orn Rennecke + + * sh.c (sh_adjust_cost): Special handling of SHMEDIA code. + * sh.md (attribute issues): Replace with: + (attribute pipe_model). All users changed. + (attribute type): Change pt / ptabs to pt_media / ptabs_media. + All users changed. + (function units sh5issue, sh5fds): New. + (attribute is_mac_media): New. + (adddi3_media, subdi3_media, divsi3_i1_media, anddi3): Add type. + (andcdi3, iordi3, xordi3, ashldi3_media, lshrdi3_media): Likewise. + (ashrdi3_media, negdi_media, extendsidi2, movqi_media): Likewise. + (movhi_media, shori_media, movv2sf_i, jump_media): Likewise. + (call_media, call_value_media, sibcall_media): Likewise. + (casesi_jump_media, casesi_shift_media, casesi_load_media): Likewise. + (return_media_i, addsf3_media, subsf3_media, mulsf3_media): Likewise. + (mac_media, divsf3_media, floatdisf2, floatsisf2_media): Likewise. + (fix_truncsfdi2, fix_truncsfsi2_media, cmpeqsf_media): Likewise. + (cmpgtsf_media, cmpgesf_media, cmpunsf_media, negsf2_media): Likewise. + (sqrtsf2_media, abssf2_media, adddf3_media, subdf3_media): Likewise. + (muldf3_media, divdf3_media, floatdidf2, floatsidf2_media): Likewise. + (fix_truncdfdi2, fix_truncdfsi2_media, cmpeqdf_media): Likewise. + (cmpgtdf_media, cmpgedf_media,cmpundf_media, negdf2_media): Likewise. + (sqrtdf2_media, absdf2_media, extendsfdf2_media): Likewise. + (truncdfsf2_media): Likewise. + (movsi_media, movsi_media_nofpu, movdi_media): Use new types. + (movdi_media_nofpui, movdf_media, movdf_media_nofpu): Likewise. + +2002-07-09 J"orn Rennecke + + * sh.h (PREDICATE_CODES): Add general_extend_operand and inqhi_operand. + * sh.c (general_extend_operand, inqhi_operand): New functions. + * sh.md (cmpeqdi_media, cmpgtdi_media, cmpgtudi_media): Collapse + alternatives using 'N' modifier. Add type. + (adddi3z_media): Likewise. Enable generator function generation. + (movdicc_false, movdicc_true, addsi3_media, subsi3_media): Use more + exact predicates / constraints. Add type. + (subsi3): Allow 0 for SHMEDIA. + (udivsi3_i4_media): Use match_operand for input values + rather than hard registers. + (udivsi3 - TARGET_SHMEDIA_FPU case): Don't ferry values + unnecessarily through hard registers. Keep copies of pseudo + registers outside of the libcall sequence. + (mulsidi3_media, umulsidi3_media): Use more exact predicates. Add type. + (ashlsi3_media, ashrsi3_media, lshrsi3_media): Likewise. + (zero_extendsidi2, zero_extendhidi2, zero_extendqidi2): Likewise. + (extendhidi2, extendqidi2): Likewise. + (andsi3_compact): Name. + (andcdi3): Enable generator function generation. + (zero_extendhisi2, zero_extendqisi2): Rename to + (zero_extendhisi2_compact, zero_extendqisi2_compact). + (extendhisi2, extendqisi2): Rename to + (extendhisi2_compact, extendqisi2_compact). + (rotldi3, rotldi3_mextr, rotrdi3, rotrdi3_mextr): New patterns. + (loaddi_trunc, zero_extendhisi2, zero_extendhisi2_media): Likewise. + (zero_extendhisi2_media+1, zero_extendqisi2): Likewise. + (zero_extendqisi2_media, extendhisi2, extendhisi2_media): Likewise. + (extendhisi2_media, extendhisi2_media+1, extendqisi2): Likewise. + (extendqisi2_media, extendqisi2_media+1, truncdisi2): Likewise. + (truncdihi2, truncdiqi2, reload_inqi, reload_inhi): Likewise. + (shmedia32_initialize_trampoline_big): Likewise. + (shmedia32_initialize_trampoline_little): Likewise. + (nsb, nsbsi, nsbdi, ffsdi2, ffssi2, byterev): Likewise. + (negdi2): Remove spurious T clobber. + (zero_extendhidi2+1, extendhidi2+1, extendqidi2+1): Handle TRUNCATE. + (movsi_media, movsi_media_nofpu): Remove spurious *k after b. + (movdi_media, movdi_media_nofpu, pt, ptb): Likewise. + (movsi_media_nofpu+2, movhi_media+1): Only do split after reload. + (ic_invalidate_line_media): Write back data cache before invalidating + instruction cache. Add type. + (movsf_media): Sign-extend when the destination is a general + purpose register. Add type. + (bgt_media, bge_media, bgtu_media, bgeu_media, blt_media_i): Allow 0. + (casesi_worker_0+1): Only increment ref count for proper label. + (casesi_worker_0+2): Likewise. + +2002-07-09 Mark Mitchell + + * dwarfout.c (dwarfout_init): Warn that DWARF1 is deprecated. + +2002-07-09 Steve Ellcey + + * gcc/except.c (expand_eh_region_end_cleanup): Change exception pointer + from Pmode to ptr_mode. + (get_exception_pointer): Ditto. + (connect_post_landing_pads): Ditto. + (dw2_build_landing_pads): Ditto. + +2002-07-08 Steve Ellcey + * gcc/c-pragma.h (add_to_renaming_pragma_list): New function. + * gcc/c-pragma.c (add_to_renaming_pragma_list): New function. + (handle_pragma_redefine_extname): Change to use new function. + +2002-07-08 Roger Sayle + + * combine.c (combine_simplify_rtx): Add an explicit cast + to avoid signed/unsigned comparison warning. + (simplify_if_then_else): Likewise. + (extended_count): Likewise. + (simplify_shift_const): Likewise. + (simplify_comparison): Likewise. + +2002-07-08 Richard Sandiford + + * config/mips/mips.md: Add imadd type. Update scheduler description + to use imadd as well as imul. + (*mul_acc_si, *madsi): Change imul alternatives to imadd. + (*mul_acc_di, *mul_acc_64bit_di): Likewise. + (*mul_sub_si): Likewise for first alternative. Change second + alternative from imul to multi. + +2002-07-07 Neil Booth + + * c-common.c (c_common_post_options): Update prototype; + don't init backends if preprocessing only. + * langhooks-def.h (LANG_HOOKS_POST_OPTIONS): Update. + * langhooks.h (struct lang_hooks): Update post_options to + return a boolean. + * toplev.c (parse_options_and_default_flags, do_compile, + lang_independent_init): Update prototypes. Allow the + front end to specify that there is no need to initialize + the back end. + (general_init): Move call to hex_init here... + (toplev_main): ...from here. Pass flag for back end init + suppression. + +2002-07-07 J"orn Rennecke + + * sh.h (PRINT_OPERAND_PUNCT_VALID_P): Allow '\''. + (PREDICATE_CODES): Add entries for equality_comparison_operator, + greater_comparison_operator and less_comparison_operator. + * sh.c (print_operand): Add '\'' code. Make 'o' handle + more operators. + (equality_comparison_operator): New function. + (greater_comparison_operator, less_comparison_operator): Likewise. + * sh.md (beq_media_i): Disable generator function generation. + Use match_operator to handle a whole class of comparisons. Add + modifier in output template to provide branch prediction. Add type. + (bgt_media_i, ble_media_i): Likewise. Allow zero operands. + (bne_media_i, bge_media_i, bgtu_media_i, bgeu_media_i): Delete. + (blt_media_i, bleu_media_i, bltu_media_i): Likewise. + (bgt, blt, ble, bge, bgtu, bltu, bgeu, bleu): Allow zero operands. + +2002-07-07 Hans-Peter Nilsson + + Emit MMIX function prologue and epilogue as rtl. + * config/mmix/mmix.md ("call"): Use mmix_get_hard_reg_initial_val, + not unprototyped get_hard_reg_initial_val. + ("call_value", "nonlocal_goto_receiver"): Ditto. + ("return"): Make define_expand. Move real insn to... + ("*expanded_return"): New pattern. + ("prologue", "epilogue"): New define_expands. + * config/mmix/mmix.h (MMIX_rO_REGNUM): New macro. + (struct machine_function): New member in_prologue. + (FIRST_PSEUDO_REGISTER): Adjust for including rO as register. + (FIXED_REGISTERS, CALL_USED_REGISTERS): Ditto. + (MMIX_MMIXWARE_ABI_REG_ALLOC_ORDER): Ditto. + (MMIX_GNU_ABI_REG_ALLOC_ORDER, REG_CLASS_CONTENTS): Ditto. + (REGISTER_NAMES, ADDITIONAL_REGISTER_NAMES): Ditto. + (LOCAL_REGNO): Define. Adjust comment. + * config/mmix/mmix.c (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): + Consider regs_ever_live[MMIX_rJ_REGNUM], not just + leaf_function_p. + (MMIX_OUTPUT_REGNO): Don't translate registers while outputting + the prologue. + (mmix_target_asm_function_prologue): Make static. Just mark that + the prologue is being emitted. Move guts to... + (mmix_expand_prologue): New function. Adjust for emitting + prologue as rtl. For sizes, use HOST_WIDE_INT only. + (mmix_target_asm_function_epilogue): Make static. Simply emit a + \n. Move guts to... + (mmix_expand_epilogue): New function. Adjust for emitting + epilogue as rtl. For sizes, use HOST_WIDE_INT only. + (mmix_target_asm_function_end_prologue): Mark that the prologue + has ended. + (TARGET_ASM_FUNCTION_END_PROLOGUE): Define. + (mmix_conditional_register_usage): Improve comments. + (mmix_local_regno): New function. + (mmix_emit_sp_add, mmix_get_hard_reg_initial_val): Ditto. + * config/mmix/mmix-protos.h (mmix_local_regno): Prototype. + (mmix_expand_prologue, mmix_expand_epilogue): Ditto. + (mmix_get_hard_reg_initial_val): Ditto. + +2002-07-06 Andreas Jaeger + + * toplev.c (set_fast_math_flags): Don't use ISO C style function + definitions. + * gengtype.c (open_base_files): Likewise. + (close_output_files): Likewise. + * tracer.c (find_best_predecessor): Likewise. + (find_best_successor): Likewise. + (ignore_bb_p): Likewise. + +2002-07-05 Roger Sayle + + PR c++/7099 + * builtin-attrs.def: Define new attribute lists for use in + builtins.def. + * builtins.def [DEF_BUILTIN]: Modify to take an additional + ATTRS argument, an enumerated value defined in builtin-attrs.def + that represents the attribute list for the builtins. Modify + all builtin functions to pass an appropriate attribute list. + Specify "abort", "exit", "_exit" and "_Exit" builtins here with + their required noreturn attributes. + * tree.h (enum_builtin_function): Ignore the additional parameter + to DEF_BUILTIN. + * builtins.c (built_in_names): Likewise. + * c-common.c: (builtin_function_2): Replace the "int noreturn_p" + argument with a tree representing the functions attribute list. + Pass this "attrs" argument to builtin_function. No longer handle + the noreturn_p processing manually. + (built_in_attributes): Move the definitions from builtin-attrs.def + before c_common_nodes_and_builtins. + (c_common_nodes_and_builtins): Handle the new ATTRS parameter in + DEF_BUILTIN, passing it to both builtin_function and the changed + builtin_function_2. + + * doc/extend.texi: Document __builtin_abort, __builtin_exit, + __builtin__exit and __builtin__Exit. 2002-07-05 Stephane Carrez @@ -1727,6 +16320,11 @@ Thu Sep 5 00:34:33 2002 J"orn Rennecke ("*ashrsi3"): Likewise. ("*lshrsi3"): Likewise. +2002-07-05 Vladimir Makarov + + * genautomata.c (output_max_insn_queue_index_def): Take latencies + into account. + 2002-07-05 Stephane Carrez * config/m68hc11/m68hc11.md (peephole2): New peephole2 to optimize @@ -1739,10 +16337,80 @@ Thu Sep 5 00:34:33 2002 J"orn Rennecke (output_bound_representation): Check SAVE_EXPR_RTL is not NULL before using it. -2002-07-03 Richard Henderson +2002-07-05 Rainer Orth - * config/i386/i386.md (prologue_get_pc): Issue pop here ... - * config/i386/i386.c (load_pic_register): ... not here. + * gcc/gcc.c (asm_debug): Move initialization ... + (init_spec): ... here. + +2002-07-05 Nathan Sidwell + + * c-parse.in (extdef): Append ';'. + (old_style_parm_decls): Append ';'. + +2002-07-04 Daniel Jacobowitz + + * configure.in: Correct typos: gcc_cv_as_gdwarf2_debug_flag to + gcc_cv_as_gdwarf2_flag and gcc_cv_as_gstabs_debug_flag + to gcc_cv_as_gstabs_flag. + * configure: Rebuilt. + +2002-07-04 Geoffrey Keating + + * ggc.h (ggc_add_root): Document as obsolete. + +2002-07-04 J"orn Rennecke + + * sh.md (mshfhi_b, mshflo_b, mshfhi_l, mshflo_l, mshfhi_w): Add DONE. + (mshflo_w): Likewise. + +2002-07-04 J"orn Rennecke + + * simplify-rtx.c (simplify_subreg): Reduce problem of finding + vector mode subregs of constants to finding integer mode + subregs of constants. + * cse.c (cse_insn): Use simplify_gen_subreg. + * convert.c (convert_to_integer): Don't strip a NOP_EXPR + From a vector mode expression of different size than the + target mode. + +2002-07-03 Eric Christopher + + * config/mips/linux.h: Add #undef for SUBTARGET_CPP_SPEC. + * config/mips/mips.h: Remove deprecated -m options + and cc1_cpu_spec associated. + (CONSTANT_ADDRESS_P): Fix last patch. + (ASM_DECLARE_FUNCTION_NAME): Declare. Fix comment. + * config/mips/mips.md (bungt, bunge, sungt_df, sungt_sf, sunge_df, + sunge_sf): Remove. + +2002-07-03 Stan Shebs + + * config/darwin.h (APPLE_CC): Remove, not meaningful in FSF GCC. + (STRINGIFY_THIS, REALLY_STRINGIFY): Remove. + (CPP_SPEC): Remove insertion of APPLE_CC definition. + +2002-07-03 Roger Sayle + + * combine.c (struct_undo): Change types of recorded substitutions + to be either "int" or "rtx", instead of "unsigned int" and "rtx". + (do_SUBST_INT): Change types of the substitution from unsigned int + to int, to avoid compilation warning from SUBST_INT's only caller. + + (make_extraction): Add cast to avoid compilation warning. + (force_to_mode): Remove cast to avoid compilation warning. + +2002-07-03 Eric Botcazou + Jeff Law + + * i386.md (length_immediate attribute): Fix typo. + (length_address attribute): Likewise. + (modrm attribute): Set it to 0 for immediate call instructions. + (jcc_1 pattern): Set modrm attribute to 0. + (jcc_2 pattern ): Likewise. + (jump pattern): Likewise. + (doloop_end_internal pattern): Explicitly set length. + (leave pattern): Fix typo. + (leave_rex64 pattern): Likewise. 2002-07-03 David Edelsohn @@ -1755,10285 +16423,242 @@ Thu Sep 5 00:34:33 2002 J"orn Rennecke (floatsitf2, fix_trunctfsi2): SImode in GPR. (ctrdi): Remove FPR alternative and splitter. -2002-07-02 Hans-Peter Nilsson +2002-07-03 Will Cohen + + * config/i386/i386.c (x86_integer_DFmode_moves): Disable for PPro. + +2002-07-03 J"orn Rennecke + + * optabs.c (expand_vector_binop): Don't store using a SUBREG smaller + than UNITS_PER_WORD, unless this is little endian and the first unit + in this word. Let extract_bit_field decide how to load an element. + Force arguments to matching mode. + (expand_vector_unop): Likewise. + + * simplify-rtx.c (simplify_subreg): Don't assume that all vectors + consist of word_mode elements. + * c-typeck.c (build_binary_op): Allow vector types for BIT_AND_EXPR, + BIT_ANDTC_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR. + (build_unary_op): Allow vector types for BIT_NOT_EPR. + * emit-rtl.c (gen_lowpart_common): Use simplify_gen_subreg for + CONST_VECTOR. + * optabs.c (expand_vector_binop): Try to perform operation in + smaller vector modes with same inner size. Add handling of AND, IOR + and XOR. Reject expansion to inner-mode sized scalars when using + OPTAB_DIRECT. Use simplify_gen_subreg on constants. + (expand_vector_unop): Try to perform operation in smaller vector + modes with same inner size. Add handling of one's complement. + When there is no vector negate operation, try a vector subtract + operation. Use simplify_gen_subreg on constants. + * simplify-rtx.c (simplify_subreg): Add capability to convert vector + constants into smaller vectors with same inner mode, and to + integer CONST_DOUBLEs. + +2002-07-02 Kaveh R. Ghazi + + * c-parse.in (parsing_iso_function_signature): New variable. + (extdef_1): New, copied from... + (extdef): ... here. Reset parsing_iso_function_signature. + (old_style_parm_decls): Reset parsing_iso_function_signature. + (old_style_parm_decls_1): New, copied from old_style_parm_decls. + Warn about ISO C style function definitions. + (nested_function, notype_nested_function): Reset + parsing_iso_function_signature. + (parmlist_2): Set parsing_iso_function_signature. + + * doc/invoke.texi (-Wtraditional): Document new behavior. + +2002-07-02 Chris Demetriou + + * config.gcc (mips*el-*-*): Use tm_defines to set + TARGET_ENDIAN_DEFAULT, rather than including mips/little.h. + * config/mips/little.h: Remove. + +2002-07-02 Devang Patel + + * objc/objc-act.c (adjust_type_for_id_default): Do not allow an + object as parameter. Prevent something like 'NSObject' to be + used as the type for a method argument. + +2002-07-03 Neil Booth + + * cpptrad.c: Update comment. + +2002-07-02 Neil Booth + + * doc/cpp.texi: Update for traditional preprocessing changes. + * goc/cppopts.texi: Similarly. + +2002-07-02 Ziemowit Laski + + * c-parse.in (designator): Enable designated initializers if ObjC. + (objcmessageexpr): Remove references to objc_receiver_context. + * objc/objc-act.h (objc_receiver_context): Remove decl. + * objc/objc-act.c (objc_receiver_context): Remove. + (lookup_objc_ivar): Test objc_method_context instead of + objc_receiver_context. + +2002-07-02 J"orn Rennecke + + * sh.c (print_operand, case 'N'): Allow zero vector. + (arith_reg_or_0_operand): Likewise. + (zero_vec_operand): Check for CONST_VECTOR, not PARALLEL. + * sh.h (CONST_COSTS): 0 has 0 cost. Check OUTER_CODE for + IOR, XOR, PLUS and SET and take their respective constant + ranges into account. + (PREDICATE_CODES, arith_reg_or_0_operand): Can be CONST_VECTOR. + * sh.md (subdi3, subdi3_media): Allow zero operand. + (movv8qi_i+3): Only vector that is not split is the zero vector. + Fix operand 3 to simplify_subreg. + (movv2si_i): Split alternative 1. + (mshfhi_l_di_rev+1): New splitter. + +2002-07-02 Neil Booth + + PR preprocessor/7029 + * cppinit.c (cpp_handle_option): Suppress warnings with an + implicit "-w" for "-M" and "-MM". + * doc/cppopts.texi: Update. + +2002-07-01 Roger Sayle + + * config/sh/sh.c (sh_media_init_builtins): Change use of poisoned + identifier "bzero" to "memset". Pass extra NULL_TREE argument to + builtin_function. + +2002-07-02 Alan Modra + + * README.Portability: Fix typos. + +2002-07-01 Hans-Peter Nilsson PR target/7177 * config/cris/cris.h (LEGITIMIZE_RELOAD_ADDRESS): Correct number of indirections for register inside sign-extended mem part. +2002-07-01 Roger Sayle + + * tree.h: Modify builtin_function interface to take an extra + argument ATTRS, which is a tree representing an attribute list. + + * c-decl.c (builtin_function): Accept additional parameter. + * objc/objc-act.c (builtin_function): Likewise. + * f/com.c (builtin_function): Likewise. + * java/decl.c (builtin_function): Likewise. + * ada/utils.c (builtin_function): Likewise. + * cp/decl.c (builtin_function): Likewise. + (builtin_function_1): Likewise. + + * c-common.c (c_common_nodes_and_builtins): Pass an additional + NULL_TREE argument to builtin_function. (builtin_function_2): + Likewise. + * cp/call.c (build_java_interface_fn_ref): Likewise. + * objc/objc-act.c (synth_module_prologue): Likewise. + * java/decl.c (java_init_decl_processing): Likewise. + * f/com.c (ffe_com_init_0): Likewise. + + * config/alpha/alpha.c (alpha_init_builtins): Pass an additional + NULL_TREE argument to builtin_function. + * config/arm/arm.c (def_builtin): Likewise. + * config/c4x/c4x.c (c4x_init_builtins): Likewise. + * config/i386/i386.c (def_builtin): Likewise. + * config/ia64/ia64.c (def_builtin): Likewise. + * config/rs6000/rs6000.c (def_builtin): Likewise. + +2002-07-01 Zack Weinberg + + * config/ip2k/t-ip2k: Remove LIBGCC1, CROSS_LIBGCC1, and LIBGCC1_TEST. + * config/mips/t-isa3264: Likewise. + * config/mmix/t-mmix: Likewise. + 2002-07-01 John David Anglin * emit-rtl.c (init_emit_once): Add missing cast to HOST_WIDE_INT. -2002-06-30 David Edelsohn - - * config/rs6000/rs6000.md (ctrdi): Allocate pseudo for FPR - constraint in define_expand, not splitter. - -2002-06-28 Phil Edwards - - * configure.in (gcc_gxx_include_dir): Change to match versioned - C++ headers if --enable-version-specific-runtime-libs is used. - * configure: Regenerate. - -2002-06-28 Stephane Carrez - - * config/m68hc11/m68hc11.md ("*addsi3"): Use 'o' constraint to - avoid the auto increment addressing modes. - ("*subsi3"): Likewise. - (split for add/sub on address): For 68HC12 push the value on - the stack and do the operation with a pop. - -2002-06-28 Stephane Carrez - - * config/m68hc11/m68hc11.h (OPTIMIZATION_OPTIONS): Define. - * config/m68hc11/m68hc11-protos.h (m68hc11_optimization_options): - Declare. - * config/m68hc11/m68hc11.c (m68hc11_optimization_options): New, - do not reorder basic blocks at the end when optimizing for size. - -2002-06-28 Stephane Carrez - - * config/m68hc11/m68hc11.c (autoinc_mode): New function. - (m68hc11_make_autoinc_notes): New function. - (m68hc11_split_move): Be very cautious when spliting a move with - auto increment/decrement modes because this may result in incompatible - directions; add REG_INC notes to the resulting insn for CSE reg. - -2002-06-28 Stephane Carrez - - * config/m68hc11/m68hc11.c (register_indirect_p): For 68HC12 a constant - can be a valid address. - -2002-06-28 Bob Wilson - - * config/xtensa/xtensa-protos.h (xtensa_return_addr): Declare. - config/xtensa/xtensa.c (xtensa_return_addr): New function. - config/xtensa/xtensa.h (RETURN_ADDR_RTX): Use xtensa_return_addr. - config/xtensa/xtensa.md (fix_return_addr): New pattern. - -2002-06-28 Bob Wilson - - * config/xtensa/xtensa.h (FUNCTION_PROFILER): Respect flag_pic - when generating the call to _mcount. - (NO_PROFILE_COUNTERS): Define. - -2001-06-08 Bernd Schmidt - - * emit-rtl.c (gen_lowpart_common): Don't create paradoxical FLOAT_MODE - subregs. - * recog.c (general_operand, register_operand): Disallow them. - -2002-06-27 Bob Wilson - - * config/xtensa/xtensa.h (ASM_OUTPUT_POOL_PROLOGUE): Pass - flag_function_sections as new 3rd arg to resolve_unique_section. - -2002-06-27 Neil Booth - - PR preprocessor/7070 - * c-lex.c (cb_def_pragma): Don't try to spell CPP_EOF. - -2002-06-27 Gerald Pfeifer - - * doc/install.texi (Binaries): Add Sinix/Reliant Unix. Move - Hitachi entry. Make punctuation more consistent. - -2002-06-27 Matt Kraai - - * doc/install.texi: Change ` bit' to `-bit'. - * doc/md.texi: Change `-bits' to `-bit'. - * doc/tm.texi: Change `-bits' to ` bits'. - -2002-06-24 David S. Miller - - * config/sparc/sparc.h (INIT_TARGET_OPTABS): If ARCH64, set the - 32-bit ABI libfuncs to NULL. - - * expmed.c (expand_divmod): Do not set optab1/optab2 to the shift - optabs if op1 is const0_rtx. - -2002-06-23 Jan Hubicka - - * reg-stack.c (convert_regs_exit): Push the registers to stack in - proper order. - -2002-06-22 Ulrich Weigand - - PR middle-end/6963 - * function.c (assign_stack_temp_for_type): Do not return - the same MEM rtx for multiple uses of a stack slot. - -2002-06-22 David S. Miller - - PR target/6841 target/6770 target/6719 - * config/sparc/sparc.h (PREFERRED_RELOAD_CLASS): Return - NO_REGS for constant X when CLASS is GENERAL_OR_FP_REGS or - GENERAL_OR_EXTRA_FP_REGS. - -2002-06-21 Rainer Orth - - * config/sparc/t-crtfm (crtfastmath.o): Prefix with $(T) for - multilibs. - * config/sparc/t-sol2-64 (EXTRA_MULTILIB_PARTS): Add crtfastmath.o. - * config/sparc/t-linux64 (EXTRA_MULTILIB_PARTS): Likewise. - Fixes PR other/6836. - -2002-06-21 Bo Thorsen - - * config/i386/linux64.h (MD_FALLBACK_FRAME_STATE_FOR): Add i386 - support so multilib works again. And don't define this at all - when -Dinhibit_libc is used. - -Thu Jun 20 16:41:40 CEST 2002 Jan Hubicka - - * combine.c (gen_lowpart_for_combine): Avoid calling of - simplify_gen_subreg on VOIDmode. - - * combine.c (subst): Be prepared for simplify_subreg to return VOIDmode. - -2002-06-20 Richard Henderson - - * c-common.c (c_common_get_alias_set): Correctly handle characters. - Rearrange order of expressions; don't handle vectors here. - * alias.c (get_alias_set): Let vectors match their components. - -2002-06-17 Hans-Peter Nilsson - - PR target/7042 - * config/cris/cris.c (cris_simple_epilogue): Kludge around reorg.c - bug by saing that the epilogue isn't simple if there's a - non-empty current_function_epilogue_delay_list. - * config/cris/cris.md ("return"): Add sanity check asserting that - current_function_epilogue_delay_list is empty. - -2002-06-17 Richard Henderson - - * config/i386/i386.h (BIGGEST_FIELD_ALIGNMENT): Define instead - of ADJUST_FIELD_ALIGN if IN_TARGET_LIBS. - -2002-06-17 Richard Henderson - - PR target/6922 - * expmed.c (make_tree): Handle SIGN_EXTEND/ZERO_EXTEND. - -Mon Jun 17 00:31:46 CEST 2002 Jan Hubicka - - * i386-protos.h (x86_field_alignment): Declare. - * i386.c (x86_field_alignment): Define. - * i386.h (ADJUST_FIELD_ALIGNMENT): New. - (BIGGEST_FIELD_ALIGNMENT): Kill. - -2002-06-16 Richard Henderson - - PR opt/6722 - * regclass.c (globalize_reg): Update regs_invalidated_by_call. - -2002-06-16 Richard Henderson - - PR c/7030 - * dwarf2out.c (modified_type_die): Don't assign the qualified die - to the unqualified type. - -2002-06-14 Jeff Sturm - - * config/sparc/sparc.h (DYNAMIC_CHAIN_ADDRESS): Add - SPARC_STACK_BIAS. - -2002-06-14 Eric Botcazou - - * loop.c (check_final_value): Use v->always_executed - instead of v->always_computable. - * unroll.c (final_giv_value): Don't calculate the final - value as a function of the biv if the giv is not computed - for every loop iteration. - -2002-06-14 Eric Botcazou - - PR c/6677 - * convert.c (convert_to_integer) [LSHIFT_EXPR]: Don't pass - the truncation down when the target type is signed. - [trunc1]: Use unsigned arithmetic for LSHIFT_EXPR. - * fold-const.c (extract_muldiv) [NOP_EXPR]: Don't pass through - the conversion if the target type is a smaller type. - -Thu Jun 13 18:27:05 CEST 2002 Jan Hubicka - - * i386.c (ix86_expand_movstr): Fix pasto. - -Thu Jun 13 18:02:11 CEST 2002 Jan Hubicka - - * reload.c (find_valid_class): Fix thinko in my previous patch. - -2002-06-13 Hans-Peter Nilsson - - PR target/6997 - * config/cris/cris.md ("sleu"): Set attribute "cc" to "none". - -2002-06-12 Daniel Jacobowitz - - * config/mips/elf.h (DWARF2_DEBUG_INFO): Define. - * config/mips/mips.c (mips_output_filename): Don't print a - ".file" directive if we are using DWARF-2. - (mips_output_function_prologue): Do not emit source file - name for TARGET_GAS. - -2002-06-11 Ulrich Weigand - - * config/s390/s390.md (movsi): Only use floating point - register alternatives when operands are already fprs. - (movdi_31, movdi_64): Likewise. - -2002-06-11 Ulrich Weigand - - * config/s390/s390.md (reload_base, ltorg): Remove. - * s390.c (s390_stop_dump_lit_p, s390_dump_literal_pool, - s390_asm_output_pool_prologue, s390_pool_start_insn): Remove. - * s390-protos.h (s390_stop_dump_lit_p, s390_dump_literal_pool, - s390_asm_output_pool_prologue): Likewise. - * s390.h (s390_pool_start_insn): Likewise. - - * s390.c (s390_output_symbolic_const): Remove support for - old-style pool chunks. - (s390_function_epilogue): Likewise. - (s390_output_constant_pool): Likewise. Also, fix incorrect - alignment for 64-bit literal pools. - (print_operand_address): Remove 'y' and 'Y' format flags. - * s390.h (ASM_OUTPUT_POOL_PROLOGUE): Remove support for - old-style pool chunks. - (ASM_OUTPUT_SPECIAL_POOL_ENTRY): Likewise. - (ASM_OUTPUT_POOL_EPILOGUE): Remove. - (S390_CHUNK_MAX, S390_CHUNK_OV, S390_POOL_MAX): Remove. - - * s390.c (consttable_operand): New function. - * s390-protos.h (consttable_operand): Declare it. - * s390.h (PREDICATE_CODES): Add consttable_operand. - * s390.md (consttable_qi, consttable_hi, consttable_si, consttable_di, - consttable_sf, consttable_df, pool_start_31, pool_end_31, - pool_start_64, pool_end_64, reload_base, reload_base2): New insns. - * s390.c (struct constant, struct constant_pool): New data types. - (constant_modes, gen_consttable): New variables. - (s390_start_pool, s390_end_pool, s390_add_pool, - s390_dump_pool, s390_free_pool): New functions. - (s390_chunkify_pool): Completely reimplement literal pool - overflow handling. - - * s390.c (s390_pool_overflow): New variable. - * s390.h (s390_pool_overflow): Declare it. - * s390.md (cjump, icjump): Use it to adapt length for out-of-range - jumps in literal pool overflow situations. - - * s390.c (s390_decompose_address): Accept new-style pool chunk offsets. - (s390_frame_info): Account for possible use of RETURN_REGNUM - by new literal pool overflow code. - (s390_emit_prologue): Likewise. - -2002-06-10 Jakub Jelinek - - PR optimization/6759 - * cse.c (cse_insn): Fold src_eqv just once, store it folded back into - the REQ_EQUAL note. - -2002-06-10 Jakub Jelinek - - PR c/6660 - * c-decl.c (grokfield): Allow user defined types if they declare - structs or unions for unnamed fields. - -2002-06-10 Jakub Jelinek - - PR c/6809 - * print-rtl.c (print_mem_expr): Don't crash on unnamed fields. - -2002-06-10 Jakub Jelinek - - * varasm.c (const_hash): Handle FDESC_EXPR like ADDR_EXPR. - (compare_constant): Likewise. - (output_addressed_constants): Likewise. - -2002-06-10 Jakub Jelinek - - * cfgcleanup.c (try_optimize_cfg): Make sure merge_blocks doesn't - merge bb with itself. - -2002-06-07 Jason Thorpe - - * config.gcc (mips*-*-netbsd*): Add mips/t-netbsd to ${tmake_file}. - * config/mips/t-netbsd: New file. - -2002-06-07 H.J. Lu (hjl@gnu.org) - - * configure.in: Add --enable-__cxa_atexit. - * configure: Regenerated. - * config.in: Likewise. - - * defaults.h (DEFAULT_USE_CXA_ATEXIT): New. Defined to be 0 if - not defined. - -2002-06-07 Jason Thorpe - - * config/mips/netbsd.h (CACHE_FLUSH_FUNC): Define. - -Thu Jun 6 07:17:43 2002 Nicola Pero - - PR objc/6834 - * objc/objc-lang.c (LANG_HOOKS_GET_ALIAS_SET): Define to be - c_common_get_alias_set. - (LANG_HOOKS_SAFE_FROM_P): Define to be c_safe_from_p. - -2002-06-05 Jeff Law - - * pa.h (EXTRA_CONSTRAINT, T case): Further refine so that it - rejects (mem (lo_sum (reg) (unspec))), but will allow - (mem (lo_sum (reg) (symbol_ref)) for PA2.0. - -2002-06-05 Alan Modra - - * config/rs6000/linux64.h (ASM_OUTPUT_SOURCE_LINE): Define. - -Tue Jun 4 18:16:50 CEST 2002 Jan Hubicka - - * dwarf2out.c (expand_builtin_init_dwarf_reg_sizes): Do not initialize - fields past the register table. - - * i386.c (classify_argument): Properly handle base classes. - -Tue Jun 4 13:09:18 CEST 2002 Jan Hubicka - - * loop.c (emit_prefetch_instructions): Properly place the address - computation. - - * dwarf2out.c (output_call_frame_info): Do not skip unwind info - when flag_asynchronous_unwind_tables is set. - - * i386-protos.h (x86_output_mi_thunk): Declare. - * unix.h (ASM_OUTPUT_MI_THUNK): Move offline to ... - * i386.c (x86_output_mi_thunk): ... here; handle 64bits. - - * config/i386/i386.c (ix86_expand_int_movcc): Truncate to proper - mode. - - * i386.md (movabsdi): Kill broken alternative. - - * i386.c (dbx64_register_map): Fix typo - -2002-06-03 Jason Thorpe - - * config/rs6000/netbsd.h (DRAFT_V4_STRUCT_RET): Remove. - -2002-05-31 John David Anglin - - * pa-linux.h (WCHAR_UNSIGNED): Define to 0. - * pa.h (WCHAR_UNSIGNED): Define to 1. - -2002-05-31 John David Anglin - - * pa.c (output_millicode_call): Correct "be,l" insn for TARGET_PA_20. - (output_call): Likewise. - -2002-05-30 Richard Henderson - Eric Botcazou - - PR optimization/6822 - * config/i386/i386.c (ix86_expand_int_movcc): Don't cast INTVAL - to unsigned int for op1 comparisons. Use gen_int_mode. - -2002-05-30 Marc Espie - - * config.gcc (sparc64-*-openbsd*): New. - * config/sparc/openbsd1-64.h: New. - * config/sparc/openbsd64.h: New. - -2002-05-30 Jason Thorpe - - * config/m68k/netbsd-elf.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Set to - 96 if not __mc68010__. - -2002-05-30 Andreas Schwab - - * config/ia64/sysv4.h (DO_SELECT_SECTION): Also handle - FUNCTION_DECLs. - -2002-05-30 Jason Thorpe - - * config/i386/netbsd64.h (CPP_LP64_SPEC): Define. - (CPP_SUBTARGET_SPEC): Define. - (SUBTARGET_EXTRA_SPECS): Redefine, adding cpp_lp64 and - cpp_subtarget specs. - (CPP_SPEC): Redefine to include %(cpp_subtarget). - -2002-05-29 Hans-Peter Nilsson - - * doc/md.texi (Patterns): Note pattern condition pitfall - for unnamed insn. - -2002-05-29 Jason Thorpe - - * config/sparc/netbsd-elf.c (CPP_SUBTARGET_SPEC64): Remove - -D__arch64__. Add -D_LP64. - (CPP_ARCH32_SPEC): Redefine to match the non-bi-arch version - from sparc.h. - (CPP_ARCH64_SPEC): Likewise. - (NO_BUILTIN_PTRDIFF_TYPE): Undef. - (NO_BUILTIN_SIZE_TYPE): Undef. - -2002-05-29 Jason Thorpe - - * config.gcc (alpha-*-netbsd*): Don't use crtstuff. - -2002-05-29 Jason Thorpe - - * config/alpha/netbsd.h (CPP_PREDEFINES): Add -D_LP64. - -2002-05-29 Richard Henderson - - * config/i386/i386.c (ix86_compute_frame_layout): Do add bottom - alignment for alloca. - -2002-05-29 Neil Booth - - PR preprocessor/6844 - * cppmacro.c (cpp_macro_definition): Reserve space for terminating - NUL. - -2002-05-29 Joel Sherrill - - * config/rs6000/rs6000.h (ASM_CPU_SPEC): Use -m403 and -m405. - -2002-05-29 Hans-Peter Nilsson - - PR target/6838 - * config/cris/cris.md: Fix typos and thinkos in comments. - (splitter for mov_sideqi_mem, mov_sidehi_mem, mov_sidesi_mem): - Remove spurious mode specifier on operand 2. - -2002-05-29 Ulrich Weigand - - * config/s390/s390.c (legitimate_pic_operand_p): Do not - accept symbolic LARL operands. - (s390_emit_epilogue): Do not set FRAME_RELATED_P on - epilogue insns. - -2002-05-28 Marc Espie - * config/i386/openbsd.h (HAVE_GAS_MAX_SKIP_P2ALIGN): Remove, - inherited from gas.h. - (ASM_QUAD): Undef. OpenBSD does not support it. - -2002-05-28 Danny Smith - - * doc/install.texi (binaries): Change mingw binaries - link to www.mingw.org. - -2002-05-28 Richard Henderson - - * config/i386/i386.c (ix86_compute_frame_layout): Do not add - bottom alignment for leaf functions. - -Mon May 27 10:37:28 CEST 2002 Jan Hubicka - - * reload.c (find_valid_class): Accept new argument DEST, - choose class accordingly. - (push_reload): Update callers. - -2002-05-26 Richard Henderson - - 2002-05-25 Richard Henderson - * c-pragma.c (apply_pragma_weak): Convert value identifier to - string for decl_attributes. - (handle_pragma_weak): Call assemble_alias if we're modifying - an existing decl. - - 2002-05-15 Richard Henderson - * varasm.c (merge_weak): Remove special case for extern and common. - - 2002-05-15 Richard Henderson - * varasm.c (merge_weak): Error for any weakening after definition. - Adjust weakening after use warning to catch more cases. - (assemble_alias): Set TREE_USED and TREE_ASM_WRITTEN consistently. - * config/alpha/alpha.c (alpha_encode_section_info): Do not abort. - - 2002-03-02 Richard Henderson - * attribs.c (handle_alias_attribute): Don't call assemble_alias. - * toplev.c (rest_of_decl_compilation): Invoke assemble_alias when - needed. - -2002-05-26 Jakub Jelinek - - * cse.c (fold_rtx): Don't optimize if SUBREG changes mode class. - -2002-05-25 Richard Henderson - - PR target/6788 - * config/sparc/sparc.c (sparc_output_mi_thunk): New implementation - using rtl instead of fprintf. - * config/sparc/sparc.h (ASM_OUTPUT_MI_THUNK): Use it. - * config/sparc/sparc-protos.h: Update. - -2002-05-25 Marek Michalkiewicz - - * config/avr/avr.c (avr_handle_progmem_attribute): Handle TYPE_DECL. - - * config/avr/avr.c (machine_dependent_reorg): Sign extend the - CONST_INT operand to the correct mode after adding 1 to it. - -2002-05-24 Roman Lechtchinsky - - * config/alpha/unicosmk.h (REAL_VALUE_TO_TARGET_SINGLE, - REAL_VALUE_TO_TARGET_DOUBLE): Define for native builds. - -2002-05-24 Jakub Jelinek - - PR other/6782 - * final.c (get_mem_expr_from_op): Return 0 if op is NULL. - -2002-05-24 David Edelsohn - - * config/rs6000/aix43.h (LINK_SPEC): Add PE initializer. - (STARTFILE_SPEC): Delete PE crt0.o. - * config/rs6000/aix51.h: Same. - * config/rs6000/rs6000.h (ASM_WEAKEN_DECL): Append [DS] to - function descriptor symbol. Use RS6000_OUTPUT_BASENAME. - (ASM_OUTPUT_DEF_FROM_DECLS): Use RS6000_OUTPUT_BASENAME. - * config/rs6000/xcoff.h (ASM_OUTPUT_DEF): Define. - -2002-05-24 Richard Henderson - - * varasm.c (asm_output_bss): Always output one byte. - * config/alpha/elf.h (ASM_OUTPUT_ALIGNED_LOCAL): Likewise. - -2002-05-24 Neil Booth - - PR preprocessor/6780 - * cppmacro.c (enter_macro_context): Clear state.angled_headers. - -2002-05-21 Richard Earnshaw - - * bitmap.c (bitmap_find_bit): Return early if we have the correct - element cached. - -2002-05-24 Neil Booth - - * cppinit.c (mark_named_operators): Split out from init_builtins. - (struct builtin): Remove operator. - (CPLUS, OPERATOR, O): Kill - (struct named_op): New. - (cpp_finish_options): Call it from here instead. - (init_builtins): Don't do named operators. - -2002-05-20 David S. Miller - - * cselib.c (max_value_regs): New. - (cselib_lookup, cselib_invalidate_regno): Initialize it when - adding new entries to the REG_VALUES table and we are dealing with - a hard register. - (clear_table): Initialize it. - (cselib_invalidate_regno): Use it to determine which hard - registers to scan when mode is not VOIDmode. - -2002-05-24 Alan Modra - - * config/rs6000/rs6000.c (output_toc): Mask longs to 32 bits. - -2002-05-23 Hans Boehm - * config/ia64/linux.h (IA64_GATE_AREA_END): Adjust for 64K - pages. - -2002-05-23 Neil Booth - - PR preprocessor/6517 - * Makefile.in: Update. - * c-common.c (c_common_post_options): Add preprocessor - errors to the error count. - * c-lang.c (c_post_options): Kill. - (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options. - * hooks.h: Add header guards. - * langhooks-def.h: Include hooks.h. - (LANG_HOOKS_POST_OPTIONS): Update. - * langhooks.h (struct lang_hooks): Update post_options. - * toplev.c (parse_options_and_default_flags): Update. -objc: - * objc-lang.c (objc_post_options): Kill. - (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options. - -2002-05-23 Jakub Jelinek - - PR target/6753 - * config/i386/i386.md (sse_movdfcc, sse_movdfcc_eq): Use Y instead - of x in constraints for clarity. - (sse_mov?fcc split): abort if op2 == op3. - (sse_movsfcc_const0_1, sse_movsfcc_const0_2, sse_movsfcc_const0_3, - sse_movsfcc_const0_4): Add earlyclobber. - (sse_movdfcc_const0_1, sse_movdfcc_const0_2, sse_movdfcc_const0_3, - sse_movdfcc_const0_4): Likewise. Use DFmode, not SFmode. - Use Y instead of x in constraints. - -2002-05-23 Jakub Jelinek - - PR c/6643 - * emit-rtl.c (widen_memory_access): Only call compare_tree_int - if DECL_SIZE_UNIT is INTEGER_CST. - -2002-05-23 Jakub Jelinek - - * combine.c (force_to_mode): Use gen_int_mode. - Don't clear CONST_INT bits outside of mode. - -2002-05-23 Jakub Jelinek - - * configure.in: Fix as version test for binutils 2.12.1 releases - (without dates). - * configure: Rebuilt. - -Wed May 22 14:16:07 CEST 2002 Jan Hubicka - - * i386.c (expand_movstr, expand_clrstr): Fix inline-all-stringops - sequence. - (ix86_expand_clrstr): Fix typo. - -2002-05-22 Duraid Madina - - * tradcpp.c (fixup_newlines): Use old-style function header. - -2002-05-21 Richard Henderson - - * system.h (BLOCK_PROFILER, BLOCK_PROFILER_CODE, - FUNCTION_BLOCK_PROFILER, FUNCTION_BLOCK_PROFILER_EXIT, - MACHINE_STATE_SAVE, MACHINE_STATE_RESTORE): Poison. - - * toplev.c (display_help): Kill -a -ax help. - - * config/1750a/1750a.h, config/alpha/alpha.h, - config/clipper/clipper.h, config/dsp16xx/dsp16xx.h, - config/h8300/h8300.h, config/i960/i960.h, config/m68k/tower-as.h, - config/m88k/m88k.h, config/vax/vax.h, config/we32k/we32k.h: - (FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER): Kill. - - * libgcc2.c [L_bb] (BLOCK_PROFILER_CODE): Kill. - * config/m68k/sun3.h (BLOCK_PROFILER_CODE): Kill. - - * config/i386/i386-protos.h (ix86_output_block_profiler): Kill. - (ix86_output_function_block_profiler): Kill. - * config/m68hc11/m68hc11.c (m68hc11_block_profiler): Kill. - (m68hc11_function_block_profiler): Kill. - * config/m68hc11/m68hc11-protos.h: Update. - * config/m88k/m88k.c (output_block_profiler): Kill. - (output_function_block_profiler): Kill. - * config/m88k/m88k-protos.h: Update. - -2002-05-21 NIIBE Yutaka - - * reload1.c (do_output_reload): Run delete_output_reload - only if optimizing. - -2002-05-20 Richard Henderson - - * cse.c (canon_hash): Reorder do_not_record test. Always - allow pic_offset_table_rtx. - -2002-05-19 Neil Booth - - * doc/contrib.texi: Update my entry. - -2002-05-19 Kaveh R. Ghazi - - * mips/iris6.h (CPLUSPLUS_CPP_SPEC): Define. - -2002-05-19 Marek Michalkiewicz - - 2002-02-28 Marek Michalkiewicz - * config/avr/avr.c (avr_hard_regno_mode_ok): Do not allow r29 - which may overwrite the high byte of the frame pointer. - -2002-03-19 Lars Brinkhoff - - * emit-rtl.c (gen_int_mode): New function. - * rtl.h: Prototype for it. - -Sat May 18 23:09:19 CEST 2002 Jan Hubicka - - * i386.md (pushqi2, ashrqi_*): Fix constraint. - -2002-05-18 Aldy Hernandez - - * config/rs6000/altivec.h: Cleanups. - -2002-05-17 Rainer Orth - - * doc/install.texi (Specific, mips-sgi-irix6): Document need to - bootstrap with -mips3. - -2002-05-17 David S. Miller - - PR c/6689, PR optimization/6615 - * local-alloc.c (struct equivalence): Rename 'src' to 'src_p' - and make it a pointer to rtx. Update comments. - (update_equiv_regs): When scanning for equivalences, record - address of SET_SRC (set) in reg_equiv[].src_p. Dereference - it while making the equiv replacements. - -2002-05-17 Kurt Wall - - * doc/install.texi (Testing): Mention two common DejaGnu warnings - that can be ignored. - -2002-05-16 Gerald Pfeifer - - * doc/install.texi (Final install): Recommend to install into a - "clean" target directory. - -2002-05-17 Andreas Schwab - - * config/ia64/sysv4.h (DO_SELECT_SECTION): Factored out of - SELECT_SECTION. - (UNIQUE_SECTION): Define to get small data correctly. - - * varasm.c (resolve_unique_section): Add third parameter - flag_function_or_data_sections and use it instead of - flag_function_sections. - (assemble_start_function): Pass flag_function_sections. - (asm_emit_uninitialised): Pass flag_data_sections. - (assemble_variable): Likewise. - -2002-05-15 Eric Botcazou - - * fold-const.c (fold) [LT_EXPR]: Move the transformation of a - comparison against the highest or lowest integer value before - the 'X >= CST to X > (CST - 1)' and 'X < CST to X <= (CST - 1)' - transformation and that of an unsigned comparison against 0 - right after. - -2002-05-16 Richard Henderson - - PR c/3467 - * c-decl.c (grokdeclarator): Don't pedwarn variable sized arrays - for c99. - -2002-05-16 Mark Mitchell - - * cfgrtl.c (purge_dead_edges): Correct handling of EDGE_EH. - -2002-05-09 David S. Miller - - * config/sparc/sol2.h (ASM_CPU_SPEC): Handle -mcpu=v9. - -2002-05-07 David S. Miller - - PR target/6103 - * config/sparc/sparc.h (TARGET_BUGGY_QP_LIB): Define to zero. - * config/sparc/sol2.h (TARGET_BUGGY_QP_LIB): Override to one. - * config/sparc/sparc.c (emit_soft_tfmode_libcall): If the Qp - library implementation clobbers the output before the inputs - are fully consumed, use stack temporary for the output. - -Wed May 15 10:38:27 CEST 2002 Jan Hubicka - - * invoke.texi (-malign-double): Re-add lost warning. - -2002-05-14 Gerald Pfeifer - - * doc/install.texi: Remove special markup originally required for - HTML generation with texi2html. - -2002-05-14 Gerald Pfeifer - - * doc/install.texi (Specific, *-*-solaris2*): Update passus on - setting CONFIG_SHELL to /bin/ksh and remove alternate trick to - (possibly) work around broken /bin/sh. - -2002-05-08 Jason Merrill - - PR c++/6381 - * dwarf2out.c (rtl_for_decl_location): Only expand INTEGER_CST and - REAL_CST. - -2002-05-14 Release Manager - - * GCC 3.1 Released. - -2002-05-10 Rainer Orth - - * config/mips/t-iris6 (SHLIB_SLIBDIR_SUFFIXES): Use mabi=64 and - . as N64/N32 libgcc_s.so subdirs. - -2002-05-09 Mark Mitchell - - * config/rs6000/rs6000.h: Revert previous patch. - -2002-05-09 Joel Sherrill - - * config/rs6000/rs6000.h CPP_CPU_SPEC): Correct - 403 and 405 arguments for binutils 2.12. - -Thu May 9 12:21:48 2002 Jeffrey A Law (law@redhat.com) - - * pa.c (hppa_profile_hook): Use force_reg to get the address - of the profile hook into an appropriate pseudo register. - -2002-05-09 Jakub Jelinek - - * mklibgcc.in: Set shlib_slibdir_qual to empty string if - SHLIB_SLIBDIR_SUFFIXES is empty. - -2002-05-09 Rainer Orth - - * config/mips/t-iris6 (SHLIB_SLIBDIR_SUFFIXES): Define. - (SHLIB_LINK, SHLIB_INSTALL): Adjust. - -2002-05-09 Jakub Jelinek - - * config/sparc/t-linux64 (SHLIB_MAPFILES): Set. - * config/sparc/libgcc-sparc-glibc.ver: New file. - * config/i386/t-linux64 (SHLIB_MAPFILES): Add libgcc-x86_64-glibc.ver. - * config/i386/libgcc-x86_64-glibc.ver: New file. - * config/cris/t-linux (SHLIB_MAPFILES): Remove. - * mklibgcc.in: Preprocess SHLIB_MAPFILES with ml flags. - -2002-05-09 Jakub Jelinek - - PR target/6429 - * Makefile.in (libgcc.mk): Pass SHLIB_SLIBDIR_SUFFIXES to mklibgcc. - * mklibgcc.in: If SHLIB_SLIBDIR_SUFFIXES is defined, put libgcc_s - shared libraries into multilib dirs, with SONAME libgcc_s.so.1 for - base multilibs. - * config/t-slibgcc-elf-ver (SHLIB_LINK): Adjust for the above. - * config/t-slibgcc-sld (SHLIB_LINK): Likewise. - * config/i386/t-linux64 (SHLIB_SLIBDIR_SUFFIXES): Define. - * config/sparc/t-linux64 (SHLIB_SLIBDIR_SUFFIXES): Define. - * config/sparc/t-sol2-64 (SHLIB_SLIBDIR_SUFFIXES): Define. - -2002-05-08 Mark Mitchell - - PR c/6569. - * varasm.c (mark_weak): New function. - (merge_weak): Use it. Do not call declare_weak. - (declare_weak): Use merge_weak. - -2002-05-07 Geoffrey Keating - - * configure.in: Don't pass -Wno-long-long to a ADA compiler - that doesn't support it. - * configure: Regenerate. - -2002-05-07 Jason Merrill - - * dwarf2out.c (rtl_for_decl_location): Don't try to extract a - constant value from DECL_INITIAL. - -2002-05-07 Richard Henderson - - PR c++/6212 - * expr.c (highest_pow2_factor_for_type): New. - (expand_assignment): Use it. - -2002-05-07 Jakub Jelinek - - * configure.in: If as or ld segfaults, don't clutter with it stdout. - * configure: Rebuilt. - -2002-05-05 Jakub Jelinek - - PR target/6561 - * config/sparc/sparc.md (muldi3_v8plus): Handle %1 equal to %2. - -2002-05-05 Franz Sirl - - * doc/install.texi (powerpc-*-linux-gnu*): Update build requirements. - -2002-05-04 David Edelsohn - - PR c/6543 - * config/rs6000/rs6000.md (sCC pattern and splitter): Remove - clobber and use result as temporary value. - -2002-05-03 Jakub Jelinek - - PR target/6542 - * config/sparc/sparc.h (leaf_reg_remap): Remove const. - (CONDITIONAL_REGISTER_USAGE): For TARGET_FLAT make - fill leaf_reg_remap with identity. - * config/sparc/sparc.c (leaf_reg_remap): Remove const. - -2002-05-03 Jakub Jelinek - - PR target/6522 - * dwarf2out.c (simple_decl_align_in_bits): Renamed to... - (simple_field_decl_align_in_bits): this. Apply - BIGGEST_FIELD_ALIGNMENT and ADJUST_FIELD_ALIGN if defined. - -2002-05-03 Richard Henderson - - PR opt/6534 - * ifcvt.c (noce_try_store_flag, noce_try_store_flag_constants, - noce_try_store_flag_inc, noce_try_store_flag_mask, noce_try_cmove, - noce_try_cmove_arith, noce_try_minmax, noce_try_abs): Insert new - code before JUMP, not EARLIEST. - -2002-05-03 Jakub Jelinek - - PR preprocessor/6489 - * tradcpp.c (fixup_newlines): New. - (main, finclude): Use it. - -2002-05-03 Rainer Orth - - * doc/install.texi (Installing): Mention GCC 3.1 buildstats. - (Specific): Removed buildstats references. - (Specific, hppa*-hp-hpux11): Adjust for GCC versions > 3.0. - (Specific, sparc-sun-solaris2*): Update 64-bit hints for GCC 3.1. - Accomodate Solaris versions beyond 8. - (Specific, sparc-sun-solaris2.7): Update as path for GCC 3.1. - (Specific, *-*-solaris2.8): Removed, obsolete. - -2002-05-02 Jason Merrill - - * defaults.h (BOOL_TYPE_SIZE): Move default here from cp/decl.c. - * c-decl.c (c_init_decl_processing): Use it. - * config/rs6000/darwin.h (BOOL_TYPE_SIZE): Define to INT_TYPE_SIZE. - * config/i960/i960.h (BOOL_TYPE_SIZE): Don't define. - * config/mcore/mcore.h (BOOL_TYPE_SIZE): Don't define. - -2002-05-02 Loren J. Rittle - - * doc/install.texi (*-*-freebsd*): Update to latest status. - -2002-05-02 Jakub Jelinek - - PR target/6540 - * config.gcc (sparc*-*-solaris2*): Set float_format to i128. - * config/float-sparc.h: Assume 128-bit long double if - __LONG_DOUBLE_128__ is defined. - - PR target/6512, PR target/5628 - * config/sparc/sparc.md (movdf_insn_v9only_novis): Don't allow >= %f32 - when memory is not aligned. - (movdf_insn_v9only_vis): Likewise. - * config/sparc/sparc.h (SECONDARY_INPUT_RELOAD_CLASS): Request a FP_REGS - temporary for EXTRA_FP_REGS DFmode load from unaligned memory. - (SECONDARY_OUTPUT_RELOAD_CLASS): Similarly. - -2002-05-02 Joseph S. Myers - - * doc/install.texi: State GNAT version requirements. - -2002-05-01 Jeff Law - - * pa.h (EXTRA_CONSTRAINT): Don't accept PIC addresses for the - 'T' constraint. - -2002-05-01 Joel Brobecker - - * dbxout.c (dbxout_type): Emit size information for range types, - as well, but only when using GDB extensions. - -2002-05-01 Richard Henderson - - * configure.in (HAVE_GAS_HIDDEN): Replace SPARC feature test with - target-independent gnu binutils date test. - -2002-05-01 Jakub Jelinek - - * cppinit.c (cpp_handle_option) [-dM]: Don't set no_output here... - (cpp_post_options): ...but here. Disable -dD, -dN and -dI when - -M -or -MM is in effect. - -2002-05-01 Zack Weinberg - - * config.gcc: Correct test of --enable-obsolete. Obsolete all - A29k configurations. - * doc/install.texi: Update to match. - -2002-05-01 Franz Sirl - - PR bootstrap/6514 - * varasm.c (globalize_decl): Compare DECL_ASSEMBLER_NAME to check - for duplicates. Always loop over whole list. - -Wed May 1 10:32:37 2002 Richard Kenner - - * reload.c (find_reloads, case 'p'): Set BADOP to 0. - -2002-05-01 Joel Sherrill - - * config/sparc/t-elf (sparc-rtems, sparc-elf): Build assembly - support routines. - -2002-05-01 Joseph S. Myers - - * doc/install.texi: Update Texinfo version requirement - documentation. - -2002-04-30 Richard Henderson - - * config/sparc/sol27-sld.h: Rename from sol26-sld.h. - (PREFERRED_DEBUGGING_TYPE, ASM_DEBUG_SPEC): Undef. - * config.gcc (sparc-solaris): Adjust test for native ld bug. - Add it after the biarch headers. - -2002-04-30 Richard Henderson - - PR opt/6516 - * toplev.c (rest_of_compilation): Don't run cross-jump before - bb-reorder. - -2002-04-30 Joel Sherrill - - * config/arm/rtems-elf.h: Add #undef TARGET_VERSION to prevent warning. - -2002-04-30 Richard Henderson - - * config/sparc/sparc.c (emit_soft_tfmode_libcall, - emit_soft_tfmode_binop, emit_soft_tfmode_unop, emit_soft_tfmode_cvt, - emit_hard_tfmode_operation, emit_tfmode_binop, emit_tfmode_unop, - emit_tfmode_cvt): New. - * config/sparc/sparc.md (extendsftf2, extenddftf2, trunctfsf2, - trunctfdf2, floatsitf2, floatunssitf2, floatditf2, floatunsditf2, - fix_trunctfsi2, fixuns_trunctfsi2, fix_trunctfdi2, fixuns_trunctfdi2, - addtf3, subtf3, multf3, divtf3, sqrttf2): Use them. - * config/sparc/sparc-protos.h: Update. - -2002-04-30 John David Anglin - - * config.gcc (hppa1.1-*-pro*, hppa1.1-*-osf*, hppa1.1-*-rtems*, - hppa1.0-*-osf*, hppa1.1-*-bsd*, hppa1.1-*-hpux10*, hppa2*-*-hpux10*, - hppa1.0-*-hpux10*, hppa*64*-*-hpux11*, hppa1.1-*-hpux11*, - hppa2*-*-hpux11*, hppa1.0-*-hpux11*, hppa*-*-lites*): Define xmake_file. - * ada/Make-lang.in (ADA_FLAGS_TO_PASS): Don't pass ADA_CFLAGS. - * pa/t-linux, pa/t-pa, pa/t-pa64, t-pro (T_ADAFLAGS): Delete. - * pa/x-ada: New file. Define ADA_CFLAGS. - -2002-04-30 Janis Johnson - - * doc/install.texi (Final install): Add to the list of info to include - in a report of a successful bootstrap, and add link to 3.1 list. - -2002-04-30 Jakub Jelinek - - PR c++/6396 - * toplev.c (rest_of_compilation): Only run regrename and copy - propagation if optimizing. - -2002-04-30 Gerald Pfeifer - - * doc/contrib.texi (Contributors): Use MIPS instead of Mips and - mips. Add two missing commas. - -2002-04-30 Paolo Carlini - - * doc/contrib.texi (Contributors): Update Paolo Carlini's - and Benjamin Kosnik's entries. - -2002-04-29 Franz Sirl - - * combine.c (find_split_point): Use trunc_int_for_mode. - -Mon Apr 29 17:19:10 2002 Richard Kenner - - * reload1.c (eliminate_regs, case SUBREG): Fix typo in - adjust_address_nv call. - -2002-04-29 Janis Johnson - - * doc/install.texi (Testing): Provide additional information, and - a stronger encouragement, for running the testsuites. - -2002-04-29 Rainer Orth - - * fixinc/inclhack.def (solaris_widec): Include in - Solaris 2 if missing. - * fixinc/fixincl.x: Regenerate. - * fixinc/tests/base/widec.h: New file. - -2002-04-29 Jakub Jelinek - - PR target/6476 - * configure.in: Check whether linker eh_frame optimizations work - properly. - * configure: Rebuilt. - -Mon Apr 29 17:08:09 CEST 2002 Jan Hubicka - - * i386.c (dbx64_register_map): Fix typo. - -Mon Apr 29 14:48:33 CEST 2002 Jan Hubicka - - * i386.md (sse_mov?fcc*): Revert patch of Apr 18th. - -2002-04-29 Gerald Pfeifer - - * doc/contrib.texi (Contributors): Add Paolo Carlini and - Janis Johnson. - Update Richard Henderson, Jakub Jelinek, and Mark Mitchell. - Refer to Objective-C instead of ObjC, SPARC instead of sparc, - and CPU instead of cpu. - -2002-04-29 Alexandre Oliva - - * config.gcc: Revert i386 changes inadvertently brought in - from mainline along with 2002-04-04's change. - -2002-04-28 David S. Miller - - PR target/6496 - * config/sparc/sparc.md (call followed by jump peephole): Do not - match for TARGET_V9, kill TARGET_ARCH64 variants. - - PR target/6500 - * config/sparc/sparc.md (prefetch): Emit properly for 32-bit vs. - 64-bit TARGET_V9. Do not use prefetch page, use prefetch for - several {reads,writes} instead. - * config/sparc/sparc.h (PREFETCH_BLOCK, SIMULTANEOUS_PREFETCHES): - Define. - -2002-04-27 David S. Miller - - PR target/6494 - * config/sparc/linux64.h (MD_FALLBACK_FRAME_STATE_FOR): Be mindful - of the stack bias. - - * config/sparc/linux.h, config/sparc/linux64.h: Don't bother - including signal.h and sys/ucontext.h, not needed. - -2002-04-28 Richard Henderson - - PR c/5154 - * ggc-common.c (ggc_mark_rtx_children_1): Rename from... - (ggc_mark_rtx_children): New. - -2002-04-28 Franz Sirl - - PR c/6497 - * config/rs6000/rs6000.md (sCC patterns): Remove clobber and use - result as temporary value. - -2002-04-28 Jakub Jelinek - - PR optimization/6475 - * reload1.c (alter_reg): Only call set_mem_expr if I is home pseudo - register of REGNO_DECL (i). - * Makefile.in (reload1.o): Add $(TREE_H). - -2002-04-28 Bruce Korb - - * fixinc/check.tpl (set-writable): verify that it exists before - invoking. - -2002-04-28 Franz Sirl - - PR c/6343 - * c-decl.c (duplicate_decls): Call merge_weak. - * c-pragma.c (apply_pragma_weak): Warn about misuse. - * output.h (merge_weak): Prototype merge_weak. - * varasm.c (merge_weak): New function. - (declare_weak): Make sure we don't give an error on VAR_DECLs. - Mark RTL with SYMBOL_REF_WEAK. - -2002-04-25 David S. Miller - - PR target/6422 - * reorg.c (optimize_skip): Do not allow exception causing - instructions to be considered for delay slots. - (fill_simply_delay_slots, fill_slots_from_thread): Likewise. - (relax_delay_slots): Do not try to consider exception causing - instructions as redundant. - -2002-04-26 Alexandre Oliva - - * tree.c (tree_int_cst_lt): Compare constants whose types differ - in unsigned-ness correctly. - -2002-04-26 Chris Demetriou - - * config/mips/mips.h (SUBTARGET_CPP_SIZE_SPEC): Get closer to - correct for MEABI (used by mipsisa32-elf). - -2002-04-26 Mark Mitchell - - PR bootstrap/6445 - * config/i386/i386.md (untyped_call): Return the value in a float - register if TARGET_FLOAT_RETURNS_IN_80387, not just if - TARGET_80387. - -2002-04-26 Ulrich Weigand - - * config/s390/linux.h: Revert 2002-04-22 change. - -2002-04-26 John David Anglin - - * pa.h (FUNCTION_OK_FOR_SIBCALL): Don't do sibcalls when using the - portable runtime model. - -2002-04-26 David Edelsohn - Richard Henderson - - * config/rs6000/rs6000.md (sCC pattern): Remove clobber and use - result as temporary value. - -2002-04-26 Richard Henderson - - PR c/3581 - * c-common.c (combine_strings): Use xmalloc, not alloca. - - * c-common.c (combine_strings): Tweak __FUNCTION__ warning text. - -2002-04-26 Bo Thorsen - - * config/i386/linux64.h (MD_FALLBACK_FRAME_STATE_FOR): Define for - x86-64. - -2002-04-25 David S. Miller - - * config/sparc/sparc.h (FUNCTION_OK_FOR_SIBCALL): Add back check - for DECL being NULL. - -2002-04-25 Eric Botcazou - - * c-decl.c (grokdeclarator): Remove outdated ??? note - on invalid declaration of flexible array members. - -2002-04-25 Richard Henderson - - * doc/invoke.texi: Document -gdwarf{,-2} vs debug level. - -2002-04-25 Ulrich Weigand - - * config/s390/s390.c (s390_emit_epilogue): Always restore registers - needed by the compiler, even if they are used as global regs. - -2002-04-25 Steven Bosscher - - * doc/c-tree.texi: Fix typo in introduction. - -2002-04-24 Richard Henderson - - * configure.in (HAVE_GAS_HIDDEN): Detect sparc binutils 2.12 - linker bug. - -2002-04-24 Jason Merrill - - * dwarf2.h (enum dwarf_attribute): Add DW_AT_GNU_vector. - * dwarf2out.c (dwarf_attr_name): Support it. - (gen_array_type_die): Emit it. - (lookup_type_die): No special handling for VECTOR_TYPE. - (gen_type_die): Hand VECTOR_TYPE off to gen_array_type_die. - -2002-04-24 Richard Henderson - - * config/mips/mips.md (movdi_usd): Renumber. - -2002-04-24 Robert Lipe - - * config/i386/sco5.h(i386.h, att.h): Eliminate double inclusion. - -2002-04-24 David S. Miller - - * config/sparc/sparc.h (FUNCTION_OK_FOR_SIBCALL): Return false if - 32-bit Sparc and current_function_returns_struct is true. - -2002-04-24 Aldy Hernandez - - * config/rs6000/altivec.h: Cleanup file. Add non individual - variants. - (vec_vaddubm): New. - (vec_vadduhm): New. - (vec_vadduwm): New. - (vec_vaddfp): New. - (vec_vaddcuw): New. - (vec_vaddubs): New. - (vec_vaddsbs): New. - (vec_vadduhs): New. - (vec_vadduws): New. - (vec_vaddsws): New. - (vec_vand): New. - (vec_vandc): New. - (vec_vavgub): New. - (vec_vavgsb): New. - (vec_vavguh): New. - (vec_vavgsh): New. - (vec_vavguw): New. - (vec_vavgsw): New. - (vec_vrfip): New. - (vec_vcmpbfp): New. - (vec_vcmpequb): New. - (vec_vcmpequh): New. - (vec_vcmpequw): New. - (vec_vcmpeqfp): New. - (vec_vcmpgefp): New. - (vec_vcmpgtub): New. - (vec_vcmpgtsb): New. - (vec_vcmpgtuh): New. - (vec_vcmpgtsh): New. - (vec_vcmpgtuw): New. - (vec_vcmpgtsw): New. - (vec_vcmpgtfp): New. - (vec_vcmpgefp): New. - (vec_vcfux): New. - (vec_vcfsx): New. - (vec_vctsxs): New. - (vec_vctuxs): New. - (vec_vexptefp): New. - (vec_vrfim): New. - (vec_lvx): New. - (vec_lvebx): New. - (vec_lvehx): New. - (vec_lde): Add vector float variant. - (vec_lvewx): New. - (vec_lvxl): New. - (vec_vlogefp): New. - (vec_vmaddfp): New. - (vec_vmhaddshs): New. - (vec_vmaxub): New. - (vec_vmaxsb): New. - (vec_vmaxuh): New. - (vec_vmaxsh): New. - (vec_vmaxuw): New. - (vec_vmaxsw): New. - (vec_vmaxsw): New. - (vec_vmaxfp): New. - (vec_vmrghb): New. - (vec_vmrghh): New. - (vec_vmrghw): New. - (vec_vmrglb): New. - (vec_vmrglh): New. - (vec_vmrglw): New. - (vec_vminub): New. - (vec_vminsb): New. - (vec_vminuh): New. - (vec_vminsh): New. - (vec_vminuw): New. - (vec_vminsw): New. - (vec_vminfp): New. - (vec_vmladduhm): New. - (vec_vmhraddshs): New. - (vec_msumubm): New. - (vec_vmsummbm): New. - (vec_vmsumuhm): New. - (vec_vmsumshm): New. - (vec_vmsumuhs): New. - (vec_vmsumshs): New. - (vec_vmuleub): New. - (vec_vmulesb): New. - (vec_vmuleuh): New. - (vec_vmulesh): New. - (vec_vmuloub): New. - (vec_mulosb): New. - (vec_vmulouh): New. - (vec_vmulosh): New. - (vec_vnmsubfp): New. - (vec_vnor): New. - (vec_vor): New. - (vec_vpkuhum): New. - (vec_vpkuwum): New. - (vec_vpkpx): New. - (vec_vpkuhus): New. - (vec_vpkshss): New. - (vec_vpkuwus): New. - (vec_vpkswss): New. - (vec_vpkshus): New. - (vec_vpkswus): New. - (vec_vperm): New. - (vec_vrefp): New. - (vec_vrlb): New. - (vec_vrlh): New. - (vec_vrlw): New. - (vec_vrfin): New. - (vec_vrsqrtefp): New. - (vec_vsel): New. - (vec_vslb): New. - (vec_vslh): New. - (vec_vslw): New. - (vec_vsldoi): New. - (vec_vsl): New. - (vec_vslo): New. - (vec_vspltb): New. - (vec_vsplth): New. - (vec_vspltw): New. - (vec_vspltisb): New. - (vec_vspltish): New. - (vec_vspltisw): New. - (vec_vsrb): New. - (vec_vsrh): New. - (vec_vsrw): New. - (vec_vsrab): New. - (vec_vsrah): New. - (vec_vsraw): New. - (vec_vsr): New. - (vec_vsro): New. - (vec_stvx): New. - (vec_stvebx): New. - (vec_stvehx): New. - (vec_stvewx): New. - (vec_stvxl): New. - (vec_vsububm): New. - (vec_vsubuhm): New. - (vec_vsubuwm): New. - (vec_vsubfp): New. - (vec_vsubcuw): New. - (vec_vsububs): New. - (vec_vsubsbs): New. - (vec_vsubuhs): New. - (vec_vsubshs): New. - (vec_vsubuws): New. - (vec_vsubsws): New. - (vec_vsum4ubs): New. - (vec_vsum4sbs): New. - (vec_vsum4shs): New. - (vec_vsum2sws): New. - (vec_vsumsws): New. - (vec_vrfiz): New. - (vec_vupkhsb): New. - (vec_vupkhpx): New. - (vec_vupkhsh): New. - (vec_vupklsb): New. - (vec_vupklpx): New. - (vec_vupklsh): New. - (vec_vxor): New. - -2002-04-23 Zack Weinberg - - * doc/install.texi: Clarify which versions of alpha*-dec-osf* - are obsoleted. - -2002-04-23 Eric Botcazou - - PR c/5430 - * fold-const.c (split_tree): Add MINUS_LITP parameter; separate - added literals from substracted literals. - (associate_trees): Don't convert MINUS_EXPR into PLUS_EXPR. - (fold) [associate]: Preserve MINUS_EXPR if needed. - -2002-04-23 Tom Tromey - - * gcc.c: Added --resource. For PR java/6314. - -2002-04-23 David O'Brien - - * config/freebsd.h(OBJECT_FORMAT_ELF): Define. - -2002-04-23 David O'Brien - - * cp/g++spec.c: Use profiled libstdc++ and libm with -p/-pg. - * config/freebsd.h (MATH_LIBRARY_PROFILE): Use the _p verions of - these libraries. - -2002-04-23 Alan Modra - - PR target/6413 - * function.h: (struct function): Add profile_label_no field. - (current_function_profile_label_no): Define. - * function.c: (profile_label_no): New static var. - (expand_function_start): Increment it, and copy to - current_function_profile_label_no. - * output.h (profile_label_no): Delete. - * final.c (profile_label_no): Delete. - (profile_function): Use current_function_profile_label_no. - (final_end_function): Don't increment profile_label_no here. - * config/i386/i386.c (ix86_osf_output_function_prologue): Replace - profile_label_no with current_function_profile_label_no. - * config/pa/pa.c (current_function_number): Delete. - (pa_output_function_prologue): Don't output profile label here. - (hppa_profile_hook): Use label_no param rather than - current_function_number. - (FUNC_BEGIN_PROLOG_LABEL): Move to .. - * config/pa/pa.h: .. here. - (FUNCTION_PROFILER): Output profile label here. - -2002-04-23 Aldy Hernandez - - * config/rs6000/altivec.h (vec_step): Remove extraneous - parentheses. - (vec_ctu): Cast return. - -2002-04-22 Aldy Hernandez - - * config/rs6000/rs6000.md ("*movv4si_internal"): Change 'm' - constraint to 'o' for m=r and r=m alternatives. - ("*movv8hi_internal1"): Same. - ("*movv16qi_internal1"): Same. - ("*movv4sf_internal1"): Same. - -2002-04-22 Zack Weinberg - - * c-lex.c (lex_charconst): Call convert to get constant in - proper type; don't just smash the type field. - Fixes PR c/6300. - - * config.gcc: Add list of obsolete configurations. Disallow - building these without --enable-obsolete. - * doc/install.texi: Document --enable-obsolete and obsoletion - policy. Mention obsoletion of individual targets in - appropriate places. - -2002-04-22 Richard Henderson - - * config/sparc/sol2-bi.h (ASM_DEBUG_SPEC): New. - -2002-04-22 Mark Mitchell - - PR f/6138. - * function.c (fixup_memory_subreg): Add promoted_mode parameter. - (walk_fixup_memory_subreg): Likewise. - (fixup_var_refs_insn): Adjust accordingly. - (fixup_var_refs_1): Likewise. - -2002-04-22 Joel Sherrill - - * gthr-rtems.h: Correct prototypes to remove warnings. - -2002-04-22 Richard Henderson - - PR c/6344 - * alias.c (canon_true_dependence): Special case (mem:blk (scratch)). - - * gcse.c (free_insn_expr_list_list): New. - (clear_modify_mem_tables): Use it. Fix bit set usage. - (canon_list_insert): Use EXPR_LISTs for expressions. - (record_last_mem_set_info): Factor BLOCK_NUM (insn). - -2002-04-22 Ulrich Weigand - - * config/s390/linux.h: (LIBPATH_SPEC, LIBPATH_ARCH31_SPEC, - LIBPATH_ARCH64_SPEC): Define. - (EXTRA_SPECS): Add libpath, libpath_arch31, libpath_arch64. - (STARTFILE_SPEC, ENDFILE_SPEC): Define; use libpath. - (LINK_ARCH31_SPEC): Add libpath_arch31 to search path. - (LINK_ARCH64_SPEC): Add libpath_arch64 to search path. - -2002-04-22 Aldy Hernandez - - * config/rs6000/altivec.h (vec_xor): Add variant for both args - being vector signed int. - (vec_andc): Same. - (vec_xor): Add variant for both args being vector signed char. - Remove redundant variant. - (vec_andc): Same. - -2002-04-21 David S. Miller - - * config/sparc/sparc.md (set then compare DI mode peephole2): Fix - compare mode in output RTL. - -2002-04-22 David Edelsohn - - * config/rs6000/rs6000.c (rs6000_override_options): Correct - style and formatting of previous patch. - -2002-04-22 Alan Modra - - * config/rs6000/rs6000.c (rs6000_override_options): Always clear - flag_pic for ABI_AIX. - -2002-04-21 Neil Booth - - * cppmacro.c (funlike_invocation_p): Don't step back - over CPP_EOF. - -2002-04-21 David Edelsohn - - * config/rs6000/rs6000.c (output_profile_hook): Do not increment - labelno. - -2002-04-20 Joseph S. Myers - - * doc/invoke.texi: Remove Chill references. - * doc/gcc.texi: Update last modified date. - -2002-04-19 David S. Miller - - * config/sparc/linux.h (MD_FALLBACK_FRAME_STATE_FOR): Define. - * config/sparc/linux64.h (MD_FALLBACK_FRAME_STATE_FOR): Likewise. - -Sat Apr 20 02:17:38 CEST 2002 Jan Hubicka - - * i386.md (movsi_1, movhi_1): Force reload to use more flexible - alternative. - -2002-04-19 Jakub Jelinek - - PR c/6358 - * function.c: Reapply patch for c/6358. - (expand_function_end): Copy decl_rtl's mode, not - current_function_return_rtx mode. - -2002-04-19 Joel Sherrill - - * config/rtems.h (STARTFILE_SPEC, ENDFILE_SPEC): Fix for non-ELF - targets. - -2002-04-19 Tom Tromey - - * doc/install.texi (Specific): Update status of Solaris 2.8. - For PR libgcj/6158. - -2002-04-19 Dan Nicolaescu - Gerald Pfeifer - - * doc/install.texi (Specific, sparc-sun-solaris2*): Mention that - binutils 2.11.2 and higher generate smaller binaries than Sun's - native tools. - -2002-04-19 Mark Mitchell - - PR c++/6352 - * toplev.c (rest_of_compilation): Do not defer functions for which - TREE_SYMBOL_REFERENCED has already been set. - -2002-04-18 Richard Henderson - - * function.c: Revert patch for c/6358. - -2002-04-18 Richard Henderson - - * ifcvt.c (find_cond_trap): Handle cases with no proper THEN or JOIN - blocks. Handle multiple references to the TRAP block. Handle - non-adjacent THEN and OTHER blocks. - -2002-04-18 Richard Henderson - - * config/ia64/ia64.c (ia64_function_arg_pass_by_reference): Don't - crash with no type for by-mode libcalls. - - * config/ia64/ia64.md (conditional_trap): Fix predicate polarity. - -2002-04-18 David S. Miller - - * config/sparc/sparc.h (BRANCH_COST): Define. - - * fold-const.c (BRANCH_COST): Don't provide default here, expr.h - does it. - -2002-04-18 Richard Henderson - - * config/ia64/ia64.c (ia64_function_arg_pass_by_reference): New. - (ia64_va_arg): Expect variable sized types by reference. - * config/ia64/ia64-protos.h: Update. - * config/ia64/ia64.h (FUNCTION_ARG_PASS_BY_REFERENCE): Use - ia64_function_arg_pass_by_reference. - -2002-04-18 Hans-Peter Nilsson - - * flow.c (update_life_info): Ignore return value of cleanup_cfg. - Mask out PROP_SCAN_DEAD_CODE | PROP_KILL_DEAD_CODE in - propagate_block calls after relaxation loop using new variable - stabilized_prop_flags. - -2002-04-18 Richard Henderson - - * ifcvt.c: Include except.h. - (block_has_only_trap): Break out from find_cond_trap. - (find_cond_trap): Use it. Always delete the trap block. - (merge_if_block): Allow then block null. Be less simplistic about - what insns can end a block. - * Makefile.in (ifcvt.o): Depend on except.h. - - * config/ia64/ia64.md (trap, conditional_trap): New. - -2002-04-18 Jakub Jelinek - - PR c/6358 - * function.c (assign_parms): Assign hard current_function_return_rtx - register here... - (expand_function_end): ...not here. - -2002-04-18 Gerald Pfeifer - - * doc/install.texi (Downloading the source): Do not mention Chill - any longer, but mention Ada. - (Configuration): Do not mention Chill any longer. - -2002-04-18 Hans-Peter Nilsson - - * config/cris/cris.h (TARGET_VERSION): Remove local version number. - -Thu Apr 18 15:49:12 CEST 2002 Jan Hubicka - - * i386.h (SSE_FLOAT_MODE_P): Kill bogus TARGET_SSE_MATH check. - * i386.md (sse_mov?fcc*): Swap operands for cases they will be swapped - later. - -2002-04-18 Jakub Jelinek - - PR middle-end/6205 - * config/i386/i386.md (movsf_1): Use pxor only if TARGET_SSE2, - otherwise xorps. - -2002-04-18 Loren J. Rittle - - Revert this change: - - * doc/install.texi (Installing GCC: Configuration): Clarify - the only supported ways to configure gcc. - -2002-04-17 Dale Johannesen - - * config/rs6000/rs6000.c (rs6000_emit_cmove): Fail if modes of - comparison operands do not match each other or if modes of - conditions do not match result. - (rs6000_output_function_prologue): Compute instruction addresses. - (rs6000_output_function_epilogue): Likewise. - -2002-04-17 Ulrich Weigand - - * config/s390/s390.c (legitimize_pic_address): Do not generate - illegal address constant without CONST. - -2002-04-17 Kaveh R. Ghazi - - * sparc/linux64.h (CC1_SPEC): Error for -m32 and -m64. - * sparc/netbsd-elf.h (CC1_SPEC32, CC1_SPEC64): Likewise. - -2002-04-17 Ulrich Weigand - - PR optimization/6305 - * config/s390/s390.c (s390_expand_plus_operand): Use find_replacement - to make sure previous reloads are taken into account. Generate - better code if one operand is an in-range immediate constant. - -2002-04-16 Andrew Haley - - * doc/install.texi (Building): libgcj requires GNU make. - -2002-04-17 Jakub Jelinek - - PR bootstrap/6315 - * config/sparc/sparc.md (movtf reg<-reg split): Allow spliting - even if hard quad and register is not floating. - (movtf reg<-mem split): Disallow splitting if hard quad and - register is floating. - (movtf mem<-reg split): Likewise. - * config/sparc/sparc.c (fp_register_operand): New predicate. - * config/sparc/sparc.h (PREDICATE_CODES): Add fp_register_operand. - -2002-04-17 Zack Weinberg - - * Makefile.in (PROTO_OBJS): Add cppdefault.o. - (protoize.o): Take $(PREPROCESSOR_DEFINES) off command line. - (unprotoize.o): Ditto. Build from protoize.c. Define - UNPROTOIZE on command line. - * protoize.c: Include cppdefault.h. Delete include_defaults. - (in_system_include_dir): Use cpp_include_defaults (defined in - cppdefault.o). - * unprotoize.c: Delete file. - -2002-04-17 Aldy Hernandez - - * config/rs6000/altivec.h (vec_ld): Add array variants. - (vec_lde): Same. - (vec_ldl): Same. - -2002-04-17 Alan Matsuoka - Aldy Hernandez - - * config/rs6000/altivec.h: Define __ALTIVEC__. - (bool): New. - (__pixel): New. - (pixel): New. - (vec_cfux): New. - (vec_vmaddfp): New. - (vec_vsldoi): New. - Add parentheses to all macro arguments. - -2002-04-16 Richard Henderson - - PR c++/6320 - * except.c (remove_eh_handler): Insert inner regions at beginning - of sibling chain. Refactor expressions. - -2002-04-16 Mark Mitchell - - * c-common.h (STMT_EXPR_NO_SCOPE): New macro. - * c-common.c (c_expand_expr): Respect STMT_EXPR_NO_SCOPE. - * tree.h (expand_start_stmt_expr): Update prototype. - * stmt.c (expand_start_stmt_expr): Add has_scope parameter. - * tree-inline.c (expand_call_inline): Set STMT_EXPR_NO_SCOPE - on the STMT_EXPR created for the inline function. - -2002-04-16 Richard Henderson - - * config/sparc/sol2-bi.h (AS_SPARC64_FLAG): New. - * config/sparc/sol2-gas-bi.h: New file. - * config.gcc (sparc*-solaris): Add it as needed. - * configure.in (AS_SPARC64_FLAG): Remove check. - * config.in, configure: Regenerate. - - * config/sparc/sol2-bi.h (CC1_SPEC): Error for -m32 and -m64. - -2002-04-16 Richard Henderson - - * config/mips/mips.c (override_options): Don't override N32 for - a 64-bit ISA. - - PR c/6202 - * config/mips/mips.md (can_delay): Split out of existing define_delays. - (HILO_delay): Set can_delay false. - -2002-04-16 Paolo Carlini - - * c-parse.in (poplevel, compstmt_start, compstmt_primary_start): - Add ending ';', in accordance with POSIX. - -2002-04-16 Richard Henderson - - * config.gcc (sparcv9-solaris): Configure for 64-bit default. - Adjust tm_file order to get TARGET_DEFAULT set properly. - (sparc-solaris): Configure 2.[78] for 64-bit multilibs. - * doc/install.texi (sparc-solaris): Update. - -2002-04-16 Hartmut Penner - - PR target/6305 - * config/s390/s390.md (mulsidi3): Set both subregs of the - multiword register. - -2002-04-16 Aldy Hernandez - - * config/rs6000/altivec.h (vec_addc): Type check. - -2002-04-16 Jakub Jelinek - - PR middle-end/6279 - * expr.c (store_expr): Don't copy if DECL_RTL (exp) == target. - - * expr.c (safe_from_p): Cleanup: use DECL_RTL_IF_SET. - -2002-04-15 Richard Henderson - - * config/mips/abi64.h (SUBTARGET_CONDITIONAL_REGISTER_USAGE): Set - call_really_used_regs too. - -2002-04-15 David S. Miller - - * rtlanal.c (note_stores): Don't present PARALLEL SET_DESTs - as being CLOBBERed. - -2002-04-16 Jakub Jelinek - - PR c/6290 - * config/rs6000/rs6000.c (easy_vector_constant): Return 1 if the - CONST_VECTOR is { 0, ... 0 }. - -2002-04-15 Loren J. Rittle - - * doc/install.texi (Installing GCC: Configuration): Clarify - the only supported ways to configure gcc. - -2002-04-15 Richard Henderson - - * config/alpha/linux.h, config/arm/linux-elf.h, config/i370/linux.h, - config/i386/linux-aout.h, config/i386/linux-oldld.h, - config/i386/linux.h, config/i386/linux64.h, config/ia64/linux.h, - config/m68k/linux-aout.h, config/m68k/linux.h, config/mips/linux.h, - config/pa/pa-linux.h, config/pj/linux.h, config/s390/linux.h, - config/sh/linux.h, config/sparc/linux-aout.h, config/sparc/linux.h, - config/sparc/linux64.h, config/xtensa/linux.h (CPP_PREDEFINES): - Define __gnu_linux__, not gnu_linux. - * config/rs6000/sysv4.h (CPP_OS_GNU_SPEC): Likewise for gnu_hurd. - -2002-04-15 Mark Mitchell - - Remove Chill front end. - * gcc.c (default_compilers): Remove Chill entries. - * ch: Remove directory. - * doc/frontends.texi: Remove information about Chill. - * doc/sourcebuild.texi: Likewise. - * doc/standards.texi: Likewise. - -2002-04-15 Douglas B Rupp - - * config/alpha/vms.h (INCLUDE_DEFAULTS): Add /gnu/lib/gcc-lib/include. - (LONGLONG_STANDALONE): Define. - -2002-04-15 David S. Miller - - * config/sparc/sparc.c (sparc_emit_float_lib_cmp): - Call emit_library_call with LCT_NORMAL. - (sparc_initialize_trampoline): Use LCT_foo instead of - magic constant in emit_library_call invocations. - (sparc64_initialize_trampoline): Likewise. - (sparc_profile_hook): Likewise. - * config/sparc/sparc.md: Likewise. - - * config/sparc/sparc.c (sparc_extra_constraint_check): - Fix type of argument 'c'. - * config/sparc/sparc-protos.h (sparc_extra_constraint_check): - Likewise. - -2002-04-14 Andreas Schwab - - * config/ia64/linux.h (CPP_PREDEFINES): Fix missing backslash. - -2002-04-14 Jeroen Dobbelaere - - * config/arm/linux-elf.h (CPLUSPLUS_CPP_SPEC): Define. - -2002-04-13 Mark Mitchell - - * config/alpha/linux.h (CPP_PREDEFINES): Fix typo. - * config/i386/gnu.h (CPP_PREDEFINES): Define __gnu_hurd__, - not gnu_hurd. - -2002-04-13 Hans-Peter Nilsson - - * config/cris/linux.h (CRIS_CPP_SUBTARGET_SPEC): Fix typo. - -2002-04-13 Joel Sherrill - - * config/sparc/t-elf: Enable v8 multilibs. Impacts - sparc-elf and sparc-rtems targets. - -2002-04-13 Mark Mitchell - - * alpha/linux.h: Define __gnu_linux__ wherever __linux__ is - defined, and __gnu_hurd__ wherever __GNU__ is defined. - * arm/linux-elf.h: Likewise. - * cris/aout.h: Likewise. - * cris/linux.h: Likewise. - * i370/linux.h: Likewise. - * i386/gnu.h: Likewise. - * i386/linux-aout.h: Likewise. - * i386/linux-oldld.h: Likewise. - * i386/linux.h: Likewise. - * i386/linux64.h: Likewise. - * ia64/linux.h: Likewise. - * m68k/linux-aout.h: Likewise. - * m68k/linux.h: Likewise. - * mips/linux.h: Likewise. - * pa/pa-linux.h: Likewise. - * pj/linux.h: Likewise. - * rs6000/sysv4.h: Likewise. - * s390/linux.h: Likewise. - * sh/linux.h: Likewise. - * sparc/linux-aout.h: Likewise. - * sparc/linux.h: Likewise. - * sparc/linux64.h: Likewise. - * xtensa/linux.h: Likewise. - -2002-04-13 Andreas Schwab - - * config/ia64/ia64.h (CPP_SPEC): Include %(cpp_cpu). - -2002-04-12 Mark Mitchell - - Revert these changes: - - 2002-04-06 Mark Mitchell - - PR c++/5571 - * stor-layout.c (layout_decl): Reset the RTL for the decl. - - 2002-03-15 Mark Mitchell - - * expr.c (expand_expr): Tidy. - -2002-04-12 Richard Henderson - - * config.gcc (sparcv9-*-solaris2): Default to 32-bit code. - (sparc*-*-solaris): Clean up header files. - * configure.in (AS_SPARC64_FLAG): Error out if can't find it - and plan on generating 64-bit code. - * toplev.c (decode_g_option): Remove LINKER_DOES_NOT_WORK_WITH_DWARF2. - * config/sparc/sol2-64.h: Delete and reuse for default 64-bit code. - * config/sparc/sol2-sld-64.h: Rename ... - * config/sparc/sol2-bi.h: ... here. Remove the bits that checked - for AS_SPARC64_FLAG not defined. - * config/sparc/sol2-gld-bi.h: New. - * config/sparc/sol2-sld.h: Remove. - * config/sparc/sol26-sld.h: New. - * config/sparc/sol2.h: Tidy comments. - * doc/install.texi: Document sparc-solaris configury changes. - -2002-04-12 Richard Henderson - - * recog.c (offsettable_address_p): Match the logic in adjust_address. - - * config/sparc/sparc.h (LEGITIMIZE_RELOAD_ADDRESS): Handle TFmode - in 64-bit mode only. Use only for 32-bit or MEDLOW. - -2002-04-12 Rainer Orth - - * config/alpha/osf.h (LINK_SPEC): Pass -S to silence ld warnings. - -Fri Apr 12 15:42:59 2002 Jeffrey A Law (law@redhat.com) - - * pa.c (pa_can_combine_p): Call extract_insn before calling - constrain_operands. - -2002-04-12 Douglas B Rupp - - * hwint.h (HAVE___INT64): Correct spelling. - - * config/i386/i386-interix.h (EH_FRAME_IN_DATA_SECTION): Define. - (TARGET_ASM_NAMED_SECTION, RETURN_IN_MEMORY) Define. - (DEFAULT_PCC_STRUCT_RETURN): Define as 0. - (CPP_PREDEFINES): Handle __declspec. - * config/i386/t-interix (USER_H): Remove. - -2002-04-12 DJ Delorie - - * integrate.c (compare_blocks): Make comparisons safe for when - sizeof(int) < sizeof(char *). - (find_block): Likewise. - -2002-04-12 Andreas Schwab - - * config/ia64/ia64.h (ASM_SPEC): Moved from here ... - * config/ia64/sysv4.h (ASM_SPEC): ... to here, so that it - overrides the definition in config/svr4.h. - -2002-04-12 Eric Norum - - * config/rtems.h, config/a29k/rtems.h, config/arm/rtems-elf.h, - config/c4x/rtems.h, config/h8300/rtems.h, config/i386/rtems.h, - config/i386/rtemself.h, config/i960/rtems.h, config/m68k/rtems.h, - config/m68k/rtemself.h, config/mips/rtems.h, config/mips/rtems64.h, - config/pa/rtems.h, config/rs6000/rtems.h, config/sh/rtems.h, - config/sh/rtemself.h, config/sparc/rtems.h, config/sparc/rtemself.h, - config/v850/rtems.h (*-rtems*): Cleanup pass to move common - definitions to config/rtems.h and make the targets more similar. - -Fri Apr 12 08:06:54 2002 Richard Kenner - - * expr.c (expand_assigment): Remove duplicate conversions #ifdef - POINTERS_EXTEND_UNSIGNED. - (store_constructor, expand_expr, case COMPONENT_REF): Likewise. - (store_expr): Use TYPE_MODE (sizetype), not ptr_mode. - - * emit-rtl.c (widen_memory_access): Don't do anything if MEMOFFSET - not specified. - -2002-04-12 Hans-Peter Nilsson - - * function.c (fixup_var_refs_1) : - For paradoxical (subreg VAR), replace VAR, don't try the subreg. - -2002-04-12 Andreas Schwab - - * config/ia64/ia64.h (EXTRA_SPECS): Fix missing backslash. - -2002-04-12 Richard Henderson - - PR bootstrap/4191 - * config/d30v/d30v.h (INIT_SECTION_ASM_OP): Don't undef. - - * flow.c (mark_used_reg): Manage reg_cond_dead properly for - modes spanning multiple hard regs. - - * recog.c (peephole2_optimize): Rebuild jump labels as needed. - -2002-04-11 John David Anglin - - * pa.c (output_millicode_call): Check attribute type as well as length - when length is 28. - -2002-04-11 David O'Brien - - * config/freebsd.h (NO_IMPLICIT_EXTERN_C, SCCS_DIRECTIVE): Give value. - (DEFAULT_PCC_STRUCT_RETURN) Do not redefine. - (USER_LABEL_PREFIX, HANDLE_SYSV_PRAGMA, IDENT_ASM_OP, - DWARF2_DEBUGGING_INFO, DBX_DEBUGGING_INFO, PREFERRED_DEBUGGING_TYPE): - elfos.h and dbxelf.h values are fine now. - * config/i386/freebsd.h, config/alpha/freebsd.h - (DEFAULT_PCC_STRUCT_RETURN): Define to 0. - -2002-04-11 David O'Brien - - * config/ia64/aix.h (CPP_PREDEFINES): Do not define _LP64/__LP64__ - or set Acpu or Amachine. Reformat. - (ASM_SPEC, DONT_USE_BUILTIN_SETJMP, PROFILE_BEFORE_PROLOGUE): Do not - define. - (LINK_SPEC): Do not need to undef. - * config/ia64/elf.h (ASM_EXTRA_SPEC): Define. - * config/ia64/freebsd.h (LINK_SPEC): Do not need to undef. - (ASM_SPEC, DONT_USE_BUILTIN_SETJMP, PROFILE_BEFORE_PROLOGUE): Do not - define. - * config/ia64/hpux.h (ASM_EXTRA_SPEC): Define. - (ASM_SPEC): Do not define, use ASM_EXTRA_SPEC instead. - (LINK_SPEC): Do not need to undef. - (DONT_USE_BUILTIN_SETJMP): Do not define. - * config/ia64/ia64.h (ASM_SPEC, ASM_EXTRA_SPEC): Add. - (CPP_CPU_SPEC): Define _LP64, set Acpu and Amachine. Remove -Dia64. - (DONT_USE_BUILTIN_SETJMP, PROFILE_BEFORE_PROLOGUE): Define. - Remove trailing spaces. - * config/ia64/linux.h (CPP_PREDEFINES): Do not define _LP64/__LP64__, - __ELF__, or set Acpu or Amachine. Reformat. - (ASM_SPEC, DONT_USE_BUILTIN_SETJMP, PROFILE_BEFORE_PROLOGUE): Do not - define. - -2002-04-11 David O'Brien - - * config.gcc (ia64-*-freebsd*): Fix ordering of tm_files to match - all other *-*-freebsd* targets. - -2002-04-11 Richard Sandiford - - * doc/extend.texi: Remove old claim that typedefs cannot have - an alignment attribute. - -2002-04-11 Jakub Jelinek - - PR optimization/6177 - * expr.c (expand_expr) [COMPONENT_REF]: Handle op0 CONCAT if - bitpos is 0 and bitsize CONCAT size. - -2002-04-11 Jakub Jelinek - - PR c/6223 - * combine.c (if_then_else_cond): Use trunc_int_for_mode on nz. - -2002-04-11 David O'Brien - - * config/alpha/freebsd.h: Minor reformatting. - (CPP_SPEC): Define ELF and add cpp_subtarget. - (ASM_SPEC): No longer needed. - -2002-04-11 Richard Henderson - - * config/sparc/sparc.md (movdi_insn_sp32): Add o/J alternative. - (movdi_insn_sp32_v9): Likewise. Only allow stx with aligned memory. - (dimode mem/zero splitter): New. - -2002-04-11 Hans-Peter Nilsson - - * config/cris/cris.c (cris_override_options): Tweak error message - for PIC not implemented. - - * config/cris/cris.h: Tweak comments related to parameter-passing. - - * config/cris/t-cris (TARGET_LIBGCC2_CFLAGS): Don't -Dinhibit_libc here. - - * config/cris/cris.c (cris_target_asm_function_prologue): Cast - uses of PIC_OFFSET_TABLE_REGNUM to int to silence warnings. - (cris_target_asm_function_epilogue): Ditto. - (cris_initial_frame_pointer_offset): Ditto. - (cris_simple_epilogue): Ditto. - (cris_expand_builtin_va_arg): Variable-size types come in - by-reference. - -2002-04-10 Richard Henderson - - * except.c (add_ehl_entry): Allow duplicates after landing pad - creation. - -2002-04-10 David Edelsohn - - * config/rs6000/t-aix43 (SHLIB_NM_FLAGS): Add -X32_64. - -2002-04-10 Ulrich Weigand - - * reload1.c (choose_reload_regs): HARD_FRAME_POINTER_REGNUM - is only used as frame pointer when frame_pointer_needed is true. - -2002-04-10 Richard Earnshaw - - PR target/817 - * arm.md (arm_movdi): Adjust neg_pool_range attribute to allow - for the fact that the pool entry uses two words. - (movdf_hard_insn): Similarly. Also, ADR instruction can span - 1k bytes. - (movdf_soft_insn): Similarly. - (movxf_hard_insn): Adjust neg_pool_range attribute to allow - for the fact that the pool entry uses three words. - -2002-04-10 Richard Henderson - - * expr.c (expand_expr) [INTEGER_CST]: Don't force into registers - if EXPAND_INITIALIZER. - -2002-04-10 Alan Modra - - PR optimization/6233 - * rtlanal.c (pure_call_p): New function. - * rtl.h (pure_call_p): Declare. - * loop.c (prescan_loop): Use it to set has_nonconst_call. - * gcse.c (store_killed_in_insn): Use pure_call_p here too. - -2002-04-09 Richard Henderson - - * config/alpha/alpha.md (movdi_er_maybe_g): New. - * config/alpha/alpha.c (alpha_expand_mov): Use it. - -2002-04-09 Richard Henderson - - PR c/5078 - * expr.c (expand_expr) [INTEGER_CST]: Force overflows into registers. - -2002-04-09 Andrew MacLeod - - * expr.c (expand_expr): A RESULT_DECL is part of a call. - -2002-04-09 Richard Henderson - - * cfg.c (expunge_block): Decrement num_elements here ... - (expunge_block_nocompact): ... not here. - * cfgcleanup.c (delete_unreachable_blocks): Set num_elements. - -2002-04-09 Richard Henderson - - * basic-block.h (flow_delete_block_noexpunge): Declare. - (expunge_block_nocompact): Declare. - * cfg.c (expunge_block_nocompact): Split out from ... - (expunge_block): ... here. - * cfgrtl.c (can_delete_label_p): Don't use exception_handler_labels. - (flow_delete_block_noexpunge): Split out from ... - (flow_delete_block): ... here. - * cfgcleanup.c (delete_unreachable_blocks): Compact while - removing dead blocks. - * except.c (exception_handler_labels): Remove. - (exception_handler_label_map): New. - (struct eh_region): Add aka member. - (mark_ehl_map_entry, mark_ehl_map, free_region): New. - (ehl_hash, ehl_eq, ehl_free, add_ehl_entry): New. - (for_each_eh_label, for_each_eh_label_1): New. - (init_eh): Register exception_handler_label_map. - (free_eh_status): Use free_region. - (find_exception_handler_labels): Use the map, not the list. - (remove_exception_handler_label): Likewise. - (maybe_remove_eh_handler): Likewise. - (remove_eh_handler): Use the region aka bitmap. - * except.h (exception_handler_labels): Remove. - (for_each_eh_label): Declare. - * jump.c (rebuild_jump_labels): Don't check exception_handler_labels. - * loop.c (invalidate_loops_containing_label): New. - (find_and_verify_loops): Use it. Use for_each_eh_label. - * sched-rgn.c (is_cfg_nonregular): Use - current_function_has_exception_handlers. - -2002-04-08 Richard Henderson - - * reorg.c (get_branch_condition): Use reversed_comparison_code. - -2002-04-08 Stephane Carrez - - * config/m68hc11/larith.asm (__map_data_section): Fix condition - and optimize for size. - (__do_global_ctors): Fix pointer comparison. - (__do_global_dtors): Likewise. - -2002-04-09 David S. Miller - - * config/sparc/sparc.c (sparc_extra_constraint_check): New - function, implementing EXTRA_CONSTRAINTS. For memory constraints, - allow reloading pseudos. - * config/sparc/sparc.h (EXTRA_CONSTRAINTS): Use it. - * config/sparc/sparc-protos.h: Declare it. - - * config/sparc/sparc.c (const64_is_2insns): Kill signed vs. - unsigned comparison warning. - (output_restore_regs): Mark leaf_function as unused. - -Tue Apr 9 09:35:45 2002 Richard Kenner - - * expr.c (is_aligning_offset): New function. - (expand_expr, case COMPONENT_EXPR): Call it. - -2002-04-09 Alan Modra - - * configure.in (auto-build.h): Use target_alias and build_alias - when running configure. - (gcc_cv_as): Use $target_alias in directory searchs rather than - $target. Heed program_prefix and program_transform_name. Search - for gas in cross-compiler case too. "test -x" rather than "test -f". - (gcc_cv_ld): Likewise. - (gcc_cv_nm): Set for cross compilers too. Heed program_prefix and - program_transform_name. - (gcc_cv_objdump): Likewise. - * configure: Regenerate. - -2002-04-08 Hans-Peter Nilsson - - * config/mmix/t-mmix (TARGET_LIBGCC2_CFLAGS): Don't -Dinhibit_libc - here. - - * config/mmix/mmix.h (INITIAL_ELIMINATION_OFFSET): Remove spurious - semicolon. - - * config/mmix/mmix.c (mmix_expand_builtin_va_arg): Variable-size - types come in by-reference. Fix typo in comment. - -2002-04-08 Richard Henderson - - PR opt/6007 - * toplev.c (rest_of_compilation): Disable cross-jumping for - highly connected graphs. - -2002-04-08 David S. Miller - - PR target/6082 - * config/sparc/freebsd.h (SPARC_DEFAULT_CMODEL): Set to CM_MEDLOW - - Make init_priority work on Sparc when using GNU ld. - * config/sparc/linux.h, config/sparc/linux64.h, - config/sparc/netbsd-elf.h, config/sparc/freebsd.h - (CTORS_SECTION_ASM_OP, DTORS_SECTION_ASM_OP): Undefine. - * config/sparc/sol2-gld.h: New file to do the same. - * config.gcc (sparc*-*-solaris2*): If gnu_ld=yes add - sparc/sol2-gld.h to tm_file. - - PR optimization/4328 - * config/sparc/sparc.h (EXTRA_CONSTRAINT): Add new constraint 'W'. - * doc/md.texi: Document it. - * config/sparc/sparc.md (movdi_insn_sp64_novis, - movdi_insn_sp64_vis, movdf_insn_sp32, movdf_insn_v9only_novis, - movdf_insn_v9only_vis, movdf_insn_sp64_novis, - movdf_insn_sp64_vis): Use it as MEM constraing with 'e' registers. - * config/sparc/sparc.c (mem_min_alignment): Fix comment. - -2002-04-08 Gerald Pfeifer - - * doc/contrib.texi (Contributors): Add John David Anglin and Loren - J. Rittle (the latter also to Testers). Update David O'Brien's entry. - -2002-04-07 David S. Miller - - * config.gcc (sparc64-*-linux*): Add t-crtfm to tmake_file. - -2002-04-07 John David Anglin - - PR 5933 - * pa.h (ASM_OUTPUT_MI_THUNK): Use indirect jump to target function when - generating 32-bit pic code. - -2002-04-07 Franz Sirl - - * config/rs6000/rs6000.h (RS6000_PIC_OFFSET_TABLE_REGNUM): New. - (PIC_OFFSET_TABLE_REGNUM): Use it and return INVALID_REGNUM if - !flag_pic. - (CONDITIONAL_REGISTER_USAGE): Adjust accordingly. - * config/rs6000/rs6000.h: Use RS6000_PIC_OFFSET_TABLE_REGNUM instead - of PIC_OFFSET_TABLE_REGNUM thruout. - * config/rs6000/rs6000.md: Likewise. - * config/rs6000/darwin.h: Likewise. - -2002-04-06 John David Anglin - - * reorg.c (dbr_schedule): Don't reposition prologue and epilogue notes. - -2002-04-06 Mark Mitchell - - PR c++/5571 - * stor-layout.c (layout_decl): Reset the RTL for the decl. - - PR opt/5120 - * sibcall.c (optimize_sibling_and_tail_recursive_call): Clear - RTX_UNCHANGING_P for the functions arguments when a tail call - is made. - -2002-04-06 Jason Merrill - - * toplev.c (flag_no_inline, flag_really_no_inline): Default to 2. - (parse_options_and_default_flags): Set them appropriately. - * c-common.c (c_common_post_options): Don't set flag_really_no_inline. - -Sat Apr 6 18:26:32 CEST 2002 Jan Hubicka - - * ifcvt.c (if_convert): Clear aux fields of blocks. - -2002-04-05 David S. Miller - - * config/sparc/freebsd.h (ENDFILE_SPEC): Add crtfastmath bits. - * config.gcc (sparc64-wrs-vxworks, sparc-*-chorusos, - sparc-*-rtems*, sparclite-*-elf* sparc86x-*-elf*, sparc64-*-elf*, - {sparc64,ultrasparc}-*-freebsd*): Add sparc/t-crtfm to tmake_file. - -2002-04-05 Jan Hubicka - - * optabs.c (emit_no_conflict_block, emit_libcall_block): Avoid nesting - of libcall regions. - -2002-04-05 David S. Miller - - * config/sparc/sparc.c (sparc_nonflat_function_epilogue): If we - are not going to emit return instructions, emit at least a nop - for the sake of sane backtraces. - -2002-04-05 Jakub Jelinek - - * mklibgcc.in: Use separate libgcc.map for each multilib. - * Makefile.in (distclean): Don't remove libgcc.map here. - -2002-04-05 Jakub Jelinek - - * Makefile.in (s-mlib): Handle --disable-multilib by separate - genmultilib invocation. - -2002-04-04 David S. Miller - - * config/sparc/crtfastmath.c: New file. - * config/sparc/t-crtfm: New file. - * config/sparc/linux.h (ENDFILE_SPEC): Use crtfastmath.o - * config/sparc/linux64.h (ENDFILE_SPEC): Likewise. - * config/sparc/sol2.h (ENDFILE_SPEC): Likewise. - * config/sparc/sp64-elf.h (ENDFILE_SPEC): Likewise. - * config/sparc/elf.h (ENDFILE_SPEC): Likewise. - * config.gcc (sparc*-*-{elf*,linux*,solaris2*}): Add - sparc/t-crtfm to tmake_file. - -2002-04-05 Alan Modra - - * config/rs6000/t-linux64 (EXTRA_MULTILIB_PARTS): Add crtsavres.o - Add rules to make null object file. - -2002-04-04 David S. Miller - - * calls.c (store_one_arg): If ECF_SIBCALL, use tail_call_reg. - -2002-04-04 Richard Henderson - - PR opt/6165 - * alias.c (true_dependence): Force (mem:blk (scratch)) to conflict. - (write_dependence_p): Likewise. - -2002-04-04 Richard Henderson - - * predict.c (estimate_bb_frequencies): Do frequency calculation - with a volatile temporary. - -2002-04-04 Ulrich Weigand - - * config/s390/linux.h (LOCAL_LABEL_PREFIX): Define. - -2002-04-04 Jakub Jelinek - - PR c++/6119 - * final.c (final_start_function): Don't bump profile_label_no here... - (final_end_function): ...but here. - -2002-04-04 Jakub Jelinek - - * config/sparc/sparc.md (pic): New attribute. - (do_builtin_setjmp_setup): Save %fp, %i7 and %l7 for TARGET_V9 - into stack slots. - (split after do_builtin_setjmp_setup): New. - -2002-04-04 Jakub Jelinek - - PR fortran/6106 - * config/sparc/sparc.h (MIN_UNITS_PER_WORD): Backout 2001-01-01 - change. - -2002-04-04 Jakub Jelinek - - * config/sparc/sparc.c (sparc_va_arg): Adjust va_list by - UNITS_PER_WORD for zero sized aggregates. - -2002-04-04 Gerald Pfeifer - - * doc/contrib.texi (Contributors): Add David O'Brien. - -2002-04-03 David S. Miller - - * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): No need for a new - one-character spec for this, just use %(link_gcc_c_sequence). - -2002-04-04 Alan Modra - - * config/rs6000/t-linux64 (EXTRA_MULTILIB_PARTS): Define. - -2002-04-03 David S. Miller - - * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): New spec to override the gcc/c - library sequence passed to the linker. - (LINK_COMMAND_SPEC): Use it. - * doc/tm.texi: Document it, and mention from LINK_COMMAND_SPEC as - a macro a target can use to avoid overriding LINK_COMMAND_SPEC. - * config/sparc/sparc.h (LINK_GCC_C_SEQUENCE_SPEC): Define. - -2002-04-03 Jason Merrill - - PR c++/5636 - * tree.h (CLEANUP_EH_ONLY): New macro. - * stmt.c (expand_decl_cleanup_eh): New fn. - (expand_cleanups): Check CLEANUP_EH_ONLY. - * c-semantics.c (genrtl_decl_cleanup): Just take the CLEANUP_STMT. - Use expand_decl_cleanup_eh. - (expand_stmt): Adjust. - * c-common.h: Adjust prototype. - -2002-04-03 Jakub Jelinek - - * configure.in (HAVE_SPARC_UA_PCREL_HIDDEN): Test whether %r_disp32() - works properly with .hidden symbols. - * configure: Rebuilt. - * config.in: Rebuilt. - * config/sparc/sparc.h (ASM_PREFERRED_EH_DATA_FORMAT): Use - DW_EH_PE_absptr for flag_pic && GLOBAL if %r_disp32() doesn't work - properly with .hidden symbols. - -2002-04-03 Jakub Jelinek - - PR middle-end/6102 - * df.c (df_insn_refs_record): Use XEXP not SET_DEST to access - USE argument. - -2002-04-03 Richard Henderson - - PR opt/4120 - * sched-rgn.c (sets_likely_spilled): New. - (sets_likely_spilled_1): New. - (add_branch_dependences): Use it. - -2002-04-02 Richard Henderson - - PR opt/4311 - * loop.h (LOOP_FIRST_PASS): New. - * loop.c (strength_reduce): Mind it when deciding to unroll. - * toplev.c (rest_of_compilation): Set it. - -2002-04-02 David S. Miller - - * config/sparc/sparc.md (ldd peephole2s): Fix final arg to - mems_ok_for_ldd_peep when the order of the loads being examined - is reversed. - * config/sparc/sparc.c (mems_ok_for_ldd_peep): Expand upon - existing comment to increase comprehension of this situation. - -2002-04-02 Richard Henderson - - * libgcc2.c (__bb_exit_func): Revert 03-31 change. - -2002-04-02 Eric Botcazou - Richard Henderson - - PR c/5484 - * function.c (assign_temp): Accept either type or decl argument. - Detect variables whose size is too large to fit into an integer. - * stmt.c (expand_decl): Pass the decl, not the type. - -2002-04-02 David O'Brien - - * protoize.c: Match include directory usage with cppdefault.c. - -2002-04-03 Jeffrey A Law (law@redhat.com) - Hans-Peter Nilsson - - * combine.c (simplify_comparison): Avoid narrowing a comparison - with a paradoxical subreg when doing so would drop signficant bits. - -2002-04-02 David Edelsohn - - * config/rs6000/rs6000.h (WIDEST_HARDWARE_FP_SIZE): Define. - -2002-04-02 Alan Modra - - * config/rs6000/rs6000.md (ctrdi*): Add FPR constraint and - associated splitter. Remove MQ constraint. - (ctrdi_internal4): Correct CCmode clobber. - -2002-04-03 Hans-Peter Nilsson - - * config/mmix/mmix.md (define_constants): Remove misleading - FIXME. Add MMIX_fp_rO_OFFSET. - ("nonlocal_goto_receiver"): Don't have stack-frame address of - saved rO as part of the pattern. Remove FIXME. - ("*nonlocal_goto_receiver_expanded"): Similar. Generate address - here, at output-time. - * config/mmix/crti.asm (_init): Register _fini with atexit. - * config/mmix/crtn.asm (_fini): Add omitted "POP 0,0". - * config/mmix/mmix.c (mmix_target_asm_function_prologue): Correct - unwind information when frame_pointer_needed. - (mmix_assemble_integer): Tweak wording in comment. - -2002-04-02 Richard Henderson - - PR opt/3967 - * local-alloc.c (contains_replace_regs): LO_SUM may contain - replace regs. - -2002-04-02 Richard Henderson - - * doc/standards.texi: Document required freestanding libc entry points. - -2002-04-02 Alexandre Oliva - - * config/mips/mips.c (mips_va_arg): Apply big-endianness address - offset before loading address of argument passed by transparent - reference. - -2002-04-02 Richard Henderson - - * fixinc/inclhack.def (AAB_solaris_sys_varargs_h): Move and - rename solaris_sys_varargs_h. - -Tue Apr 2 06:47:40 2002 Richard Kenner - - * stor-layout.c (layout_type, case ARRAY_TYPE): Give one-element array - the same mode as its component. - -2002-04-02 Richard Henderson - - PR opt/420 - * config/m68k/m68k.md (dbcc peepholes): Match four forms of dbra. - -2002-04-01 Richard Henderson - - PR target/1538 - * fixinc/inclhack.def (solaris_sys_varargs_h): New. - * fixinc/fixincl.x: Rebuild. - -2002-04-01 Richard Henderson - - * config/ia64/unwind-ia64.c: Include ia64intrin.h. - (atomic_alloc, atomic_free): New. - (SIZE, MASK_FOR, PTR_IN): New. - (emergency_reg_state, emergency_reg_state_free): New. - (emergency_labeled_state, emergency_labeled_state_free): New. - (reg_state_alloced, labeled_state_alloced): New. - (alloc_reg_state, free_reg_state): New. - (alloc_label_state, free_label_state, free_label_states): New. - (push, pop, dup_state_stack, free_state_stack): Use them. - (desc_label_state): Likewise. - (uw_frame_state_for): Free label states and state stack. - (uw_update_reg_address): Eliminate warnings. - -2002-04-01 Loren J. Rittle - - * doc/install.texi (*-*-freebsd*): Update. - -2002-04-01 Phil Edwards - - * version.c: Fix misplaced leading blanks on first line. - -2002-04-01 Vladimir Makarov - - * config/pa/pa-pro-end.h (ASM_OUTPUT_ALIGNED_COMMON, - ASM_OUTPUT_ALIGNED_LOCAL): Redefine them. - -2002-04-01 Jim Blandy - - * cppmacro.c (cpp_macro_definition): Do not emit spaces after - macro formal parameter names. - -2002-04-01 Bob Wilson - - * config/xtensa/xtensa.c (xtensa_va_arg): Fix compiler warning - in previous change. - -2002-04-01 Bob Wilson - - * config/xtensa/xtensa.c (xtensa_va_arg): Fix to handle arguments - for which MUST_PASS_IN_STACK is true (e.g., variable-sized types). - -2002-03-31 Richard Henderson - - * config/ia64/unwind-ia64.c (alloc_spill_area): Fix offset. - (desc_frgr_mem): Fix reference to f16-f31. - -Sun Mar 31 14:43:24 2002 Richard Kenner - - * emit-rtl.c (adjust_address_1, offset_address): Cast value to - unsigned HOST_WIDE_INT, not unsigned int. - -2002-03-31 Jakub Jelinek - - PR middle-end/6096, middle-end/6098, middle-end/6099 - * reorg.c (emit_delay_sequence): Only increment LABEL_NUSES for - CODE_LABELs. - (fill_slots_from_thread): Likewise. - -2002-03-31 Jakub Jelinek - - * config/sparc/sparc.c (function_arg_record_value_1): Pass complex - floating fields in float regs. - (function_arg_record_value_2): Likewise. - -2002-03-31 Jakub Jelinek - - PR middle-end/6100 - * config/sparc/sparc.c (output_cbranch): Use REG_BR_PROB, not - REG_BR_PRED. - (output_v9branch): Likewise. - -2002-03-31 Alexandre Oliva - - * gcc.c: Revert previous patch for now. - * config/i386/djgpp.h: Likewise. - -2002-03-31 Richard Henderson - - PR target/3997 - * config/alpha/elf.h (ASM_OUTPUT_DEF): Tidy. - (ASM_OUTPUT_DEF_FROM_DECLS): New. - -2002-03-31 Richard Henderson - - * libgcc2.c (__bb_exit_func): Make static. - - * config/alpha/alpha.md (trap): New. - -2002-03-31 Alexandre Oliva - - * gcc.c (LIBGCC_SPEC): Folded %L and duplicate %G here... - (LINK_COMMAND_SPEC): ... from here. - (init_gcc_specs): Duplicate it here too, omitting - shared_name in the second copy. - (init_spec): Test for duplicate - * config/i386/djgpp.h (LINK_COMMAND_SPEC): Remove `%L %G'. - -2002-03-31 Richard Henderson - - * builtins.c (expand_builtin_va_arg): Give warnings not errors for - promoted argument types; build trap. - (expand_builtin_trap): New. - (expand_builtin): Use it. - * stmt.c (expand_nl_goto_receivers): Likewise. - * expr.h (expand_builtin_trap): Declare. - * libfuncs.h (LTI_abort, abort_libfunc): New. - * optabs.c (init_optabs): Init abort_libfunc. - -2002-03-30 David S. Miller - - * config/sparc/linux.h (HANDLE_PRAGMA_PACK_PUSH_POP): Define. - * config/sparc/linux64.h (HANDLE_PRAGMA_PACK_PUSH_POP): Likewise. - -2002-03-30 Roger Sayle - Richard Henderson - - * regmove.c (combine_stack_adjustments_for_block): Avoid - emitting a stack adjustment of zero bytes. Let delete_insn - update bb->head. - -2002-03-30 Richard Henderson - - * config/sparc/sparc.c: Remove all references to TARGET_EPILOGUE. - (sparc_emitting_epilogue): New. - (leaf_label, output_return, sparc_return_peephole_ok): Remove. - * config/sparc/sparc-protos.h: Update. - * config/sparc/sparc.h (MASK_EPILOGUE, TARGET_EPILOGUE): Remove. - (TARGET_SWITCHES): Update. - * config/sparc/sparc.md (return): Remove. - (return_*): Use sparc_emitting_epilogue, not !TARGET_EPILOGUE. - * config/sparc/freebsd.h, config/sparc/linux64.h, config/sparc/lite.h, - config/sparc/liteelf.h, config/sparc/netbsd-elf.h, - config/sparc/sol2-sld-64.h, config/sparc/sol2.h, - config/sparc/sp64-aout.h, config/sparc/sp64-elf.h, - config/sparc/sp86x-aout.h, config/sparc/sp86x-elf.h, - config/sparc/splet.h, config/sparc/vxsparc64.h (TARGET_DEFAULT): - Remove MASK_EPILOGUE. - * doc/invoke.texi: Update. - -2002-03-30 Daniel Berlin - - * dwarf2out.c (dwarf2out_define): Remove start_source_file call, - CPP will start the file for us. - -2002-03-30 Richard Henderson - - PR target/5446 - * config/ia64/ia64.c (group_barrier_needed_p): Special case - prologue_allocate_stack. - (ia64_single_set): Use insn codes for recognition of special - cases, not rtl matching. - * config/ia64/ia64.md (prologue_allocate_stack): Op 3 is in-out. - -2002-03-30 Richard Henderson - - PR target/6032 - * config/sparc/sparc.h (OVERRIDE_OPTIONS): Don't override -fpic - or -fomit-frame-pointer with profiling. - (SUBTARGET_OVERRIDE_OPTIONS): Remove. - (FUNCTION_PROFILER): Do nothing. - (PROFILE_HOOK): New. - * config/sparc/sparc.c (sparc_override_options): Don't check - code models for profiling. - (sparc_function_profiler): Remove. - (sparc_profile_hook): New. - * config/sparc/sparc-protos.h: Update. - -2002-03-30 Jakub Jelinek - - PR optimization/6086 - * combine.c (combine_simplify_rtx): If simplify_rtx failed because - of SUBREG of volatile MEM or because the MEM was mode dependent, - return CLOBBER instead of unmodified SUBREG. - -2002-03-30 David O'Brien - - * config/i370/linux.h: Update copyright. - -2002-03-30 Alexandre Oliva - - * config/mips/mips.c (function_arg_pass_by_reference): Force to 0 - in o32 and o64 ABIs. - * config/mips/abi64.h (MUST_PASS_IN_STACK): Define as in expr.h, - but getting fixed-size structs passed in registers regardless of - padding in o32 and o64 ABIs. - -2002-03-29 Richard Henderson - - PR target/5672 - * expr.c (expand_expr): Pass along EXPAND_INITIALIZER one more place. - -2002-03-29 Franz Sirl - - * config/rs6000/rs6000.c (rs6000_va_arg): Correctly set register count - for aggregate and TFmode types. - -2002-03-29 Richard Henderson - - PR target/5886 - * config/ia64/aix.h (CPP_PREDEFINES): Add -D_LP64. - * config/ia64/hpux.h, config/ia64/linux.h: Likewise. - -2002-03-29 Loren J. Rittle - - * doc/install.texi (*-*-freebsd*): Fix last commit. - -2002-03-29 Richard Henderson - - PR target/6041 - * config/i386/i386.c (x86_arch_always_fancy_math_387): New. - (override_options): Disable NO_FANCY_MATH_387 if the arch allows. - * config/i386/i386.h (x86_arch_always_fancy_math_387): New. - * config/i386/i386.md (sqrtxf2, sqrtextendsfxf2, sinxf2): Fix - conditional. - * docs/invoke.texi: Update -mno-fancy-math-387 docs. - -2002-03-29 Loren J. Rittle - - * config.gcc (*-*-freebsd*): Enable creation of libgcc_s.so. - * config/t-slibgcc-elf-ver (SHLIB_LC): Add macro and use it. - No functional change except ... - * config/t-slibgcc-nolc-override (SHLIB_LC): Override it. New file. - * doc/install.texi (*-*-freebsd*): Document port configuration. - -2002-03-29 Jakub Jelinek - - PR c++/5964 - * config/sparc/sparc.md (empty_delay_slot, branch_type): New - attributes. - (length): Compute variable length for branches/calls/jumps here. - (branch, inverted_branch, normal_fp_branch, inverted_fp_branch, - normal_fpe_branch, inverted_fpe_branch): Remove length attribute, - define branch_type attribute. - (divsi3_sp32): Maximum length is 6 not 7. - (call_address_struct_value_sp32, call_symbolic_struct_value_sp32, - call_address_untyped_struct_value_sp32, - call_symbolic_untyped_struct_value_sp32): Set length to 3 not 2. - * config/sparc/sparc.c (empty_delay_slot): New function. - * config/sparc/sparc.h (ADJUST_INSN_LENGTH): Remove. - * config/sparc/sparc-protos.h (empty_delay_slot): Add prototype. - -2002-03-29 Jakub Jelinek - - * combine.c (set_nonzero_bits_and_sign_copies): Don't call - nonzero_bits if not needed. - (nonzero_bits) [XOR]: Likewise. - (nonzero_bits) [REG]: Use reg_last_set_nonzero_bits even if - reg_last_set_mode and mode are both MODE_INT, but not equal. - (record_value_for_reg): Compute reg_last_set_nonzero_bits - in nonzero_bits_mode for MODE_INT modes. - -2002-03-28 Richard Henderson - - PR target/5715 - * config/alpha/osf.h (ASM_SPEC): Don't pass any special options - to GAS. Correct drift between alternatives. - -2002-03-28 Richard Henderson - - PR target/6087 - * reload1.c (fixup_abnormal_edges): Move insn to edge via sequence. - -2002-03-28 Alexandre Oliva - - * config/i386/freebsd.h (LINK_SPEC): Don't pass default - emulation to the linker. - -2002-03-28 Loren J. Rittle - - * config/alpha/freebsd.h (LINK_SPEC): Likewise. - * config/sparc/freebsd.h (LINK_SPEC): Likewise. - -2002-03-28 John David Anglin - - * pa-linux.h (LOCAL_LABEL_PREFIX): Define. - -Thu Mar 28 16:33:13 2002 Jeffrey A Law (law@redhat.com) - - * combine.c (simplify_and_const_int): Make sure to apply mask - when force_to_mode returns a constant integer. PR3311. - -2002-03-28 Gerald Pfeifer - - * doc/invoke.texi (Warning Options): Refer to C++ Dialect Options - and Objective-C Dialect Options. - -2002-03-28 Richard Henderson - - * config/alpha/alpha.c (alpha_emit_conditional_branch): TFmode NE - comparison should be done vs !=0 not >0 return code. Tidy cases. - -2002-03-28 Richard Henderson - - * c-decl.c (finish_function): New arg can_defer_p. Pass it - on to c_expand_body. - * c-tree.h (finish_function): Update decl. - * c-objc-common.c, c-parse.in, objc/objc-act.c: Update calls. - -2002-03-27 Andreas Schwab - - * config/i386/i386.c (classify_argument): Also check for - QUAL_UNION_TYPE. - -2002-03-27 Rainer Orth - - * doc/install.texi (alpha*-dec-osf*): Don't need --enable-libgcj - any more. - -Wed Mar 27 22:52:02 CET 2002 Zdenek Dvorak - - * cfgrtl.c (merge_blocks_nomove): Use set_block_for_insn instead of - assigning to BLOCK_FOR_INSN directly. - -Wed Mar 27 22:46:04 CET 2002 Jan Hubicka - - * i386.c (ix86_output_addr_diff_elt): Remove binutils bug workaround. - -2002-03-27 Richard Henderson - - * toplev.c (rest_of_compilation): Don't compile if we've had errors. - -2002-03-27 Richard Henderson - - * config/sparc/freebsd.h, config/sparc/linux.h, config/sparc/linux64.h, - config/sparc/netbsd-elf.h, config/sparc/pbd.h, config/sparc/sol2.h, - config/sparc/vxsim.h (LOCAL_LABEL_PREFIX): Define. - -2002-03-27 Richard Henderson - - PR target/6054 - * config/ia64/ia64.c (ia64_expand_call): Use pic patterns for - TARGET_CONST_GP. Simplify conditions. - -2002-03-26 Vladimir Makarov - - * pa/pa-pro-end.h (CPP_PREDEFINES): Add -D__pro__. - - * pa/lib2funcs.asm: Don't use .SPACE and .SUBSPACE if __pro__ - or __rtems_ is defined. - -2002-03-26 Richard Henderson - - * config/alpha/alpha.c (alpha_emit_set_const): Add a REG_EQUAL note - if a non-trivial load was emitted. - (alpha_emit_set_const_1): Remove obsolete extension. Fix thinko - in high+extra+low case. - -2002-03-26 Richard Henderson - - * config.gcc (sparc*-solaris): Use float_format=sparc. - -2002-03-26 Richard Henderson - - * config/sparc/sparc.h (MAX_WCHAR_TYPE_SIZE): Don't define. - * config/sparc/linux-aout.h (MAX_WCHAR_TYPE_SIZE): Don't undef. - * config/sparc/linux.h, config/sparc/linux64.h: Likewise. - * config/sparc/sol2.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Redefine. - (WINT_TYPE_SIZE): Fix at 32. - -2002-03-26 Richard Henderson - - * toplev.c (rest_of_compilation): Delay emit_initial_value_sets - until after eh landing pad generation. - * config/alpha/alpha.c (alpha_gp_save_rtx): Use gen_mem_addressof. - * config/alpha/alpha.md (exception_receiver_2): Only accept MEMs. - -2002-03-26 Richard Henderson - - * expr.h (ADD_PARM_SIZE): One more convert for INC. - -2002-03-26 David Edelsohn - - * config/rs6000/aix51.h (WCHAR_TYPE): Define. - -2002-03-26 Hans Boehm - - * config/ia64/linux.h (MD_FALLBACK_FRAME_STATE_FOR): - Restore more of the signal context. Set no_reg_stack_frame. - * config/ia64/unwind-ia64.c (unw_state_record): - Add no_reg_stack_frame, comments. - (uw_frame_state_for): Initialize when field to UNW_WHEN_NEVER. - (uw_update_context): Adjust bsp when unwinding from leaf, - but not signal frame. - -2002-03-26 Bob Wilson - - * config/xtensa/xtensa.c (xtensa_va_arg): Handle variable-sized types. - -2002-03-26 Richard Earnshaw - - PR target/5621 - * arm.md (define_asm_attributes): Reapply patch of Thu Sep 9, 1999: - "Add a pool_range attribute", which was lost during the ARM/Thumb - merge. - -2002-03-26 Bob Wilson - - * config/xtensa/xtensa.c (xtensa_valid_move): Allow move from - a register into the MAC16 accumulator. - -2002-03-26 Hartmut Penner - - * config/s390/s390.c (s390_emit_epilogue): Change epilogue - code to not restoring global registers. - -2002-03-26 Richard Henderson - - * expr.h (ADD_PARM_SIZE): Cast INC to ssizetype. - (SUB_PARM_SIZE): Cast DEC to ssizetype. - - * config/alpha/alpha.c (alpha_va_arg): Read MUST_PASS_IN_STACK - types from the normal argument frame. - - * config/sparc/sparc.c (function_arg_pass_by_reference): Pass - variable sized objects by reference. - (sparc_va_arg): Receive them by reference too. - -2002-03-25 Bruce Korb - - * Makefile.in(check-fixinc): run "$(MAKE) check" in the fixinc - directory when autogen is detected. - -2002-03-25 Richard Henderson - - * recog.c (peephole2_optimize): Distribute EH_REGION -1 notes - anywhere in the block. Don't refer to insns that have been - removed from the chain. Iterate backward through the new insns. - Don't refer to edges that have been removed. - -2002-03-26 Alan Modra - - * combine.c (simplify_comparison ): Correct - test for overflow of constant. - -2002-03-25 Richard Earnshaw - - PR target/2623 - * arm.md (loadhi_preinc, loadhi_predec, loadhi_shiftpreinc) - (loadhi_shiftpredec, loadhi-with-writeback peephole): Don't use - these patterns on arm_archv4. - -2002-03-22 Nick Clifton - - * config/mcore/mcore.h (CC1_SPEC): Define only if not already - defined. Do not disable exceptions or rtti. - * config/mcore/mcore-pe.h (CC1_SPEC): Define before including - mcore.h. Disable exceptions and rtti, since they are not - supported by EPOC. - -2002-03-25 Jakub Jelinek - - * regrename.c (build_def_use): Move recog_memoized - before extract_insn. - -2002-03-25 Jakub Jelinek - - PR target/6043 - * expr.c (emit_group_store): Handle storing into CONCAT. - -2002-03-25 Jakub Jelinek - - * regrename.c (build_def_use): Share RTL between MATCH_OPERATOR and - corresponding MATCH_DUP. - -2002-03-24 Richard Henderson - - * unroll.c (unroll_loop): Zero label_map. - - * gcse.c: Include except.h. - * Makefile.in (gcse.o): Update. - -2002-03-24 Richard Henderson - - * varasm.c (asm_emit_uninitialised): Revert 2002-03-14 change. - Do resolve_unique_section before shared data clause. - -2002-03-24 Richard Henderson - - * config/alpha/elf.h (STARTFILE_SPEC): Use crtbeginT with -static. - -2002-03-24 Richard Henderson - - * recog.c (peephole2_optimize): Split blocks when EH insns are - generated in the middle of a block. Do global life update if - zapped EH edges. - -2002-03-24 Richard Henderson - - * mips.c (mips_function_value): Only promote_mode for non-libcalls. - -2002-03-24 Neil Booth - - preprocessor/3951 - * gcc.c (cpp_options): Pass -MD through as -MD not -M -MF. - * cppinit.c (cpp_handle_option): Set no_ouput if -MD or -MMD. - (init_dependency_output): Don't make no_output decision here. - -2002-03-24 Stephane Carrez - - * config/m68hc11/m68hc11.c (m68hc11_autoinc_compatible_p): New function. - (m68hc11_split_move): Call it to see if the source and destination - operands use the same direction auto inc/dec mode, otherwise make the - source an offsetable memory operand and generate an add. - -2002-03-24 Stephane Carrez - - * config/m68hc11/m68hc11.md ("*subsi3_zero_extendhi"): Allow address - register for operand 2. - ("*subsi3_zero_extendqi"): Likewise. - ("*iorhi3_gen"): Do the operation on the upper bits and then lower - bits so that it is compatible with a pop. - ("*andhi3_gen"): Likewise. - ("xorhi3"): Likewise. - -2002-03-24 Richard Henderson - - PR optimization/5742 - * machmode.def: Add inner mode field to complex modes. - * config/mips/mips.c (mips_function_value): Always define. Add - new argument to handle libcalls. - * config/mips/mips.h (LIBCALL_VALUE): Use mips_function_value. - (FUNCTION_VALUE): Likewise. - * config/mips/abi64.h (FUNCTION_VALUE): Remove. - * config/mips/mips-protos.h: Update. - -2002-03-23 Richard Henderson - - * config/sparc/sparc.c (sparc_emit_floatunsdi): New. - * config/sparc/sparc-protos.h: Update. - * config/sparc/sparc.md (floatunsdisf2, floatunsdidf2): New. - -2002-03-23 Richard Henderson - - * config/sparc/gmon-sol2.c (internal_mcount): Assume either - _start or _init begins the text segment. - -2002-03-23 Alan Modra - - * combine.c (simplify_comparison): When widening modes, ignore - sign extension on CONST_INTs. - -2002-03-22 Bob Wilson - - * config/xtensa/xtensa.c (print_operand): Fix incorrect mode - passed to adjust_address. Fix comment formatting. - -2002-03-22 Alexandre Oliva - - * config/mips/mips.h (MASK_RETURN_ADDR): Define. - (TARGET_PTRMEMFUNC_VBIT_LOCATION): Define. - -2002-03-22 Richard Henderson - - * c-pragma.c (maybe_apply_renaming_pragma): New. - (handle_pragma_redefine_extname, pending_redefine_extname): New. - (handle_pragma_extern_prefix, pragma_extern_prefix): New. - (init_pragma): Register them. - * c-pragma.h (maybe_apply_renaming_pragma): Declare. - * c-decl.c (finish_decl): Call it. - * cp/decl.c (cp_finish_decl): Likewise. - * doc/extend.texi: Document the new pragmas. - - * config/alpha/osf.h (CPP_SUBTARGET_SPEC): Add __EXTERN_PREFIX. - (HANDLE_PRAGMA_EXTERN_PREFIX): New. - - * config/i386/sol2.h (CPP_PREDEFINES): Add __PRAGMA_REDEFINE_EXTNAME. - (HANDLE_PRAGMA_REDEFINE_EXTNAME): New. - * config/sparc/sol2.h: Likewise. - -2002-03-22 Bob Wilson - - * config/xtensa/xtensa-protos.h (non_acc_reg_operand): Remove. - (xtensa_valid_move, xtensa_preferred_reload_class): Define. - * config/xtensa/xtensa.c (non_acc_reg_operand): Remove. - (xtensa_valid_move, xtensa_preferred_reload_class): Define to - prevent use of sp as a reload register. - (xtensa_emit_move_sequence): Use xtensa_valid_move instead of - non_acc_reg_operand. - * config/xtensa/xtensa.h (PREDICATE_CODES): Remove non_acc_reg_operand. - (PREFERRED_RELOAD_CLASS): Move code to xtensa_preferred_reload_class. - * config/xtensa/xtensa.md (movsi_internal, movhi_internal, - movqi_internal): Use xtensa_valid_move instead of non_acc_reg_operand. - -2002-03-22 Jakub Jelinek - - PR optimization/5854 - * config/m68hc11/m68hc11.h (CONST_OK_FOR_LETTER_VALUE_P): Use K for 0. - Shut up warnings. - (CONST_DOUBLE_OK_FOR_LETTER_P): Use G for 0.0. - (EXTRA_CONSTRAINT): Use S for non-push memory operand. - * config/m68hc11/m68hc11.c (m68hc11_split_move): Handle setting from - const0 if scratch register was not allocated. - (m68hc11_reload_operands, m68hc11_gen_lowpart, m68hc11_gen_highpart, - m68hc11_z_replacement): Replace gen_rtx (CONST_INT, VOIDmode, ...) - with GEN_INT (...). - (m68hc11_reorg): Compute BLOCK_FOR_INSN before reload_cse_regs. - * config/m68hc11/m68hc11.md: Replace gen_rtx (CONST_INT, VOIDmode, ...) - with GEN_INT (...) everywhere. Remove constraints in define_split - patterns. - (movdi_internal, movdf_internal, movsi_internal, movsf_internal): Don't - require scratch register for setting 0 into regs/non-pushable memory. - -2002-03-22 Alexandre Oliva - - * flow.c (calculate_global_regs_live): Clear aux fields of - ENTRY and EXIT. - -2002-03-22 Jakub Jelinek - - * config/v850/v850.c (v850_reorg): Only call alter_subreg on - REG or MEM subregs, pass rtx * instead of rtx to it. - * config/i860/i860.c (output_delayed_branch, output_delay_insn): Pass - rtx * instead of rtx to alter_subreg. - * config/m32r/m32r.c (gen_split_move_double): Likewise. - * config/pj/pj.c (pj_output_rval): Likewise. - -2002-03-22 Richard Henderson - - PR target/3177 - * config/ia64/ia64.h (CUMULATIVE_ARGS): Add int_regs. - (INIT_CUMULATIVE_ARGS, INIT_CUMULATIVE_INCOMING_ARGS): Update. - * config/ia64/ia64.c (ia64_function_arg_advance): Set int_regs. - (ia64_expand_prologue): Look at int_regs, not words, for number - of incomming int regs. - -Fri Mar 22 16:00:06 CET 2002 Jan Hubicka - - * cfgcleanup.c (outgoing_edges_math): Fix condition; relax - frequencies match; avoid match on different loop depths. - (try_crossjump_to_bb): Kill tests that no longer brings time - savings. - * cfgrtl.c (force_nonfallthru_and_redirect): Fix loop_depth - updating code. - (split_edge): Likewise. - -2002-03-21 Richard Henderson - - PR target/5996 - * fixinc/inclhack.def (solaris_stdio_tag): New. - * fixinc/fixincl.x: Regenerate. - -2002-03-21 Eric Botcazou - - PR c/5597 - * c-typeck.c (process_init_element): Flag non-static - initialization of a flexible array member as illegal. - -2002-03-22 Alan Modra - - * config/rs6000/t-linux64: New. - * config.gcc (powerpc64-*-linux* ): Drop t-ppcos and - t-ppccomm. Use t-rs6000 and t-linux64. - (powerpc64-*-gnu* ): Likewise. - * mklibgcc.in (SHLIB_MKMAP_OPTS): New variable. - * mkmap-symver.awk (dotsyms): If set, output .foo as well as foo. - * Makefile.in (SHLIB_MKMAP_OPTS): Pass to mklibgcc. - -2002-03-21 Aldy Hernandez - - * langhooks.c (lhd_tree_inlining_cannot_inline_tree_fn): Check - flag_really_no_inline instead of optimize == 0. - - * c-objc-common.c (c_cannot_inline_tree_fn): Same. - - * cp/tree.c (cp_cannot_inline_tree_fn): Same. - - * flags.h (flag_really_no_inline): New. - - * c-common.c (c_common_post_options): Initialzie - flag_really_no_inline. - - * toplev.c (flag_really_no_inline): New. - -2002-03-21 Jakub Jelinek - - * config/avr/avr.md (length): Fix length computation for - conditional branches. - -2002-03-21 Richard Henderson - - * config/rs6000/rs6000.c (rs6000_select_rtx_section): Put symbolic - constants in .data when -fpic. - -2002-03-21 Tom Tromey - - * config/i386/sol2.h (ASM_QUAD): Undef. Fixes PR bootstrap/5948. - -2002-03-21 Gerald Pfeifer - - * doc/contrib.texi (Contributors): Use GNU/Linux instead of Linux - where appropriate. - -Thu Mar 21 09:50:48 2002 Richard Kenner - - * config/ia64/ia64.c (hfa_element_mode, case ARRAY_TYPE): Recurse. - - * expr.c (emit_group_store): Don't copy const0_rtx to a CONCAT. - -2002-03-21 Eric Botcazou - Richard Henderson - - PR c/5354: - * c-common.c (c_expand_expr): Preserve result of a statement - expression if needed. - -2002-03-21 Jakub Jelinek - - PR bootstrap/4195 - * genrecog.c (maybe_both_true_mode): Remove. - (maybe_both_true_2, write_switch): Revert 2001-07-17 changes. - * machmode.def (Pmode): Likewise. - -2002-03-21 Rainer Orth - - * fixinc/inclhack.def (alpha_assert): Fix assert macro in Tru64 - UNIX assert.h. - * fixinc/fixincl.x: Regenerate. - -2002-03-20 Jason Merrill - - * config/i386/cygwin.h (DWARF2_UNWIND_INFO): Define to 0. - -2002-03-20 Bob Wilson - - * config/xtensa/xtensa.h (ASM_OUTPUT_POOL_PROLOGUE): Emit a - ".literal_position" directive before the constant pool. - -2002-03-20 Gerald Pfeifer - - * doc/contrib.texi (Contributors): Update Geoffrey Keating. - Add Craig Rodrigues. - Add Brad Lucier to testers. - -2002-03-20 Jakub Jelinek - - PR target/4792 - * config/arc/arc.md (movsicc, movdicc, movsfcc, movdfcc): Add mode - to if_then_else. - (movsicc_insn, movdicc_insn, movsfcc_insn, movdfcc_insn): Likewise. - * config/arc/arc.c (arc_final_prescan_insn): Use extract_insn_cached - instead of insn_extract. - -2002-03-20 Jakub Jelinek - - PR bootstrap/4192 - * config/fr30/fr30.md (jump): Remove clobber of fixed register. - - * genemit.c (output_added_clobbers_hard_reg_p): Only output return - stmt if some case has been output. - -2002-03-20 Jakub Jelinek - - PR c/5972 - * config/i386/i386.md (movdicc_c_rex64, movsicc_noc, movhicc_noc, - movsfcc_1, movdfcc_1): Add %O2. - * config/i386/i386.c (print_operand): Handle %ON. - Print . before float condition codes in Sun as cmov syntax. - * config/i386/sol2.h (CMOV_SUN_AS_SYNTAX): Define for Sun as. - * config.gcc (i[34567]86-*-solaris2*): Remove comment which is - no longer true. - -2002-03-20 Philip Blundell - - * config/arm/arm.c (arm_output_epilogue): Don't generate separate - return instruction if PC was popped. - -2002-03-20 Hans-Peter Nilsson - - * config/mmix/mmix.md ("fixuns_truncdfdi2"): Use (unsigned_fix:DI - (unsigned_fix:DF op1)), not (unsigned_fix:DI (fix:DF op1)). - ("truncdfsf2"): Correct operator is float_truncate, not fix. - ("*truncdfsf2_real"): Ditto. - ("*nonlocal_goto_receiver_expanded"): Fix output template formatting. - - * config/mmix/mmix.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Don't define. - -2002-03-19 Jim Blandy - - * c-lex.c (cb_file_change): Pass the #inclusion's line number to - the start_source_file debug hook, not the current line number. - - * cppmacro.c (cpp_macro_definition): Emit a space after the macro - name, even if the replacement list contains no tokens, as required - by Dwarf. - -2002-03-19 David Edelsohn - - * config/rs6000/rs6000.c (rs6000_override_options): Only warn - about -fpic/-fPIC if extra_warnings set. - -2002-03-19 Richard Henderson - - * flow.c (EH_USES): Provide default. - (calculate_global_regs_live): Use it for EH edges and noreturn calls. - * doc/tm.texi (EH_USES): New. - - * config/ia64/ia64.c (ia64_eh_uses): New. - * config/ia64/ia64-protos.h: Update. - * config/ia64/ia64.h (EH_USES): New. - -2002-03-20 Alan Modra - - * defaults.h (SUPPORTS_WEAK): Set if ASM_WEAKEN_DECL. - * varasm.c (assemble_alias): Use ASM_WEAKEN_DECL. - * doc/tm.texi (ASM_WEAKEN_DECL): Document. - (ASM_WEAKEN_LABEL): Mention ASM_WEAKEN_DECL. - (SUPPORTS_WEAK): Likewise. - -2002-03-19 Richard Henderson - - PR 5879 - * except.c (current_function_has_exception_handlers): New. - * except.h: Declare it. - * sibcall.c (optimize_sibling_and_tail_recursive_call): Use it. - Combine tests that disable all sibcalls for the function. - -2002-03-19 Richard Henderson - - PR 5977, 5991 - * config/ia64/ia64.c: Revert 2002-03-01 patch. - * config/ia64/ia64.h (INIT_EXPANDERS): New. - -2002-03-19 Olivier Hainque - - * varasm.c (output_constant_def): Don't call ENCODE_SECTION_INFO - for INTEGER_CST. - -2002-03-19 Jason Merrill - - * varasm.c (globalize_decl): Get the name from the RTL, not - DECL_ASSEMBLER_NAME. - - * Makefile.in (LIBGCC2_DEBUG_CFLAGS): Set to -g. - -2002-03-19 Dale Johannesen - - PR optimization/5999, middle-end/5731 - * expr.c (expand_expr) [RDIV_EXPR]: Only convert real divisions into - multiplications by reciprocals. - -2002-03-19 Bob Wilson - - * config/xtensa/xtensa.md (adddi3, adddi_carry, subdi3, - subdi_carry): Define. - -Tue Mar 19 14:12:32 2002 Richard Kenner - - * config/sparc/sparc.h (CAN_ELMINIATE): Can only eliminate FP - in favor of SP if FRAME_POINTER_REQUIRED is false. - -2002-03-19 Jakub Jelinek - - PR c/5656 - * langhooks.h (struct lang_hooks_for_tree_inlining): Add - convert_parm_for_inlining. - * c-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING): - Define. - * langhooks-def.h: Likewise. - * objc/objc-lang.c: Likewise. - * langhooks.c (lhd_tree_inlining_convert_parm_for_inlining): New - function. - * tree-inline.c (initialize_inlined_parameters): - Call convert_parm_for_inlining lang hook if needed. - * c-typeck.c (c_convert_parm_for_inlining): New function. - * c-tree.h (c_convert_parm_for_inlining): Add prototype. - -2002-03-18 Kaveh R. Ghazi - - * gcse.c (insert_insn_end_bb): Fix typo in last change. - -2002-03-18 Mark Mitchell - - * calls.c (precompute_arguments): Do not assume that temporaries - can be destroyed after expanding the argument. - (expand_call): Likewise. - -2002-03-18 Ashif Harji - - * gcc.c (struct compiler default_compilers): Add - -no-integrated-cpp flag to invoke an external cpp. - (struct option_map option_map[]): Likewise. - * objc/lang-specs.h (struct compiler default_compilers): Add - -no-integrated-cpp flag to invoke an external cpp. - * doc/invoke.texi: Document -no-integrated-cpp flag. - -2002-03-18 Alan Modra - David Edelsohn - - * c-pragma.h (HANDLE_PRAGMA_WEAK): Define if ASM_WEAKEN_DECL too. - * config/rs6000/linux64.h (ASM_DECLARE_FUNCTION_NAME): Don't emit - .weak for code sym. Do emit .size for descriptor sym. - (ASM_DECLARE_FUNCTION_SIZE): Define. - * config/rs6000/rs6000.h (ASM_WEAKEN_DECL): Define. - (ASM_OUTPUT_DEF_FROM_DECLS): Don't emit .weak here. Don't output - .lglobl unless TARGET_XCOFF. Formatting fixes. - (PREDICATE_CODES): Add any_operand and zero_constant. - (HANDLE_PRAGMA_PACK): Delete. - * config/rs6000/xcoff.h (ASM_DECLARE_FUNCTION_NAME): Don't emit - .weak for code sym. - (HANDLE_PRAGMA_WEAK): Remove. - (ASM_WEAKEN_LABEL): Remove. - (COLLECT_EXPORT_LIST): Delete. - * config/rs6000/aix.h (HANDLE_SYSV_PRAGMA): Define. - * config/rs6000/darwin.h (HANDLE_SYSV_PRAGMA): Define. - -2002-03-18 Bob Wilson - - * config/xtensa/xtensa.h (GO_IF_MODE_DEPENDENT_ADDRESS): Treat - constant-pool addresses as "mode-dependent". - -Mon Mar 18 18:12:48 CET 2002 Jan Hubicka - - * i386.c (override_options): Disallow preferred_stack_boundary to be - less than 16 bytes - (construct_container): Fix end of array check. - (ix86_va_start): Force alignemnt to be 16 bytes. - - * linux64.h (MULTILIB_DEFAULTS): Set to "m64". - (t-linux64): Add multilibing - - * i386.h (PROMOTE_PROTOTYPES): Set to 0 for x86_64. - - * gcse.c (hash_scan_set): Refuse instructions with EH edges. - - * basic-block.h (fixup_abnormal_edges): Declare. - * reload1.c (fixup_abnormal_edges): Make global. - * reg-stack.c (convert_regs): Use it. - - * gcse.c (insert_insn_end_bb): Handle trapping insns. - - * reload1.c (reload_cse_delete_noop_set): Purge dead edges. - - * recog.c (peephole2_optimize): Re-distribute EH edges. - -2002-03-18 Jason Merrill - - * configure.in: Disable checking by default on release branch. - -2002-03-18 Jakub Jelinek - - PR target/5740 - * expr.c (emit_group_load): Use extract_bit_field if - needed for CONCAT arguments. - -2002-03-18 Richard Earnshaw - - PR target/4863 - * arm.md (tablejump): Make this a define_expand. For PIC add the - offset to the base of the table. - (thumb_tablejump): Matcher for Thumb tablejump insn. - * config/arm/aout.h (ASM_OUTPUT_ADDR_DIFF_ELT): Output thumb entries - as the difference of two labels. - * config/arm/aof.h (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise. - * config/arm/elf.h (JUMP_TABLES_IN_TEXT_SECTION): Only put ARM jump - tables in the code. - * config/arm/coff.h (JUMP_TABLES_IN_TEXT_SECTION): Likewise. - * arm.c (get_jump_table_size): If the table is not in the text - section, return zero. - -2002-03-17 Richard Henderson - - * config/alpha/alpha.c (alpha_emit_set_const_1): Build add insns - explicitly. - -2002-03-17 Kaveh R. Ghazi - - * ifcvt.c (dead_or_predicable): Fix uninitialized variable. - -2002-03-17 David Edelsohn - - * expr.c (expand_expr): Sign-extend CONST_INT generated from - TREE_STRING_POINTER. - -2002-03-16 Richard Henderson - - * config/ia64/ia64.c (ia64_attribute_table): Move before - targetm definition. Make static. - -2002-03-16 Neil Booth - - * cppinit.c (print_help): Display -MD and -MMD. - Don't display usage string. Update assertion syntax and - typo. - -2002-03-16 Stephane Carrez - - * config/m68hc11/m68hc11.c (m68hc11_override_options): Don't use - soft registers by default for 68HC12. - (m68hc11_conditional_register_usage): Don't use Z register for 68HC12 - when compiling with -fomit-frame-pointer. - (expand_prologue): Use push/pop to allocate 4-bytes of locals on 68HC12. - (expand_epilogue): Likewise. - (m68hc11_gen_rotate): Use exg when rotating by 8. - -2002-03-16 Stephane Carrez - - * config/m68hc11/m68hc11-protos.h (ix_reg): Declare. - * config/m68hc11/m68hc11.md ("addsi3"): Use general_operand for sources. - (splits): Remove unused add splits. - ("*addhi3_68hc12"): Tune constraints. - ("addhi_sp"): Try to use X instead of Y in all cases and if the - constant fits in 8-bits and D is dead use abx/aby instructions. - ("*addhi3"): Remove extern declaration of ix_reg. - ("*subsi3"): Optimize and provide new split. - ("subhi3"): Cleanup. - ("*subhi3_sp"): Avoid saving X if we know it is dead. - (arith splits): For 68hc12 save the address register on the stack - and do the arithmetic operation with a pop. - -2002-03-16 Stephane Carrez - - * config/m68hc11/m68hc11.md ("*movqi_68hc12"): Fix constraints, avoid - allocating QImode in address registers. - ("*movqi_m68hc11"): Likewise. - -2002-03-15 Mark Mitchell - - * expr.c (expand_expr): Revert previous change. - - * c-common.c (statement_code_p): Handle CLEANUP_STMT. - * c-common.def (CLEANUP_STMT): New tree node. - * c-common.h (CLEANUP_DECL): New macro. - (CLEANUP_EXPR): Likewise. - * c-semantics.c (expand_stmt): Handle CLEANUP_STMT. - * expr.c (expand_expr): Tidy. - * tree-dump.c (dequeue_and_dump): Handle CLEANUP_STMT. - * tree-inline.c (initialize_inlined_parameters): Clean up - new local variables. - -2002-03-15 Richard Henderson - - * c-decl.c: Include c-pragma.h. - (start_decl, start_function): Invoke maybe_apply_pragma_weak. - (finish_function): Tidy. - * c-pragma.c: Include c-common.h. - (pending_weaks, apply_pragma_weak, maybe_apply_pragma_weak): New. - (handle_pragma_weak): Use them. - (init_pragma): Register pending_weaks. - * c-pragma.h (maybe_apply_pragma_weak): Declare. - * print-tree.c (print_node): Print DECL_WEAK. - * varasm.c (mark_weak_decls): Remove. - (remove_from_pending_weak_list): Remove. - (add_weak): Remove. - (asm_emit_uninitialised): Call globalize_decl for weak commons. - (weak_decls): Make a tree_list. - (declare_weak): Cons weak_decls directly. - (globalize_decl): Remove weak_decls elements directly. - (weak_finish): Simplify weak_decls walk. Don't weaken unused - symbols. Don't pretend to handle aliases. - (init_varasm_once): Update weak_decls registry. - * Makefile.in: Update dependencies. - -2002-03-15 Richard Henderson - - * config/alpha/alpha.c (alpha_va_arg): Manipulate the type - size as a tree. - -2002-03-15 Stephane Carrez - - * config/m68hc11/m68hc11.md ("tstqi_1"): Try to use ldab instead of tst. - ("tstqi" split): Avoid using memory for tstqi on address register. - (splits): Remove constraints. - ("cmphi_1_hc12"): New from "cmphi_1" and tuned for 68HC12. - ("cmpdf", "cmpsf"): Remove since not used. - ("*tbeq", "*tbne", "*tbeq8", "*tbne8"): Also look in cc_status.value2. - (peephole2): New peepholes to optimize tstqi and pre inc/dec addressing. - -2002-03-15 Stephane Carrez - - * config/m68hc11/m68hc11.md ("negsi2"): Optimize inline case. - ("neghi2"): Tighten constraints. - ("one_cmplsi2"): Optimize and simplify split. - * config/m68hc11/larith.asm (__negsi2): Likewise for library. - -2002-03-15 Stephane Carrez - - * config/m68hc11/m68hc11.md ("logicalsi3_zexthi"): Fix constraints - and split of AND operation to clear the upper bits. - ("*logicalsi3_zextqi"): Likewise. - ("*logicallhi3_zexthi_ashift8"): Likewise. - ("*logicalsi3_silshr16"): Likewise. - ("logicalsi3_silshl16"): Likewise. - ("anddi3", "iordi3", "xordi3" splits): Remove constraints. - -2002-03-15 Stephane Carrez - - * config/m68hc11/m68hc11.c (m68hc11_symbolic_p): New function. - (m68hc11_indirect_p): New function. - (m68hc11_override_options): Must set MASK_NO_DIRECT_MODE for 68HC12. - (m68hc11_gen_highpart): Use TARGET_NO_DIRECT_MODE instead of - TARGET_M6812. - (asm_print_register): Likewise. - * config/m68hc11/m68hc11-protos.h (m68hc11_symbolic_p): Declare. - (m68hc11_indirect_p): Declare. - * config/m68hc11/m68hc11.h (EXTRA_CONSTRAINT): New constraint 'R', 'Q'. - (TARGET_NO_DIRECT_MODE, TARGET_RELAX): New. - (TARGET_SWITCHES): New option -mrelax. - * config/m68hc11/m68hc11.md ("andsi3"): Allow soft register for - destination. - ("iorsi3", "xorsi3"): Likewise. - ("andhi3", "andqi3", "iorhi3", "iorqi3"): Use a define_expand. - ("*andhi3_mem"): New to handle destination in memory with bclr - and a scratch register. - ("*andqi3_mem", "*iorhi3_mem", "*iorqi3_mem"): Likewise. - ("*andhi3_const"): New when operand2 is constant. - ("*andqi3_const", "*iorhi3_const", "*iorqi3_const"): Likewise. - ("*andhi3_gen"): Cleanup of the old "andhi3". - ("*andqi3_gen", "*iorhi3_gen", "*iorqi3_gen"): Likewise. - ("xorqi3"): Update constraints. - -2002-03-15 Stephane Carrez - - * config/m68hc11/m68hc11.c (m68hc11_small_indexed_indirect_p): Look - for reg_equiv_memory_loc when the operand is a register that does - not get a hard register (stack location). - (tst_operand): After reload, accept all memory operand. - (symbolic_memory_operand): Fix detection of symbolic references. - * config/m68hc11/m68hc11.h (VALID_CONSTANT_OFFSET_P): For 68HC12 - accept symbols and any constant. - -2002-03-15 Stephane Carrez - - * config/m68hc11/m68hc11.c (emit_move_after_reload): Add a REG_INC - note on the insn that sets the soft frame register. - (must_parenthesize): ix and iy are also reserved names. - (print_operand_address): One more place where parenthesis are required - to avoid confusion with register names. - (m68hc11_gen_movhi): Allow push of stack pointer. - (m68hc11_check_z_replacement): Fix handling of parallel with a - clobber. - (m68hc11_z_replacement): Must update the REG_INC notes to tell what - the replacement register is. - * config/m68hc11/m68hc11.h (REG_CLASS_CONTENTS): Switch Z_REGS - and D8_REGS classes. - (MODES_TIEABLE_P): All modes are tieable except QImode. - -2002-03-15 Stephane Carrez - - * config/m68hc11/larith.asm (___adddi3): Optimize saving of result. - (___subdi3): Likewise. - (__mulsi3, __mulhi32): Avoid using _.tmp scratch location. - (__map_data_section): Optimize 68hc11 case. - -2002-03-15 Stephane Carrez - - * config/m68hc11/m68hc11.c (m6812_cost): Make cost of add higher - than a shift to avoid adding a register with itself. - (m68hc11_memory_move_cost): Take into account NO_REGS. - (m68hc11_register_move_cost): Update and use memory move cost - for soft registers. - (m68hc11_address_cost): Make cost of valid offset not 0 so that - it gives more opportunities to cse to optimize. - * config/m68hc11/m68hc11.h (REGISTER_MOVE_COST): Pass the mode. - * config/m68hc11/m68hc11-protos.h (m68hc11_register_move_cost): Update. - -2002-03-15 Jason Merrill - - * varasm.c (globalize_decl): New fn. - (assemble_start_function): Use it. - (asm_emit_uninitialized): Use it. - (assemble_alias): Use it. - (assemble_variable): Use it. - -2002-03-15 Jason Merrill - - * varasm.c (assemble_variable): Use zeros for a decl with DECL_INITIAL - of error_mark_node. - -2002-03-15 Jakub Jelinek - - PR bootstrap/4128 - * config/sparc/sparc.c (gen_v9_scc): Move early clobber test - before movrXX only, use reg_overlap_mentioned_p. - Only special case NE if just one insn can be generated. - -2002-03-15 Richard Earnshaw - - PR target/5712 - * arm.md (movaddr, movaddr_insn): Delete. - -2002-03-15 Jason Merrill - - * toplev.c (wrapup_global_declarations): Clarify variable handling. - -fkeep-static-consts doesn't apply to comdats. - -2002-03-14 Richard Henderson - - PR target/5312 - * config/ia64/ia64.c: Include tm_p.h last. - (gen_nop_type): Remove duplicate definition. - (cycle_end_fill_slots): Set sched_data for second L slot. - (maybe_rotate): Call cycle_end_fill_slots to fill in nop slots. - (nop_cycles_until): Fix typos. - -2002-03-15 Jakub Jelinek - - PR optimization/5891 - * unroll.c (copy_loop_body) [CALL_INSN]: Copy SIBLING_CALL_P flag. - -2002-03-14 David Mosberger , Hans Boehm - - * config/ia64/unwind-ia64.c: Handle copy_state and label_state - descriptors correctly. - -2002-03-14 Zack Weinberg - - * cpphash.h (struct lexer_state): Remove line_extension member. - * cpplib.c (dequote_string, do_linemarker): New functions. - (linemarker_dir): New data object. - (DIRECTIVE_TABLE): No longer need to interpret #line in - preprocessed source. Delete obsolete comment about return - values of handlers. - (end_directive, directive_diagnostics, _cpp_handle_directive): - Don't muck with line_extension. - (directive_diagnostics): No need to issue warnings for - linemarkers here. - (_cpp_handle_directive): Issue warnings for linemarkers here, - when appropriate. Dispatch linemarkers to do_linemarker, not - do_line. - (do_line): Code to handle linemarkers split out to do_linemarker. - Convert escape sequences in filename argument, both places. - - * cppmacro.c (quote_string): Rename cpp_quote_string and - export. All callers changed. - * cpplib.h (cpp_quote_string): Prototype. - * cppmain.c (print_line): Call cpp_quote_string on to_file - before printing it. - - * doc/cpp.texi: Document that escapes are now interpreted in - #line and in linemarkers, and that non-printing characters are - converted to octal escapes when linemarkers are generated. - -2002-03-14 Richard Earnshaw - Jeroen Dobbelaere - - PR target/5828 - * arm.c (arm_output_epilogue): Fix floating-point register save - adjustment when using a frame pointer. - -2002-03-13 Hans-Peter Nilsson - - * config/mmix/mmix.c: Improve comments. - (mmix_target_asm_function_prologue): Drop variable - empty_stack_frame. Don't allocate unused slot above fp. - (mmix_target_asm_function_epilogue): Mirror prologue changes. - (mmix_expand_builtin_va_arg): Do all computations on trees. - * config/mmix/mmix.h (MMIX_GNU_ABI_REG_ALLOC_ORDER): Don't have - brace in first column. - (enum reg_class): Ditto. - (FIRST_PARM_OFFSET): Now 0. - (USER_LABEL_PREFIX): Remove #if 0:d definition. - (LINK_SPEC): Don't defsym __.MMIX.start..text if linking - relocatably. Always produce ELF, not mmo if linking relocatably. - -2002-03-13 David Edelsohn - - * config/rs6000/rs6000.h (PAD_VARARGS_DOWN): Define. - * config/rs6000/rs6000.c (rs6000_va_arg): Use - std_expand_builtin_va_arg if not ABI_V4. - -2002-03-13 Jakub Jelinek - - PR target/5626 - * config/sparc/sparc.md (normal_branch, inverted_branch, - normal_fp_branch, inverted_fp_branch, normal_fpe_branch, - inverted_fp_branch): Adjust calls to output_cbranch. - Set length attribute. - (normal_int_branch_sp64, inverted_int_branch_sp64): Adjust calls to - output_v9branch. Set length attribute. - * config/sparc/sparc.c (fcc0_reg_operand, noov_compare64_op): New - predicates. - (noov_compare_op): Handle CCX_NOOVmode the same way as CC_NOOVmode. - (output_cbranch): Likewise. Handle far branches. - (output_v9branch): Handle far branches. - * config/sparc/sparc-protos.h (output_cbranch, output_v9branch): - Adjust prototypes. - * config/sparc/sparc.h (PREDICATE_CODES): Add fcc0_reg_operand and - noov_compare64_op predicates. - -2002-03-13 Jason Merrill - - * gthr-posix.h (__gthread_active_p): Move __gthread_active_ptr - into the function and constify it. - * gthr-dce.h, gthr-solaris.h: Likewise. - -2002-03-12 Hans-Peter Nilsson - - * config/cris/cris.c (cris_print_operand): Avoid - traditional-warning for 0xffffffff. - (cris_expand_builtin_va_arg): Do all computations on trees. - -2002-03-13 Ulrich Weigand - - * expr.c (expand_expr, case NE_EXPR): Do not call copy_to_reg with - VOIDmode operand. Add compile-time optimization for constant results. - -2002-03-13 Hartmut Penner - - * config/s390/s390.h (PROFILE_BEFORE_PROLOGUE): Emit profile code - before prologue, to avoid scheduling problems. - -2002-03-13 Jakub Jelinek - - * config/sparc/sparc.h (INITIAL_FRAME_POINTER_OFFSET): Remove. - (ELIMINABLE_REGS): Add sfp->sp. - (INITIAL_ELIMINATION_OFFSET): Compute sfp->sp offset too. - -2002-03-13 Jakub Jelinek - - PR optimization/5892 - * config/ia64/ia64.c (rotate_one_bundle): Update current packet. - -2002-03-13 Jakub Jelinek - - * loop.c (basic_induction_var): Don't call convert_modes if mode - classes are different. - -2002-03-12 Richard Henderson - - PR optimization/5901 - * function.c (reposition_prologue_and_epilogue_notes): Position - the markers after/before the last/first insn not deleted. - -2002-03-12 Richard Henderson - - PR optimization/5878 - * config/arc/arc.h, config/cris/cris.h, config/i386/i386.h, - config/m68k/m68k.h, config/s390/s390.h, config/sparc/sparc.h - (PIC_OFFSET_TABLE_REGNUM): Conditionalize on flag_pic. - - * config/arm/arm.h config/i386/i386.h, config/m68k/m68k.h, - config/sparc/sparc.h (CONDITIONAL_REGISTER_USAGE): Set - PIC_OFFSET_TABLE_REGNUM based on INVALID_REGNUM not flag_pic. - - * config/arc/arc.h (CONDITIONAL_REGISTER_USAGE): New. - * config/arm/arm.c (arm_pic_register): Init to INVALID_REGNUM. - (arm_override_options): Set arm_pic_register if TARGET_APCS_STACK - also. Don't set it if not flag_pic. - * config/i386/i386.c (ix86_save_reg): Trust PIC_OFFSET_TABLE_REGNUM - to be INVALID_REGNUM when not used. - -2002-03-13 Aldy Hernandez - - * expmed.c (store_bit_field): Reset alias set for memory. - (extract_bit_field): Same. - -2002-03-12 Chris Meyer - - * genflags.c (gen_insn): Use IS_VSPACE. - * genoutput.c (output_insn_data): Likewise. - (process_template): Likewise. - -2002-03-12 Bob Wilson - - * config/xtensa/xtensa.c (xtensa_expand_block_move): Use - validize_mem() instead of change_address to avoid clobbering - memory attributes. - -2002-03-12 Jakub Jelinek - - * c-lex.c (cb_ident, c_lex): Remove unnecessary cast. - (lex_string): Use unsigned char pointers. - -2002-03-12 Ulrich Weigand - - * reload1.c (reload): Ignore MEM REG_EQUIV notes if the equivalent - is not a valid memory_operand. - -2002-03-12 Bob Wilson - - * config/xtensa/xtensa-config.h: Define XCHAL_HAVE_LOOPS. - * config/xtensa/lib1funcs.asm: Fix copyright to include - special case for libgcc files. - (__udivsi3): Avoid loop instructions when XCHAL_HAVE_LOOPS is 0. - (__divsi3): Likewise. - (__umodsi3): Likewise. - (__modsi3): Likewise. - * config/xtensa/lib2funcs.S: Fix copyright to include - special case for libgcc files. - -2002-03-12 Michael Matz - - * config/rs6000/rs6000.md (ne0+4): Add extra CLOBBER. - (ne0+5): Use new clobber to generate proper shift pattern. - -2002-03-12 Bob Wilson - - * config/xtensa/t-xtensa (CRTSTUFF_T_CFLAGS_S): Define. - -2002-03-12 Bob Wilson - - * config/xtensa/xtensa.h (ASM_OUTPUT_POOL_PROLOGUE): Switch - to function_section before writing out the constant pool. - -2002-03-12 Zack Weinberg - - * Makefile.in: Give texi2pod its input file as a command - line argument, not on stdin. - -2002-03-12 Andrew MacLeod - - * config/sparc/sparc.h (RETURN_ADDR_RTX): Include v9 stack bias in - address calculation. - -2002-03-12 Ulrich Weigand - - * config/s390/s390.md (reload_insi, reload_indi): Change mode of - scratch register to DImode / TImode. - config/s390/s390.c (s390_expand_plus_operand): Make sure scratch - register used does not overlap the target. - -2002-03-11 Neil Booth - - * Makefile.in: Update. -doc: - * cppenv.texi, cppopts.texi: Split out of cpp.texi and gcc.texi. - Update documentation. - * gcc.texi: Include cppopts.texi and cppenv.texi. - * cpp.texi: Include cppopts.texi and cppenv.texi. - -2002-03-11 Ulrich Weigand - - * config/s390/s390.h (REG_ALLOC_ORDER): Add missing register. - -2002-03-11 Douglas B Rupp - - * toplev.c (vms_fopen): Remove, not needed. - - * vmsdbgout.c (lookup_filename): Adjust creation date for GMT. - - * config/alpha/xm-vms.h (__UNIX_FWRITE): Define. - - * config/alpha/alpha.c (alpha_sa_size, VMS): Don't reserve space - for FP, already done later. - - * toplev.c (debug_args): Add entry for VMS_DEBUG. - * vmsdbgout.c (vmsdbgout_init): Fix typo in call to xmalloc. - -2002-03-10 Richard Henderson - - PR 5693 - * reload.c (copy_replacements_1): New. - (copy_replacements): Use it to recurse through the rtx. - -2002-03-10 Richard Henderson - - * sched-rgn.c (add_branch_dependences): Don't allow insns that throw - to move away from the end of the block. - -2002-03-10 Neil Booth - - PR preprocessor/5899 - * cppinit.c (init_dependency_output): Don't ignore -dM etc. - -2002-03-10 Kaveh R. Ghazi - - * combine.c (make_extraction): Fix error in last change. - -2002-03-09 Jakub Jelinek - - PR optimization/5172, optimization/5200 - * gcse.c (gcse_main): Disable store_motion. - -2002-03-09 Andreas Schwab - - * gcc.c (validate_all_switches): Also handle `%W{...}'. - -2002-03-09 Jakub Jelinek - - PR middle-end/5877 - * expr.c (highest_pow2_factor): Check TREE_INT_CST_LOW - even for non-representable constants. - -Sat Mar 9 07:20:01 2002 Richard Kenner - - * emit-rtl.c (copy_most_rtx): Accept EXPR_LIST for may_share. - * function.c (fixup_var_refs): Add MAY_SHARE parameter. - (fixup_var_refs_insns, fixup_var_refs_insns_with_has): Likewise. - (fixup_var_refs_insn, fixup_var_refs_1): Likewise. - (pop_function_context): Compute MAY_SHARE parameter for - fixup_var_refs. - (fixup_var_refs_1, case MEM): Pass MAY_SHARE to copy_most_rtx, not VAR. - (gen_mem_addressof): Call fixup_var_refs with new parm. - - * combine.c (make_extraction): Don't make extension of CONST_INT. - -2002-03-08 Kaveh R. Ghazi - - * sparc.c (arith_4096_operand): Fix error in last change. - -2002-03-08 Aldy Hernandez - - * config/rs6000/rs6000.c (rs6000_va_arg): Fix alignment for - vectors. - -2002-03-08 Aldy Hernandez - - * config/rs6000/sysv4.h (BIGGEST_ALIGNMENT): Change for altivec. - -2002-03-08 Craig Rodrigues - - * doc/install.texi (--with-libiconv-prefix): Document. - -2002-03-08 Michael Y. Brukman - - * doc/sourcebuild.texi: Fix typo. - -2002-03-08 Jakub Jelinek - - PR c/3711 - * builtins.c (std_expand_builtin_va_arg): Do all computations on - trees. - -Fri Mar 8 06:48:45 2002 Richard Kenner - - * rtl.c (copy_most_rtx): Move from here ... - * emit-rtl.c (copy_most_rtx): ... to here. - -2002-03-08 Richard Earnshaw - - * combine.c (simplify_comparison): If simplifying a logical shift - right and compare with constant, force the comparison to unsigned. - -2002-03-07 Ulrich Weigand - - * genextract.c (walk_rtx): Recurse into MATCH_PAR_DUP. - genoutput.c (scan_operands): Recurse into MATCH_PAR_DUP - and MATCH_OP_DUP. - -2002-03-07 Aldy Hernandez - - * doc/invoke.texi: Add documentation for -mabi=no-altivec. - - * config/rs6000/rs6000.c (rs6000_parse_abi_options): Add - -mabi=no-altivec - (alt_reg_names): Remove % for vrsave. - -2002-03-06 Jeffrey A Law (law@redhat.com) - - * ssa-ccp.c (ssa_fast_dce): Update the DF def-use chains - after completing fast dead code elimination. - -2002-03-06 Richard Henderson - - PR optimization/5844 - * genemit.c (gen_exp): New argument used. Invoke copy_rtx - if used indicates we've already emitted one copy of an operand. - (gen_insn, gen_expand, output_add_clobbers): Supply a null used. - (gen_split): Supply a non-null used. - -2002-03-06 Ulrich Weigand - - * simplify-rtx.c (simplify_plus_minus): Do not abort, - but simply fail if the expression is too complex to simplify. - (simplify_gen_binary): Handle simplify_plus_minus failures. - -2002-03-06 Ulrich Weigand - - * reload1.c (reload): Unshare all rtl after reload is done. - -2002-03-06 Jakub Jelinek - - * ssa-ccp.c (ssa_ccp_substitute_constants): Backout 2002-03-05 - patch. - -2002-03-05 Zack Weinberg - - * cppmain.c (setup_callbacks): Disable #pragma and #ident - callbacks when processing assembly language. - -2002-03-06 John David Anglin - - * pa.h (ASM_FILE_END): Define. - * som.h (ASM_FILE_END): Delete. - - * pa.c (function_arg): Don't pass floats in general registers in - indirect calls if TARGET_ELF32. - -2002-03-05 Richard Henderson - - * config/i386/i386.md (floatsidf2): Conditionalize on hard-float. - -2002-03-05 Jakub Jelinek - - * mklibgcc.in: Prepend a tab before .hidden, add $flags to gcc - -r command line. Don't hide any symbols if not building - shared libgcc. - -2002-03-05 Jakub Jelinek - - * expmed.c (emit_store_flag): Don't test BITS_PER_WORD * 2 - wide volatile memory by parts. - -2002-03-05 Jakub Jelinek - - * ssa-ccp.c (ssa_ccp_substitute_constants): Don't crash if def - is NULL. - -2002-03-05 Richard Henderson - - * config/rs6000/rs6000.h (TOTAL_ALTIVEC_REGS): Fix off-by-one error. - -2002-03-04 Krister Walfridsson - - * config.gcc (*-*-netbsd*): Add t-slibgcc-elf-ver to tmake_file. - -2002-03-05 Joseph S. Myers - - * configure.in: Increase required makeinfo version to 4.1. - * configure: Regenerate. - -2002-03-04 Joseph S. Myers - - * doc/include/texinfo.tex: Update to version 2002-03-01.06. - * doc/invoke.texi: Fix @math uses. - -2002-03-02 Per Bothner - - * gcc.c (option_map): Suport new --bootclasspath option. - --CLASSPATH is now just an alias for --classpath. - -Sat Mar 2 06:30:14 2002 Richard Kenner - - * config/sparc/sparc.c (sparc_initialize_trampoline): Use - trunc_int_for_mode. - - * emit-rtl.c (offset_address): Call update_temp_slot_address. - -2002-03-01 Richard Henderson - - * config/ia64/ia64.c (ia64_initial_elimination_offset): Do not - adjust argument_pointer by pretend_args_size. - (ia64_va_start): Adjust va_start address by -pretend_args_size. - -2002-03-01 Zack Weinberg - - * doc/cpp.texi: Clarify documentation of relationship between - #line and #include. - -2002-02-28 Richard Henderson - - * expmed.c (store_bit_field): Prevent generation of CONCATs; - pun complex values as integers; use gen_lowpart instead of - gen_rtx_SUBREG. - (extract_bit_field): Likewise. - -2002-02-28 David O'Brien - - * config.gcc (sparc64-*-freebsd): Explicitly accept a cpu specification - of "ultrasparc". - * config/sparc/freebsd.h: Do not use MASK_FASTER_STRUCTS. It appears - to be broken. - -2002-02-28 Alexandre Oliva - - * gcc.c (init_gcc_specs): Get -static and -static-libgcc to - override -shared and -shared-libgcc. - -2002-02-28 Andrew MacLeod - - * dwarf2out.c (stack_adjust_offset): Add support for POST_INC, - POST_DEC, and POST_MODIFY. - -2002-02-28 Joseph S. Myers - - * doc/invoke.texi, doc/standards.texi: Link to - gcc-3.1/c99status.html. - -2002-02-28 Richard Henderson - - * config/ia64/ia64.c (ia64_adjust_cost): All non-MM consumers have - 4 cycle latency from MM producers. - (ia64_internal_sched_reorder): Likewise with pipeline flush. - -2002-02-28 Jakub Jelinek - - * mklibgcc.in: Don't use GNU make extension. - -2002-02-28 Richard Henderson - - * haifa-sched.c (sched_emit_insn): New. - (schedule_block): Use last_scheduled_insn to track last insn. - * sched-int.h (sched_emit_insn): Prototype. - * config/ia64/ia64.c (last_issued): Remove. - (ia64_variable_issue): Don't set it. - (nop_cycles_until): Use sched_emit_insn. - -2002-02-28 Bo Thorsen - - * config/i386/linux64.h (LINK_SPEC): Fix 32/64 bit compilation. - (STARTFILE_SPEC): Add 64 bit files. - (ENDFILE_SPEC): Likewise. - -Don Feb 28 16:41:19 CET 2002 Jan Hubicka - - * cfgrtl.c (purge_dead_edges): Fix handling of EH edges. - - * i386.h (CONDITIONAL_REGISTER_USAGE): Do not write to - PIC_OFFSET_TABLE_REGNUM when it is INVALID_REGNUM - - * x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Always define. - -2002-02-28 David Edelsohn - - * config/rs6000/aix43.h (THREAD_MODEL_SPEC): Delete. - * config/rs6000/aix51.h (THREAD_MODEL_SPEC): Delete. - -2002-02-28 Alan Modra - - * config/rs6000/rs6000.md (load_toc_aix_di): Handle TARGET_RELOCATABLE. - -2002-02-28 Jason Merrill - - * c-decl.c (finish_function): Only warn about missing return - statement with -Wreturn-type. - -2002-02-27 Zack Weinberg - - * mklibgcc.in: Don't use \n in a line subject to - interpretation by echo. - -2002-02-27 Ulrich Weigand - - * config/s390/s390.c (s390_chunkify_pool): Do not confuse - insn UIDs with insn addresses. - -2002-02-27 Graham Stott - - * config/rs6000/rs6000.h (ASM_OUTPUT_DEF_FROM_DECL): - Constify NAME. - - * loop.c (prescan_loop): Handle PARALLEL. - - * unroll.c (loop_iterations): Return 0 if the add_val for - a BIV is REG. - - * final.c (output_operand_lossage): Constify PFX_STR. - - * df.c (df_insn_refs_record): Use XEXP (x, 0) for USE. - -2002-02-26 Richard Henderson - - * config/alpha/alpha.md (ashldi_se): Re-enable. - -2002-02-26 Kelley Cook - - * config/i386/i386.c (print_operand): Don't append ATT-style - length suffixs to x87 opcodes when in Intel mode. - -2002-02-26 Ryan T. Sammartino - - * emit-rtl.c (gen_const_vector_0): Remove TYPE argument. - (init_emit_once): Update calls. - * fixinc/gnu-regex.c (_GNU_SOURCE): Remove. - (init_syntax_once): Prototype. - -2002-02-26 John David Anglin - - * pa-linux.h (LIB_SPEC): Update definition. - * pa32-linux.h (LINK_COMMAND_SPEC): Delete. - -2002-02-26 Alexandre Oliva - - * dwarf2out.c (gen_inlined_subroutine_die): If block is abstract, - generate a die for the lexical block. - -2002-02-26 Richard Henderson - - * expr.c (expand_expr) [MULT_EXPR]: Do not apply distributive law - in EXPAND_SUM case. Use host_integerp/tree_low_cst. - -2002-02-26 Richard Henderson - - * config/ia64/ia64.c (nop_cycles_until): Do init_insn_group_barriers - if we emitted a stop bit. - -2002-02-26 Jakub Jelinek - - * configure.in (libgcc_visibility): Substitute. - * configure: Rebuilt. - * mklibgcc.in: If libgcc_visibility = yes, make libgcc.a global - defined symbols .hidden. - -2002-02-26 Jakub Jelinek - - PR debug/5770 - * dwarf2out.c (rtl_for_decl_location): Return CONST_STRING for - STRING_CST initializer spanning the whole variable without - embedded zeros. - If expand_expr returned MEM, don't use it. - -2002-02-25 Jakub Jelinek - - PR target/5755 - * config/i386/i386.c (ix86_return_pops_args): Only pop - fake structure return argument if it was passed on the stack. - -2002-02-25 Jason Merrill - - * attribs.c (decl_attributes): Also re-layout PARM_DECL and - RESULT_DECL. - -2002-02-25 Alexandre Oliva - - * gcc.c (init_gcc_specs): Get -shared-libgcc along with -shared to - link with shared_name only. - * doc/invoke.texi (Link Options): Document new behavior. - -2002-02-25 Aldy Hernandez - - * c-typeck.c (push_init_level): Handle vectors. - -2002-02-25 Alexandre Oliva - - * config/sparc/sparc.c (const64_high_operand): Zero-extend - operands of SPARC_SETHI_P. - (input_operand): Likewise. - (sparc_emit_set_const32): Likewise. - * config/sparc/sparc.h (SPARC_SETHI_P): Disregard TARGET_ARCH64. - (SPARC_SETHI32_P): Zero-extend operand from 32 bits. - (CONST_OK_FOR_LETTER_P): Use SETHI32 for `K'. Add `N' as SETHI. - * config/sparc/sparc.md (movdi_insn_sp64_novis): Use `N'. - (movdi_insn_sp64_vis): Likewise. - (movdi split, movdf split): Use SETHI32. - * doc/md.texi: Document SPARC constraints L, M and N. - -2002-02-25 Aldy Hernandez - - * config/rs6000/rs6000.md ("get_vrsave_internal"): New. - ("*set_vrsave_internal"): use mfspr for Darwin. - - * config/rs6000/rs6000.c (rs6000_emit_prologue): Call - gen_get_vrsave_internal. - -Sun Feb 24 16:38:56 2002 Richard Kenner - - * optabs.c (widen_operand): Properly handle CONST_INT for NO_EXTEND. - -2002-02-24 Neil Booth - - * cpplex.c (cpp_interpret_charconst): Get signedness or - otherwise of wide character constants correct. - * cppexp.c (lex): Get signedness of wide charconsts correct. - -Sun Feb 24 07:41:31 2002 Richard Kenner - - * optabs.c (widen_operand): Only call convert_modes for - promoted SUBREG if signedness matches. - * config/alpha/alpha.md (*addsi_se2, *subsi_se2): New patterns. - -2002-02-23 Neil Booth - - * cpplib.c (glue_header_name): Use local buffer to build up - header name. - -2002-02-23 Neil Booth - - * doc/cpp.texi, doc/invoke.texi: Update documentation for -MM. - -2002-02-23 Kazu Hirata - - * config/h8300/h8300.c (output_simode_bld): Handle H8/300 and - H8/300[HS] separately. - * config/h8300/h8300.md: Remove the early clobber constraint - from bit field patterns. - -2002-02-23 Kazu Hirata - - * config/h8300/h8300.md (mulqihi3): Tighten predicates to - register_operand. - (mulhisi3): Likewise. - (umulqisi3): Likewise. - (umulhisi3): Likewise. - -2002-02-23 Neil Booth - - * cppinit.c (output_deps): Correct test for stdout output. - (init_dependency_output): Cure warning. - -Sat Feb 23 08:42:47 2002 Richard Kenner - - * expr.c (store_expr): When converting expression to promoted - equivalent type, allow using SUBREG_REG of TARGET as the target - of the expansion of EXP. - * loop.c (basic_induction_var, case SUBREG): Always look inside. - * config/alpha/alpha.c (rtx_equiv_function_matters): Delete decl. - (alpha_emit_set_const): Handle SImode when can't make new pseudos. - (alpha_emit_set_const_1, alpha_sa_mask): Use no_new_pseudos. - * config/alpha/alpha.md (addsi3, subsi3): Don't use if optimizing. - -2002-02-23 Joseph S. Myers - - * doc/contribute.texi, doc/extend.texi, doc/install.texi, - doc/invoke.texi, doc/md.texi, doc/passes.texi, doc/rtl.texi, - doc/standards.texi, doc/tm.texi: Remove trailing whitespace. - -2002-02-23 Jakub Jelinek - - PR optimization/5747 - * loop.c (scan_loop): Update reg info if move_movables created new - pseudos. - -2002-02-23 David Edelsohn - - * gcc.c (init_gcc_spec): Revert last change. - -2002-02-23 David Edelsohn - - * config/rs6000/rs6000.md (load_toc_aix_{si,di}): Use - gpc_reg_operand constraint. - -2002-02-23 Alan Modra - - * config/rs6000/rs6000.c (num_insns_constant): Fix formatting. - Simplify comparison of `low'. - (add_operand): Fix formatting. - (non_add_cint_operand): Use CONST_OK_FOR_LETTER_P. - (mask_operand): Disallow mask to wrap in 64-bit mode. - (rs6000_stack_info): Remove redundant test setting push_p. - (output_toc): Fix formatting. - * config/rs6000/rs6000.md (boolsi3, boolcsi3 splitters): Use - cc_reg_not_cr0_operand constraint. - (booldi3, boolcdi3 splitters): Same. - -2002-02-23 Aldy Hernandez - - * config/rs6000/altivec.h: Add extra level of parentheses on casts. - -2002-02-22 David Edelsohn - - * gcc.c (init_gcc_spec): Do not link with static libgcc.a if - gcc invoked with -shared-libgcc. - -2002-02-22 Jakub Jelinek - - PR c++/5748 - * stmt.c (expand_anon_union_decl): Set TREE_USED on the anon union - decl if any of elements was TREE_USED. - -2002-02-22 Alexandre Oliva - - * config/sparc/sol2.h: Don't include sys/mman.h. - * config/sparc/sparc.c (arith_operand): Use SMALL_INT32. - (arith_4096_operand): Don't throw high bits away. - (const64_operand): Take sign extension of CONST_INTs into account. - (const64_high_operand, sparc_emit_set_const32): Likewise. - (GEN_HIGHINT64): Likewise. - (sparc_emit_set_const64_quick1): Likewise. - (const64_is_2insns): Likewise. - (print_operand): Use trunc_int_for_mode for sign extension. - * config/sparc/sparc.h (SMALL_INT32): Likewise. - * config/sparc/sparc.md (movqi): Sign-extend CONST_DOUBLE - chars. Assume CONST_INT is already properly sign-extended. - (movdi split): Sign-extend each SImode part. - (andsi3 split): Don't mask high bits off, so that result - remains properly sign-extend. - (iorsi3 split): Likewise. - (xorsi3 split): Likewise. - -2002-02-22 Richard Sandiford - - * fold-const.c (fold): Fix typo in comments. - -2002-02-21 Diego Novillo - - * Makefile.in (langhooks.o): Update dependencies. - -2002-02-21 Diego Novillo - - * langhooks.c: Include flags.h. - -2002-02-21 Aldy Hernandez - - * testsuite/gcc.dg/attr-alwaysinline.c: New. - - * c-common.c (c_common_post_options): Set inline trees by - default. - - * doc/extend.texi (Function Attributes): Document always_inline - attribute. - Update documentation about inlining when not optimizing. - - * cp/decl.c (duplicate_decls): Merge always_inline attribute. - - * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0 - unless DECL_ALWAYS_INLINE. - - * c-objc-common.c (c_cannot_inline_tree_fn): Do not inline at -O0 - unless DECL_ALWAYS_INLINE. - (c_disregard_inline_limits): Disregard if always_inline set. - - * langhooks.c (lhd_tree_inlining_disregard_inline_limits): - Disregard if always_inline set. - (lhd_tree_inlining_cannot_inline_tree_fn): Do not inline at -O0 - unless DECL_ALWAYS_INLINE. - - * attribs.c (handle_always_inline_attribute): New. - (c_common_attribute_table): Add always_inline. - - * config/rs6000/altivec.h: Add prototypes for builtins - requiring the always_inline attribute. - -2002-02-21 Eric Christopher - - * expmed.c (store_bit_field): Try to simplify the subreg - before generating a new one when when the mode size of - value is less than maxmode. - -2002-02-21 Richard Henderson - - * emit-rtl.c (offset_address): Use simplify_gen_binary rather - than gen_rtx_PLUS to form the sum. - * explow.c (force_reg): Rearrange to not allocate new pseudo - when force_operand returns a register. - * expr.c (expand_assignment): Allow offset_rtx expansion to - return a sum. Do not force addresses into registers. - (expand_expr): Likewise. - * simplify-rtx.c (simplify_gen_binary): Use simplify_plus_minus - to canonicalize arithmetic that didn't simpify. - (simplify_plus_minus): New argument force; update - all callers. Don't split CONST unless we can do something with it, - and wouldn't lose the constness of the operands. - - * config/i386/i386.c (legitimize_pic_address): Recognize UNSPECs - that we generated earlier. - -2002-02-21 Tom Tromey - - * dwarf2out.c (DWARF_LINE_MIN_INSTR_LENGTH): Removed. - (output_line_info): Use constant `1', with a long explanatory - comment. - * system.h (DWARF_LINE_MIN_INSTR_LENGTH): Poison. - -Thu Feb 21 22:43:44 2002 J"orn Rennecke - - * jump.c (redirect_jump): If old label has no UID, don't try to - delete it. - -Thu Feb 21 21:17:21 2002 J"orn Rennecke - - * sh.md (insv): Provide byte offsets for gen_rtx_SUBREG. - If input is constant, do shifts at compile time. - -2002-02-21 Joseph S. Myers - - * doc/extend.texi: Fix some more overfull hboxes. - -2002-02-21 Jakub Jelinek - - PR optimization/4994 - * config/i386/i386.md (movsi_1, movsf_1): Support MMX -> MMX - register moves. - -2002-02-21 Jakub Jelinek - - PR c++/4574 - * expr.h (expand_and): Add mode argument. - * expmed.c (expand_and): Add mode argument. - (expand_mult_highpart_adjust, emit_store_flag): Adjust callers. - * expr.c (store_field, expand_expr, do_store_flag): Likewise. - * except.c (expand_builtin_extract_return_addr): Likewise. - * config/alpha/alpha.c (alpha_initialize_trampoline): Likewise. - * config/sparc/sparc.c (sparc_initialize_trampoline): Likewise. - * config/c4x/c4x.h (INITIALIZE_TRAMPOLINE): Likewise. - Use GEN_INT (x) instead of gen_rtx (CONST_INT, VOIDmode, x). - * config/c4x/c4x.md: Use GEN_INT (x) instead of - gen_rtx (CONST_INT, VOIDmode, x). - -2002-02-21 Jakub Jelinek - - PR c/4697: - * stmt.c (warn_if_unused_value): Move side effects test once more. - -2002-02-20 Torbjorn Granlund - - * config/avr/avr.md: Add more patterns for mized-mode add and subtract - (addsi3_zero_extend, subhi3_zero_extend1, subsi3_zero_extend). - -Thu Feb 21 16:20:46 2002 Alexandre Oliva - - * rtlanal.c (replace_rtx): Don't make a CONST_INT the operand of - SUBREG or ZERO_EXTEND. - -Thu Feb 21 15:35:46 2002 J"orn Rennecke - - * sh.h (current_function_anonymous_args): Remove. - (SETUP_INCOMING_VARARGS): Don't set it - just check that one - of current_function_varargs and current_function_stdarg is set. - * sh.c (sh_expand_prologue): Check current_function_varargs / - current_function_stdarg / TARGET_SH5 instead of - current_function_anonymous_args. - - * sh64.h (TARGET_VERSION): Define. - -2002-02-20 David Edelsohn - - * config/rs6000/rs6000.h (EPILOGUE_USES): Conditionalize - VRSAVE_REGNO on TARGET_ALTIVEC. - -2002-02-20 Alan Modra - - * config/rs6000/rs6000.c (includes_lshift_p): Mask irrelevant - bits of SImode const_int. - (includes_rshift_p): Likewise. - (print_operand): Call mask_operand and mask64_operand with correct - mode. - (rs6000_output_function_epilogue): Pad traceback table to word. - * config/rs6000/rs6000.h (MASK_64BIT): Correct comment. - (EXTRA_CONSTRAINT, 'S' and 'T'): Call mask_operand and - mask64_operand with correct mode. - (FUNCTION_ARG_REGNO_P): Correct parentheses. - -2002-02-20 Jakub Jelinek - - PR debug/4461 - * varasm.c (get_pool_constant_mark): New. - * rtl.h (get_pool_constant_mark): Add prototype. - * dwarf2out.c (mem_loc_descriptor): A pool constant cannot - be represented if it has not been output. - -2002-02-20 Alexandre Oliva - - * combine.c (do_SUBST): Sanity check substitutions of - CONST_INTs, and reject them in SUBREGs and ZERO_EXTENDs. - (subst): Simplify SUBREG or ZERO_EXTEND instead of SUBSTing a - CONST_INT into its operand. - (known_cond): Likewise, for ZERO_EXTEND. - * simplify-rtx.c (simplify_unary_operation): Fix condition to - allow for simplification of wide modes. Reject CONST_INTs in - ZERO_EXTEND when their actual mode is not given. - -2002-02-20 Alexandre Oliva - - * c-decl.c (pushdecl): If no global declaration is found for an - extern declaration in block scope, try a limbo one. - -2002-02-20 Jakub Jelinek - - PR c++/4401 - * c-common.c (pointer_int_sum): Moved from... - * c-typeck.c (pointer_int_sum): ...here. - * c-common.h (pointer_int_sum): Add prototype. - -2002-02-20 Jakub Jelinek - - PR c++/5713 - * c-decl.c (duplicate_decls): Return 0 if issued error about - redeclaration. - -2002-02-20 Roger Sayle - Jakub Jelinek - - PR c/4389 - * tree.c (host_integerp): Ensure that the constant integer is - representable in a HOST_WIDE_INT or an unsigned HOST_WIDE_INT - when pos is zero or non-zero respectively. Clarify comment. - * c-format.c (check_format_info_recurse): Fix host_integerp - usage; the pos argument should be zero when assigning to a - signed HOST_WIDE_INT. - -2002-02-20 Richard Henderson - - * config/i386/i386.c (ix86_expand_vector_move): Use the mode - of the operand, rather than assuming TImode. - (ix86_expand_binop_builtin): Cope with commutative patterns - using nonimmediate_operand for both operands. - (ix86_expand_timode_binop_builtin): Likewise. - (ix86_expand_store_builtin): Validate operand 1. - (ix86_expand_unop1_builtin): Likewise. - -2002-02-20 Philip Blundell - - PR 5705 - * config/arm/arm.h (HARD_REGNO_RENAME_OK): New macro. - -2002-02-20 Richard Henderson - - PR c/5615 - * expr.h (ARGS_SIZE_TREE): Convert size.var to ssizetype. - -2002-02-20 Tom Tromey - - * config/fr30/fr30.h (DWARF_LINE_MIN_INSTR_LENGTH): Removed. - * config/sh/sh.h (DWARF_LINE_MIN_INSTR_LENGTH): Removed. - * config/pj/pj.h (DWARF_LINE_MIN_INSTR_LENGTH): Removed. - * config/cris/cris.h (DWARF_LINE_MIN_INSTR_LENGTH): Removed. - * dwarf2out.c (DWARF_LINE_MIN_INSTR_LENGTH): Define - unconditionally. - -Wed Feb 20 00:03:25 EST 2002 Alan Matsuoka - - * config/rs6000/rs6000.h (LEGITIMATE_OFFSET_ADDRESS_P): Look - for (const_int 0) in X not just INTVAL. - -2002-02-20 Joseph S. Myers - - * doc/extend.texi: Avoid or reduce overfull hboxes. - -2002-02-20 Diego Novillo - - * expmed.c (store_bit_field): Do not store bit fields using SUBREG - operations if the field does not start at a mode boundary. - -2001-02-20 Joel Sherrill - - * config/a29k/rtems.h, config/arm/rtems-elf.h, config/h8300/rtems.h, - config/mips/rtems.h: Use new style of -Asystem= rather than -Asystem(). - Also done for -Acpu and -Amachine. - -2002-02-20 Neil Booth - - * cppinit.c (init_dependency_output): Take deps output file - from -o if none given with -MF. Suppress normal output. - * gcc.c (cpp_unique_options): Have -M and -MM imply -E. - * doc/cpp.texi, doc/invoke.texi: Update. - -2002-02-19 Zack Weinberg - - * toplev.c (output_quoted_string): Write unprintable - characters with octal escapes. - -2002-02-19 David Edelsohn - - * config/rs6000/rs6000.h (CONDITIONAL_REGISTER_USAGE): Set - really_call_used[VRSAVE_REGNO] if not Altivec. - -2002-02-19 Alan Modra - - * config/rs6000/rs6000.c (u_short_cint_operand): Mask op with - MODE_MASK. - (constant_pool_expr_1): Fix formatting. - (rs6000_legitimize_reload_address): Likewise. - -Tue Feb 19 20:13:57 2002 Richard Kenner - - * config/sparc/sparc.md (nonlocal_goto): Use hard_frame_pointer_rtx - now that we have one. - -2002-02-19 Zack Weinberg - - * tree.h (struct tree_common): Remove aux. Add unused_0 at - end of first block of bitfields (which was only seven bits); - rename dummy to unused_1; remove comment which is no longer true. - -2002-02-19 Gaute B Strokkenes - - * doc/c-tree.texi (Classes, TYPE_BINFO): Fix typo. - -2002-02-19 Philip Blundell - - PR 5399 - * config/arm/arm.h (THUMB_LEGITIMATE_CONSTANT_P): Accept anything - if generating PIC. - - PR 5054 - * config/arm/arm.md (call_insn) [TARGET_THUMB]: Use - arm_is_longcall_p rather than inspecting call-type cookie - directly. - (call_value_insn) [TARGET_THUMB]: Likewise. - -2002-02-19 Graham Stott - - * config/i386/i386.c (ix86_expand_builtin): Fix typo. - -2002-02-19 David Edelsohn - - * config/rs6000/linux64.h (LINK_OS_LINUX_SPEC): Look in /lib64. - ({STARTFILE,ENDFILE}_LINUX_SPEC): Define. - (FP_SAVE_INLINE): Delete. - - * config/rs6000/sysv4.h (ENDFILE_SPEC): Add crtsaveres.o. - * config/rs6000/eabi.asm: Remove ABI save restore routines. - * config/rs6000/t-ppccomm: Build crtsavres.o. - * config/rs6000/crtsavres.asm: New file. - -2002-02-19 Philip Blundell - - * config/arm/arm.c (use_return_insn): Don't reject interrupt - functions. - (arm_compute_save_reg_mask): Save LR for interrupt functions too. - (output_return_instruction): Allow interrupt functions to return with - ldmfd sp!, {... pc}^. Use LDR to restore any single register. - (arm_expand_prologue): Subtract 4 before stacking LR in an - interrupt function. - -2002-02-19 Philip Blundell - - * config/arm/arm.c (arm_encode_call_attribute): Operate on any - decl, not just FUNCTION_DECL. - (legitimize_pic_address): Handle local SYMBOL_REF like LABEL_REF. - (arm_assemble_integer): Likewise. - * config/arm/arm.h (ARM_ENCODE_CALL_TYPE): Allow any decl to be - marked local. - -2002-02-19 matthew green - - * config.gcc (sparc-*-netbsdelf*): Enable target. - (sparc64-*-netbsd*): New target. - * config/sparc/netbsd-elf.h: New file. - * config/sparc/t-netbsd64: New file. - -2002-02-19 Gaute B Strokkenes - - * doc/rtl.texi (Flags, MEM_SCALAR_P): Fix typo. - -2002-02-19 Ryan T. Sammartino - - * doc/invoke.texi: explicitly list the style guidelines that - -Weffc++ checks for. - -Tue Feb 19 12:37:23 CET 2002 Jan Hubicka - - * regmove.c (regmove_optimize): Avoid increasing of register pressure. - -2002-02-19 Neil Booth - - PR other/5718 - * gcc.c (cpp_unique_options): Treat -o as indicating object file - only if not -E. If -E, pass -o through to the preprocessor. - -2002-02-19 Kazu Hirata - - * config/h8300/h8300.h (REGNO_REG_CLASS): Replace a literal - register number with an appropriate macro. - -2002-02-19 Bryce McKinlay - - * doc/rtl.texi (Constants): Close @code tag. - -2002-02-19 Aldy Hernandez - - * config/i386/i386.md ("mmx_uavgv8qi3"): Use const_vector. - ("mmx_uavgv4hi3"): Same. - ("pmulhrwv4hi3"): Same. - - * tree-inline.c (walk_tree): Handle vectors. - - * c-common.c (constant_expression_warning): Handle vectors. - (overflow_warning): Same. - - * sched-deps.c (sched_analyze_2): Handle vectors. - - * rtlanal.c (rtx_unstable_p): Handle vectors. - (rtx_varies_p): Same. - (count_occurrences): Same. - (regs_set_between_p): Same. - (modified_between_p): Same. - (modified_in_p): Same. - (volatile_insn_p): Same. - (volatile_refs_p): Same. - (side_effects_p): Same. - (may_trap_p): Same. - (inequality_comparisons_p): Same. - (replace_regs): Same. - (computed_jump_p_1): Same. - - * rtl.c (DEF_MACHMODE): Change all definitions to accept 8th - argument. - (inner_mode_array): New. - (copy_rtx): Handle vectors. - (copy_most_rtx): Same. - (rtx_equal_p): Same. - (get_mode_alignment): Adjust for vectors. - - * resource.c (mark_referenced_resources): Handle vectors. - (mark_set_resources): Same. - - * reload1.c (eliminate_regs): Handle vectors. - (elimination_effects): Same. - (scan_paradoxical_subregs): Same. - - * reload.c (subst_reg_equivs): Handle vectors. - - * regrename.c (scan_rtx): Handle vectors. - - * regclass.c (reg_scan_mark_refs): Handle vectors. - - * recog.c (find_single_use_1): Handle vectors. - - * local-alloc.c (equiv_init_varies_p): Handle vectors. - (contains_replace_regs): Same. - (memref_referenced_p): Same. - - * integrate.c (copy_rtx_and_substitute): Handle vectors. - (subst_constants): Same. - - * genattrtab.c (attr_copy_rtx): Handle vectors. - (encode_units_mask): Same. - (clear_struct_flag): Same. - (count_sub_rtxs): Same. - - * gcse.c (want_to_gcse_p): Handle vectors. - (oprs_unchanged_p): Same. - (hash_expr_1): Same. - (oprs_not_set_p): Same. - (expr_killed_p): Same. - (compute_transp): Same. - (store_ops_ok): Same. - - * function.c (purge_addressof_1): Do not allow paradoxical subregs - of vectors. - (fixup_var_refs_1): Same. - (instantiate_virtual_regs_1): Same. - - * fold-const.c (operand_equal_p): Handle vectors. - (fold): Same. - (rtl_expr_nonnegative_p): Same. - - * flow.c (mark_used_regs): Handle vectors. - - * df.c (df_uses_record): Handle vectors. - - * cselib.c (cselib_subst_to_values): Handle vectors. - (cselib_mem_conflict_p): Same. - (hash_rtx): Same. - - * cse.c (canon_reg): Handle vectors. - (fold_rt): Same. - (cse_process_notes): Same. - (count_reg_usage): Same. - (canon_hash): Same. - - * alias.c (nonlocal_mentioned_p): Add case for CONST_VECTOR. - - * combine.c (mark_used_regs_combine): Add case for CONST_VECTOR. - - * emit-rtl.c (init_emit_once): Generate const0_rtx for vectors. - (gen_rtx): Handle CONST_VECTOR. - (gen_const_vector_0): New. - (copy_rtx_if_shared): CONST_VECTORs can be shared. - (reset_used_flags): Same. - (copy_insn_1): Same. - (initializer_constant_valid_p): Handle VECTOR_CST. - - * doc/c-tree.texi (Expression trees): Document VECTOR_CST. - - * doc/rtl.texi (Constants): Document const_vector. - (CONST0_RTX): Update for vectors. - (RTL sharing): Same. - - * print-tree.c (print_node): Add case for VECTOR_CST. - - * tree.h (TREE_VECTOR_CST_ELTS): New. - (struct tree_vector): New. - (union tree_node): Add vector node. - (build_vector): Add prototype. - - * tree.def (VECTOR_CST): New. - - * tree.c (build_vector): New. - - * expmed.c (make_tree): Handle CONST_VECTOR. - - * rtl.h (CONSTANT_P): CONST_VECTORs are constants too. - (CONST_VECTOR_ELT): New. - (CONST_VECTOR_NUNITS): New. - - * machmode.h (GET_MODE_INNER): New. - (DEF_MACHMODE): Accept 8th arg. - - * machmode.def: Add 8th argument for vector inner mode. - Add inner vector modes for vectors. - - * rtl.def (VEC_CONST): Remove. - (CONST_VECTOR): New. - - * expr.c (clear_storage): Allow vectors. - (is_zeros_p): Handle VECTOR_CST. - - * varasm.c (output_constant_pool): Handle vectors. - (rtx_const): Add veclo and vechi fields. - (kind): Add RTX_VECTOR. - (decode_rtx_const): Add case for vector. - - * config/rs6000/rs6000-protos.h: Add zero_constant. - - * config/rs6000/rs6000.c (rs6000_emit_move): Handle vector - constants. Force easy vector constants into memory. - (easy_vector_constant): New. - (emit_easy_vector_constant): New. - (rs6000_legitimize_reload_address): Do not generate bad reloads on - darwin. - - * config/rs6000/rs6000.md ("altivec_lvx"): Reflect what - instruction does. - ("altivec_lvxl"): Same. - (altivec_lvebx): Same. - (altivec_lvehx): Same. - (altivec_lvewx): Same. - ("*movv4si_const0"): New. - ("*movv4sf_const0"): New. - ("*movv8hi_const0"): New. - ("*movv16qi_const0"): New. - -2002-02-18 Kazu Hirata - - * config/h8300/h8300.c (notice_update_cc): Use - cc_status.value2. - -2002-02-18 Kazu Hirata - - * config/h8300/h8300.md (divmod patterns): Change the - constraints for operands[1] to register_operand. - -2002-02-18 Kazu Hirata - - * config/h8300/h8300-protos.h: Remove the prototype for - p_operand. - * config/h8300/h8300.c (p_operand): Remove. - * config/h8300/h8300.md: Replace p_operand with - const_int_operand. - -2002-02-18 Philip Blundell - - * config/arm/arm.c (arm_compute_save_reg_mask): Fix typo in - comment. - (output_return_instruction): Allow use of LDR to unstack - return addresss even for interrupt handlers or when - interworking. If compiling for ARMv5, use interworking-safe - return instructions by default. Remove duplicated code and - lengthy "strcat" sequences. - -2002-02-18 Franz Sirl - - * config/rs6000/sysv4.h (STARTFILE_SPEC): Use crtbeginT.o for -static. - (LINK_EH_SPEC): Define. - * config/rs6000/t-ppccomm (EXTRA_MULTILIB_PARTS): Add crtbeginT.o. - -2002-02-18 Ulrich Weigand - - * config/s390/s390.c (s390_emit_prologue): Do not set the - frame_related flag for call-clobbered registers. - -Mon Feb 18 15:07:35 CET 2002 Jan Hubicka - - * i386.c (classify_argument): Properly classify SSE/MMX modes and VOIDmode. - (construct_container): Fix handling of SSE operands. - (ix86_expand_builtin): Fix handling of 64bit pointers. - (mmx_maskmovq_rex): New pattern. - -Mon Feb 18 11:55:55 CET 2002 Jan Hubicka - - * regrename.c (kill_set_value): Handle subregs properly. - -2002-02-18 David Billinghurst - - * objc/objc-act.c (handle_impent): Remove leading '*' - from objc_class_name. - -2002-02-17 Richard Henderson - - * config/alpha/alpha.c (some_small_symbolic_operand, - some_small_symbolic_operand_1, split_small_symbolic_operand, - split_small_symbolic_operand_1): Rename from *symbolic_mem_op*. - Handle small SYMBOL_REFs anywhere, not just inside memories. - * config/alpha/alpha-protos.h: Update. - * config/alpha/alpha.h (PREDICATE_CODES): Update. - * config/alpha/alpha.md (small symbolic operand splitter): Update. - -2002-02-17 Roland McGrath - - * config.gcc (powerpc-*-gnu-gnualtivec*, - powerpc-*-gnu*, powerpc64-*-gnu*): New configurations. - * config/rs6000/gnu.h: New file. - * config/rs6000/sysv4.h (SUBTARGET_OVERRIDE_OPTIONS): - Grok "gnu" in rs6000_abi_name. - (ASM_SPEC, CC1_SPEC, LINK_START_SPEC, LINK_OS_SPEC, - CPP_ENDIAN_SPEC, CPP_SPEC, STARTFILE_SPEC, LIB_SPEC, ENDFILE_SPEC): - Grok -mcall-gnu analogous to -mcall-linux et al. - (LIB_GNU_SPEC, STARTFILE_GNU_SPEC, ENDFILE_GNU_SPEC, - LINK_START_GNU_SPEC, LINK_OS_GNU_SPEC, CPP_OS_GNU_SPEC): New macros. - (SUBTARGET_EXTRA_SPECS): Add *_os_gnu specs using them. - -2002-02-17 Jakub Jelinek - - PR c/3444: - * c-typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit - shortening. - -2002-02-17 Philipp Thomas - - * config/cris/cris.h: Undefine STARTFILE_SPEC and - ENDFILE_SPEC before (re)defining them. - -2002-02-17 Kazu Hirata - - * config/h8300/h8300.c: Fix formatting. - * config/h8300/h8300.h: Likewise. - -2002-02-17 Philipp Thomas - - * doc/tm.texi: Explain why empty strings should not be - marked for translation. - -2002-02-17 Philipp Thomas - - * final.c (output_operand_lossage): Changed to accept - printf style arguments. Change calls where necessary. - * output.h (output_operand_lossage): Change declaration - accordingly. Update copyright. - * config/arc/arc.c config/fr30/fr30.c config/m32r/m32r.c - config/m88k/m88k.c : Adapt all calls to output_operand_lossage. - Update copyright date where necessary. - - * config/i386/i386.c (print_operand): Likewise. Remove use of - sprintf. - - * config/cris/cris.c (cris_operand_lossage): Likewise. - Rename parameter so that exgettext recognizes it as - translatable message. - (LOSE_AND_RETURN): Rename parameter to msgid. - -2002-02-17 Kazu Hirata - - * config/h8300/h8300.h (CONDITIONAL_REGISTER_USAGE): Replace a - hard coded register number with an appropriate macro. - (HARD_REGNO_MODE_OK): Likewise. - (ARG_POINTER_REGNUM): Likewise. - (STATIC_CHAIN_REGNUM): Likewise. - (RETURN_ADDRESS_POINTER_REGNUM): Likewise. - * config/h8300/h8300.md (define_constants): Define more - register numbers. - -2002-02-17 Philipp Thomas - - * config/i386/i386.h: Don't mark empty strings for translation. - -2002-02-16 H.J. Lu - - * config/mips/linux.h (ASM_PREFERRED_EH_DATA_FORMAT): New. - -2002-02-16 Zack Weinberg - - * cppinit.c (merge_include_chains): Check for brack being - NULL before attempting to merge it with qtail. - -2002-02-16 Andrew Cagney - - * config/rs6000/netbsd.h (PREFERRED_DEBUGGING_TYPE): Set to - DBX_DEBUG. - -2002-02-16 John David Anglin - - * pa/t-pa, pa/t-pro, som.h: Revert last patch. - -2002-02-16 John David Anglin - - * pa/t-pa (LIB2FUNCS_EXTRA): Don't build lib2funcs.asm. - * pa/t-pro (LIB2FUNCS_EXTRA): Likewise. - * som.h (DO_GLOBAL_DTORS_BODY): Delete define. - -Sat Feb 16 13:48:50 2002 Richard Kenner - - * config/alpha/alpha.md (*movsi_nt_vms_nofix): Was *movsi_nt_vms; - now only if !TARGET_FIX. - (*movsi_nt_vms_fix): New pattern. - -2002-02-16 Douglas B Rupp - - * config/alpha/alpha.c: Implement null frame procedure types on VMS. - (alpha_procedure_type): Replaces alpha_is_stack_procedure. - (alpha_sa_mask, alpha_sa_size): Reflect above change. - (alpha_pv_save_size, alpha_expand_prologue): Likewise. - (alpha_start_function, alpha_expand_epilogue): Likewise. - (unicosmk_gen_dsib): Likewise. - -Sat Feb 16 13:39:09 2002 Richard Kenner - - * expr.c (store_constructor): Handle target REG case for ARRAY_TYPE. - -2002-02-16 Ulrich Weigand - - * config/s390/s390.c (pool_stop_uid, other_chunk, far_away, - check_and_change_labels, s390_final_chunkify): Delete. - (s390_split_branches, s390_chunkify_pool): New functions. - (s390_function_prologue): Call them. - - * config/s390/s390.h (S390_REL_MAX): Delete. - (S390_CHUNK_MAX, S390_CHUNK_OV): Adjust values. - - * config/s390/s390.md (cjump, icjump, jump): Fix length - attribute calculation. - - -2002-02-15 David Edelsohn - - * config/rs6000/linux64.h (STRIP_NAME_ENCODING): Delete. - * config/rs6000/ppc-asm.h (JUMP_TARGET): Define for powerpc64. - -2002-02-15 John David Anglin - - * gcc.c (init_gcc_specs): Revert patch from 2002-02-15. - * config/pa/pa-linux.h (LIB_SPEC): Likewise. - * config/pa/pa32-linux.h (LINK_COMMAND_SPEC): Likewise. - -2002-02-15 Richard Sandiford - - * c-decl.c (grokdeclarator): Prevent a segfault on unnamed decls. - -2002-02-15 Richard Sandiford - - * reload.c (find_dummy_reload): Check that an output register - is valid for its mode. - -2002-02-14 Alexandre Oliva - - * combine.c (known_cond): After replacing the REG of a SUBREG, try - to simplify it. - - * function.c (assign_parms): Demote promoted argument passed by - transparent reference. - -2001-02-14 Joel Sherrill - - * config/arm/rtems-elf.h, config/h8300/rtems.h: Removed redundant - -Acpu() and -Amachine() to eliminate warnings. - -2002-02-14 Ulrich Weigand - - * config/s390/linux.h (ASM_OUTPUT_ALIGNED_BSS): New. - -2002-02-14 Kazu Hirata - - * config/h8300/h8300-protos.h: Update the prototype for - const_costs. - * config/h8300/h8300.c (const_costs): Treat SET as a little - more expensive operation. - * config/h8300/h8300.h (DEFAULT_RTX_COSTS): Update the - reference to const_costs. - -2002-02-14 Hans-Peter Nilsson - - * config.gcc (c4x-*-rtems*): Fix typo in tm_file setting. - -2002-02-14 Jakub Jelinek - - PR c/5503: - * c-decl.c (duplicate_decls): If builtin type has TYPE_ARG_TYPES NULL, - use arguments from newtype. - -2002-02-13 Eric Christopher - - * config/mips/mips.c (override_options): Add check for march/mipsX - on the same command line. Fix error message in cpu processing. - Remove architecture and ISA checks. - -2002-02-14 Aldy Hernandez - - * config/rs6000/darwin.h (ROUND_TYPE_ALIGN): Adjust for vectors. - - * config/rs6000/sysv4.h (ROUND_TYPE_ALIGN): Add MAX. - -2002-02-14 Aldy Hernandez - - * config/rs6000/rs6000.md ("*movv4si_internal"): Add m<-r and r<-r - alternatives. - ("*movv8hi_internal1"): Same. - ("*movv16qi_internal1"): Same. - ("*movv4sf_internal1"): Same. - - * config/rs6000/rs6000.c (rs6000_legitimize_reload_address): Do - not push_reload for altivec modes. - -2002-02-13 Joel Sherrill - - * config.gcc (a29k-*-rtems), config/a29k/rtems.h: General cleanup across - all RTEMS targets including removal of #includes from config/*/rtems*.h - file and adding them to tm_file setting. Added xm_defines=POSIX to - many targets. - * config.gcc (c4x-*-rtems), config/c4x/rtems.h: Ditto. - * config.gcc (h8300-*-rtems), config/h8300/rtems.h: Ditto. - * config.gcc (hppa1.1-*-rtems), config/pa/rtems.h: Ditto. - * config.gcc (i960-*-rtems), config/i960/rtems.h: Ditto. - * config.gcc (m68k-*-rtems*), config/m68k/rtems.h, - config/m68k/rtemself.h: Ditto. - * config.gcc (mips*-*-rtems*), config/mips/rtems.h, - config/mips/rtems64.h: Ditto. - * config.gcc (powerpc-*-rtems*), config/rs6000/rtems.h: Ditto. - * config.gcc (sh-*-rtems*), config/sh/rtems.h, config/sh/rtemself.h: - Ditto. - * config.gcc (sparc-*-rtems*), config/sparc/rtems.h, - config/sparc/rtemself.h: Ditto. - * config.gcc (v850-*-rtems*), config/v850/rtems.h: Ditto. - * config.gcc (arm-rtems), config/arm/rtems-elf.h: Ditto plus moved - arm-rtems stanza closer to other arm-elf targets and made arm-rtems - more like arm-elf. - * config.gcc (i[34567]86-*-rtems*), config/i386/djgpp-rtems.h, - config/i386/rtems.h, config/i386/rtemself.h: Ditto plus i386-rtemself - target made more similar to i386-elf. - * config/i386/t-rtems-i386: Added soft float support and multilibs. - * config/m68k/t-m68kbare: Add 68040 and 68060 as multilib alternatives to - be similar to config/m68k/t-m68kelf. - * gthr-rtems.h: Encapsulate with extern "C" for C++. - -Wed Feb 13 23:41:15 CET 2002 Jan Hubicka - - * regmove.c (kill_value): Handle subregs. - -Wed Feb 13 23:34:30 CET 2002 Jan Hubicka - - * i386.md (mul patterns): Allow memory operand to be first; - add expanders where needed; fix constraints. - (min?f_nonieee, max?f_nonieee, SSE TImode patterns): - Allow memory operand to be the first. - - * i386.c (ix86_prepare_fp_compare_args): Fix condition for swapping - operands. - -2002-02-13 Jakub Jelinek - - PR c/5681: - * expr.c (safe_from_p): Pass VOIDmode to true_dependence instead of - GET_MODE (x). - -2002-02-13 Jakub Jelinek - - PR optimization/5547: - * config/i386/i386.c (i386_simplify_dwarf_addr): Simplify - all valid IA-32 address modes involving non-scaled %ebx and - GOT/GOTOFF as displacement. - -2002-02-13 Ulrich Weigand - - * config/s390/s390.c (s390_final_chunkify): Re-run shorten_branches - after emitting ltorg insns. - - * config/s390/s390.md (*cmpdf_ccs_0, *cmpdf_ccs, *cmpsf_ccs_0, - *cmpsf_ccs, truncdfsf2_ieee, *adddf3, *addsf3, *subdf3, *subsf3, - *muldf3, *mulsf3, *divdf3, *divsf3, *negdf2, *negsf2, *absdf2, - *abssf2): Fix "op_type" attribute. - -2002-02-13 Douglas B Rupp - - * mkconfig.sh: Avoid using a subshell redirect. - ($output.T): Change to $(output)T. - (ENABLE_NLS): Remove unneeded undef. - - * config/alpha/vms.h (MD_EXEC_PREFIX, MD_STARTFILE_PREFIX): Define. - * config/alpha/x-vms (libsubdir): Define. - - * config/alpha/vms.h (MD_FALLBACK_FRAME_STATE_FOR): Handle - register frame procedures. Optimize retrieving context. - - * config/alpha/t-vms (MULTILIB_OPTIONS): Define. - (MULTILIB_DIRNAME, LIBGCC, INSTALL_LIBGCC): Likewise. - * config/alpha/vms.h (ASM_FILE_START): Write .arch directive. - -Wed Feb 13 09:45:08 2002 Richard Kenner - - * alias.c (find_base_term, case ZERO_EXTEND, case SIGN_EXTEND): - Make same change as for find_base_value. - -2002-02-13 Kazu Hirata - - * config/h8300/h8300.h (MODES_TIEABLE_P): Accept a combination - of QImode and SImode. - -2002-02-13 Kazu Hirata - - * config/h8300/h8300.c (h8300_adjust_insn_length): Correct the - length computation of movsi. - * config/h8300/h8300.md (movsi_h8300hs): Correct the length. - -2002-02-13 Kazu Hirata - - * config/h8300/h8300.md (subqi3): Tighten the predicate for - operands[2] to register_operand. - -Wed Feb 13 10:35:56 CET 2002 Jan Hubicka - - * i386.md (fop_*_comm_*): allow nonimmediate in the first operand. - -2002-02-12 Aldy Hernandez - - * config/rs6000/rs6000.md: Use predicate altivec_register_operand - for altivec_lvx* and altivec_stvx*. - ("*movv4si_internal"): Add constraint for loading from GPRs. - ("*movv8hi_internal1"): Same. - ("*movv16qi_internal1"): Same. - ("*movv4sf_internal1"): Same. - - * config/rs6000/rs6000.c (altivec_register_operand): New. - - * config/rs6000/rs6000.h (PREDICATE_CODES): Add - altivec_register_operand. - -2002-02-13 Hans-Peter Nilsson - - * config/mmix/mmix.c (mmix_assemble_integer) : Don't - handle SYMBOL_REF. - -2002-02-13 Stan Shebs - - * c-typeck.c (digest_init): Handle vectors. - (really_start_incremental_init): Same. - (pop_init_level): Same. - (process_init_element): Same. - - * varasm.c (output_constant): Same. - - * expr.c (clear_storage): Same. - (store_constructor): Same. - -2002-02-12 Eric Christopher - - * explow.c (hard_function_value): Add comment explaining - signed/unsigned comparison. - -2002-02-12 Jakub Jelinek - - * jump.c (never_reached_warning): Add finish argument. - If finish is NULL, stop on CODE_LABEL, otherwise stop before first - real insn after end. - * rtl.h (never_reached_warning): Adjust prototype. - * cse.c (cse_insn): Pass NULL as finish to never_reached_warning. - * cfgrtl.c (flow_delete_block): Pass b->end as finish to - never_reached_warning. - -2002-02-12 Graham Stott - - * config/hp/pa.h (GO_IF_LEGITIMATE_ADDRESS): Fix typos. - -2002-02-12 Kazu Hirata - - * config/h8300/h8300.c (shift_alg_hi): Improve the 15-bit - logical shifts on H8/300. - (shift_alg_si): Improve several shifts on H8/300. - (get_shift_alg): Likewise. - -2002-02-12 Graham Stott - - * config/pa/pa.c (compute_movstrsi_length): Fix typos. - -Tue Feb 12 10:12:56 2002 Richard Kenner - - * alias.c (find_base_value, case ZERO_EXTEND, case SIGN_EXTEND): - Handle #ifdef POINTERS_EXTEND_UNSIGNED. - -2002-02-11 Hans-Peter Nilsson - - * config/mmix/mmix.c (mmix_assemble_integer) : Handle - non-CONST_INT through default_assemble_integer. - : Likewise, for non-CONST_INT, non-SYMBOL_REF. - : Abort for CONST_DOUBLE. - -2002-02-11 John David Anglin - - * gcc.c (init_gcc_specs): Add static libgcc to link when "-shared" - is specified. - * config/pa/pa-linux.h (LIB_SPEC): Delete. - * config/pa/pa32-linux.h (LINK_COMMAND_SPEC): Delete. - -2002-02-11 Andrew Haley - - * config/stormy16/stormy16.md (zero_extendqihi2): New. - -2002-02-11 Alexandre Oliva - - * regrename.c (regrename_optimize): Don't accept a - part-clobbered register if the replaced register is not part - clobbered. - - * calls.c (store_one_arg): In the non-BLKmode non-partial case, - take padding into account when computing the argument value. - - * config/sh/sh.h (FUNCTION_ARG_REGNO_P): Fix parenthesizing error. - - * combine.c (try_combine): Apply substitutions in - CALL_INSN_FUNCTION_USAGE too. - -2002-02-11 Aldy Hernandez - - * config/rs6000/rs6000.c (altivec_init_builtins): Handle - __builtin_altivec_abs*. - (bdesc_abs): New. - - * config/rs6000/rs6000.h (rs6000_builtins): Add - ALTIVEC_BUILTIN_ABS*. - - * config/rs6000/altivec.h: Use const char for builtins expecting - literals. - (vec_abs): New versions for C and C++. - (vec_abss): Same. - -2002-02-10 Kazu Hirata - - * config/h8300/h8300.h (INITIALIZE_TRAMPOLINE): Simplify by - using Pmode. - -2002-02-10 Kazu Hirata - - * config/h8300/h8300.h (STACK_POINTER_REGNUM): Use the - constant definition from h8300.md. - (FRAME_POINTER_REGNUM): Likewise. - * config/h8300/h8300.md (define_constants): Add FP_REG. - -2002-02-10 Kazu Hirata - - * config/h8300/h8300.c (print_operand): Remove redundant code. - -2002-02-10 Kazu Hirata - - * config/h8300/h8300-protos.h: Remove the prototype for byte_reg. - * config/h8300/h8300.c (byte_reg): Make it static. - -2002-02-10 Richard Henderson - - PR c/5623 - * c-typeck.c (incomplete_type_error): Handle flexible array members. - -2002-02-10 Richard Henderson - - PR c++/5624 - * tree.c (append_random_chars): Don't abort if main_input_filename - does not exist. - -2002-02-10 Hans-Peter Nilsson - - * config/mmix/t-mmix (MULTILIB_EXTRA_OPTS): Disable. - -2002-02-10 Kazu Hirata - - * config/h8300/h8300.md (pushhi1_h8300): Correct the mode used. - (pushhi1): Likewise. - -2002-02-10 John David Anglin - - * pa.c (reg_before_reload_operand): Don't accept a SUBREG operand. - * pa.h (PREDICATE_CODES): Adjust codes for reg_before_reload_operand. - -2002-02-09 David O'Brien - - * config/sparc/freebsd.h(TARGET_DEFAULT): Add MASK_EPILOGUE setting and - remove MASK_VIS. - (ASM_CPU_DEFAULT_SPEC): Remove. Default setting is fine. - -2002-02-09 Kazu Hirata - - * config/h8300/h8300.c (output_logical_op): Use sub.w to clear - a half of an SImode register on H8/300. - -Sat Feb 9 18:28:02 CET 2002 Jan Hubicka - - * i386.md (movdi_2): Add missing '!'. - -2002-02-09 Kazu Hirata - - * config/h8300/h8300.h: Fix formatting. Remove commented-out - definitions. - -2002-02-09 Kazu Hirata - - * config/h8300/h8300.md (length): Correct the distance valid - for the short branch. - -2002-02-09 Kazu Hirata - - * config/h8300/h8300.md (iorhi3): Tighten the predicates. - -2002-02-09 Alexandre Oliva - - * config/sh/sh.h (REGISTER_NATURAL_MODE): Save part-clobbered - registers in SImode. - (HARD_REGNO_CALL_PART_CLOBBERED) [TARGET_SHMEDIA32]: Set r18 as - part-clobbered. - - * config/sh/sh.c (expand_prologue): Fix mis-applied 2001-11-09's - patch. - - Contribute sh64-elf. - 2002-02-09 Alexandre Oliva - * config/sh/sh.c (TARGET_CANNOT_MODIFY_JUMPS_P): Define to... - (sh_cannot_modify_jumps_p): New function. - 2002-02-05 Alexandre Oliva - * config/sh/sh.c (TARGET_MS_BITFIELD_LAYOUT_P): Define to... - (sh_ms_bitfield_layout_p): New function. - 2002-02-04 Alexandre Oliva - Zack Weinberg - * config/sh/sh.h (TRAMPOLINE_ADJUST_ADDRESS): Use - expand_simple_binop instead of expand_binop. - 2002-02-03 Alexandre Oliva - * config/sh/sh.h (OVERRIDE_OPTIONS) [! TARGET_SH5]: Disable - use of .quad and .uaquad. - * config/sh/sh.c (TARGET_ASM_UNALIGNED_DI_OP, - TARGET_ASM_ALIGNED_DI_OP): Add comment pointing to the above. - 2002-01-24 Alexandre Oliva - * config/sh/sh.md (movdi_const, movdi_const_32bit, - movdi_const_16bit): Make sure all CONSTs have modes. - (sym2PIC): Ditto, but by adjusting all callers. - * config/sh/sh.c (calc_live_regs) [TARGET_SHCOMPACT]: Set pr_live - if the prologue calls the SHmedia argument decoder or register - saver. - 2002-01-24 Alexandre Oliva - * config/sh/sh.c (TARGET_ASM_UNALIGNED_DI_OP): Define. - (TARGET_ASM_ALIGNED_DI_OP): Likewise. - (sh_expand_epilogue): Don't emit USE of return target register. - (prepare_move_operands): Legitimize DImode PIC addresses. - (sh_media_register_for_return): Skip tr0, used to initialize the - PIC register. - (sh_expand_prologue): Remove explicit USE of return register. - (nonpic_symbol_mentioned_p): PC is non-PIC. Don't recurse in - CONST_DOUBLEs. UNSPEC_GOTPLT is PIC. - * config/sh/sh.h (ASM_OUTPUT_DOUBLE_INT): Removed, obsolete. - (OVERRIDE_OPTIONS): Don't disable PIC on SH5. - (EXTRA_CONSTRAINT_S): Use MOVI_SHORI_BASE_OPERAND_P instead of - EXTRA_CONSTRAINT_T. - (GOT_ENTRY_P, GOTPLT_ENTRY_P, GOTOFF_P, PIC_ADDR_P): New. - (MOVI_SHORI_BASE_OPERAND_P): New. - (NON_PIC_REFERENCE_P, PIC_REFERENCE_P): New. - (EXTRA_CONSTRAINT_T): Define in terms of them. - (OUTPUT_ADDR_CONST_EXTRA): Handle UNSPEC_GOTPLT. - * config/sh/sh.md (movsi_media, movsi_media_nofpu, - movdi_media, movdi_media_nofpu): Add SIBCALL_REGS class to - alternatives supporting TARGET_REGS. - (UNSPEC_GOTPLT): New constant. - (movdi split): Move incrementing of LABEL_NUSES... - (movdi_const, movdi_const_32bit): Here. Use - MOVI_SHORI_BASE_OPERAND_P instead of EXTRA_CONSTRAINT_T. - (movdi_const_16bit): New. - (call, call_value) [flag_pic]: Use GOTPLT. - (call_pop, call_value_pop): New expands. - (call_pop_compact, call_pop_rettramp): New insns. - (call_value_pop_compact, call_value_pop_rettramp): New insns. - (sibcall) [flag_pic]: Use GOT. - (builtint_setjmp_receiver): Remove bogus, unused expand. - (GOTaddr2picreg): Implement for SHcompact and SHmedia. - (*pt, *ptb, ptrel): New insns. - (sym2GOT): Handle DImode GOT. - (sym2GOTPLT, symGOTPLT2reg): New expands. - (sym2PIC): New expand. - (shcompact_return_tramp): Use GOTPLT to return trampoline. - (shcompact_return_tramp_i): Use return register explicitly. - * config/sh/sh.h (OVERRIDE_OPTIONS) [TARGET_SHMEDIA]: Don't - disable flag_reorder_blocks. - 2002-01-19 Alexandre Oliva - * config/sh/sh.md (sibcall_compact): Reorder return, uses and - clobbers, for clarity. - (sibcall_epilogue) [TARGET_SHCOMPACT]: Mark saving and - restoring of r0 in macl as MAYBE_DEAD. - 2002-01-18 Alexandre Oliva - * config/sh/sh.h (LONG_DOUBLE_TYPE_SIZE): Define. - * config/sh/sh.md (movv4sf_i, movv16sf_i): Fix uses of - alter_subreg all over. - (jump) [TARGET_SHMEDIA]: FAIL to create new jumps after - reload, instead of emitting instructions that would require - reloading. - (casesi_load_media): Add missing modes. - 2001-11-09 Alexandre Oliva - * config/sh/sh.c (sh_expand_prologue): Mark the PIC register - as used if the argument decoder is called. - 2001-08-28 Alexandre Oliva - * config/sh/sh.md (udivsi3, divsi3): Load libcall symbol name in - Pmode, then extend it to DImode if necessary. - 2001-08-28 Stephen Clarke - * config/sh/sh.h (LEGITIMATE_CONSTANT_P): Don't accept DFmode - constants in FPU-enabled SHmedia, let them be loaded from memory. - 2001-08-28 Alexandre Oliva - * config/sh/sh.md (cmpeqdi_media, cmpgtdi_media, cmpgtudi_media): - Adjust whitespace in assembly output templates. - 2001-08-28 Stephen Clarke - * config/sh/sh.md (movdicc_false, movdicc_true, movdicc): Adjust - mode of if_then_else. - 2001-08-04 Alexandre Oliva - * config/sh/sh64.h (CPP_DEFAULT_CPU_SPEC): Override definition in - sh.h. - 2001-07-26 Andrew Haley - Joern Rennecke - * config/sh/sh64.h (CPP_DEFAULT_CPU_SPEC): New. - (SUBTARGET_CPP_PTR_SPEC): New. - (SUBTARGET_CPP_SPEC): Remove. - 2001-07-06 Chandrakala Chavva - * config/sh/sh.md (movsf_media_nofpu+1, movdf_media_nofpu+1): - Fix typo in previous checkin. - 2001-07-11 Chandrakala Chavva - * config/sh/sh.h (MODES_TIEABLE_P): Fix redact indentations. - 2001-07-10 Chandrakala Chavva - Alexandre Oliva - * config/sh/sh.h (MODES_TIEABLE_P): Don't tie modes wider than - what single FP register can hold for SHmedia target. - 2001-07-06 Chandrakala Chavva - Alexandre Oliva - * config/sh/sh.md (movsf_media_nofpu+1, movdf_media_nofpu+1): - Do not split into SUBREG. - 2001-06-14 Alexandre Oliva - * config/sh/ushmedia.h, config/sh/sshmedia.h: Updated signatures - and added new functions as specified in SH5 ABI r9. - 2001-06-04 Alexandre Oliva - * config/sh/lib1funcs.asm (GCC_nested_trampoline): Align to an - 8-byte boundary. - 2001-06-03 Alexandre Oliva - * config/sh/sh.c (dump_table): Add const0_rtx in calls of - gen_consttable_4 and gen_consttable_8. Emit multiple labels - and consttable_window_ends. - 2001-06-03 Graham Stott - * config/sh/sh.md (movdi split): Remove unused variable last_insn. - 2001-05-16 Alexandre Oliva - * config/sh/sh.c (print_operand): Handle floating-point pair, - vector and matrix registers. - * config/sh/sh.h (REGISTER_MOVE_COST): Take floating-pointer - vector modes into account. - * config/sh/sh.md (movv2sf): Split move between registers into - movdf. - (movv4sf, movv16sf): Introduce insns that get split only after - reload. - * config/sh/shmedia.h: Fix Copyright dates. - * config/sh/ushmedia.h: Likewise. Move loop counter - declarations into conditionals that uses them. - (sh_media_FVADD_S, sh_media_FVSUB_S): Fix off-by-one error in - loop boundary. - * config/sh/sshmedia.h: Fix Copyright dates. - (sh_media_PUTCFG): Fix constraints. - 2001-05-12 Alexandre Oliva - * config/sh/sh.h (TARGET_PTRMEMFUNC_VBIT_LOCATION): Define to - ptrmemfunc_vbit_in_delta for SH5. - 2001-05-08 Alexandre Oliva - * config/sh/sh.h (TARGET_SWITCHES): Document -m5-*. - * invoke.texi: Likewise. - 2001-04-14 Alexandre Oliva - * config/sh/lib1funcs.asm (GCC_push_shmedia_regs, - GCC_push_shmedia_regs_nofpu, GCC_pop_shmedia_regs, - GCC_pop_shmedia_regs_nofpu): New global symbols. - * config/sh/t-sh64 (LIB1ASMFUNCS): Add them. - * config/sh/sh.h (SHMEDIA_REGS_STACK_ADJUST): New macro. - * config/sh/sh.c (calc_live_regs): Account for PR's saving in - compact function with nonlocal labels. - (sh_expand_prologue) [SHcompact]: Push SHmedia regs if needed. - (sh_expand_epilogue) [SHcompact]: Pop them when appropriate. - (initial_elimination_offset): Account for their stack space. - * config/sh/sh.md (shmedia_save_restore_regs_compact): New insn. - * config/sh/sh.md (movsi_media, movsi_media_nofpu, movqi_media, - movhi_media, movdi_media, movdi_media_nofpu, movdf_media, - movdf_media_nofpu, movsf_media, movsf_media_nofpu): Require at - least one of the operands to be a register. - (movv2sf): Likewise. Renamed to movv2sf_i. - (movdi, movdf, movv2sf, movv4sf, movv16sf, movsf): - prepare_move_operands() before emitting SHmedia insns. - 2001-04-03 Alexandre Oliva - * config/sh/crti.asm (init, fini) [__SH5__ && ! __SHMEDIA__]: - Don't save nor initialize r12. Don't mis-align the stack. - Pad the code with a nop. - * config/sh/crti.asm: Don't restore r12. Don't mis-align the - stack. - 2001-03-13 Alexandre Oliva - * gcc/longlong.h (__umulsidi3, count_leading_zeros) - [__SHMEDIA__]: Implement. - 2001-03-11 Alexandre Oliva - * config/sh/sh.md: Set latency of `pt' closer to reality. - (movsi_media, movsi_media_nofpu, movdi_media, movdi_media_nofpu, - movdf_media, movdf_media_nofpu, movsf_media, movsf_media_nofpu): - Set move, load and store type attributes. - * config/sh/sh.c (sh_loop_align) [TARGET_SH5]: Set to 3. - * config/sh/sh.h (OVERRIDE_OPTIONS) [TARGET_SH5]: Disable - profiling. - * config/sh/sh.h (PROMOTE_MODE): Sign-extend SImode to DImode. - * config/sh/sh-protos.h (sh_media_register_for_return): Declare. - * config/sh/sh.c (sh_media_register_for_return): New function. - (sh_expand_prologue) [TARGET_SHMEDIA]: Copy r18 to an available - branch-target register. - (sh_expand_epilogue) [TARGET_SHMEDIA]: Explicitly USE it. - * config/sh/sh.md (return_media_i): Use any call-clobbered - branch-target register. - (return_media): If r18 wasn't copied in the prologue, copy it - here. - * config/sh/sh.h (CONDITIONAL_REGISTER_USAGE) [TARGET_SHMEDIA]: - Clear class FP0_REGS. - * config/sh/sh64.h (LINK_SPEC): Removed incorrect default copied - from elf.h. - 2001-03-08 DJ Delorie - * config/sh/sh.h (OVERRIDE_OPTIONS): Disable relaxing for SHMEDIA. - 2001-02-09 Alexandre Oliva - * config/sh/sh.md (sibcall_compact): Set fp_mode to single. - 2001-02-07 Alexandre Oliva - * config/sh/sh.h (INT_ASM_OP) [SHMEDIA64]: Use `.quad'. - 2001-02-03 Alexandre Oliva - * config/sh/sh.h (INIT_CUMULATIVE_ARGS): Compute size of BLKmode - return value correctly for call_cookie. - 2001-02-01 Alexandre Oliva - * config/sh/crt1.asm (start): Modified so as to call - ___setup_argv_and_call_main. - 2001-01-26 Alexandre Oliva - * config/sh/sh.h (FUNCTION_ARG_ADVANCE): Don't count stack_regs in - SHmedia mode. - 2001-01-20 Alexandre Oliva - * config/sh/sh.h (STRIP_DATALABEL_ENCODING): New macro. - (STRIP_NAME_ENCODING): Use it. - (ASM_OUTPUT_LABELREF): Likewise. Don't call assemble_name(). - 2001-01-19 Alexandre Oliva - * config/sh/sh.md (sgeu) [! SHMEDIA]: Fix invocation of - prepare_scc_operands(). - * config/sh/sh.h (SH_DATALABEL_ENCODING): Change to "#"... - (DATALABEL_SYMNAME_P): ... so that we don't need memcmp here. - 2001-01-17 Alexandre Oliva - * config/sh/sh.h (STRIP_NAME_ENCODING): Strip leading `*'. - 2001-01-13 Alexandre Oliva - * config/sh/sh.md (shcompact_incoming_args): Use R0_REG. - * config/sh/sh.md (R7_REG, R8_REG, R9_REG): Define as constants, - used in shcompact_incoming_args. - * config/sh/sh.c (sh_expand_epilogue): Fix thinko in previous - change. - * config/sh/crt1.asm (start) [SH5]: Switch to single-precision - mode. - * config/sh/lib1funcs.asm (sdivsi3_i4, udivsi3_i4, set_fpscr): - Adjust accordingly. - * config/sh/sh.c (sh_expand_prologue, sh_expand_epilogue): - Simplify. Adjust. Add sanity check. - * config/sh/sh.h (TARGET_SWITCHES) [5-compact]: Set - FPU_SINGLE_BIT. - * config/sh/sh.md (udivsi3_i4_single, divsi3_i4_single): Match - TARGET_SHCOMPACT. - (udivsi3, divsi3): Use them. - (force_mode_for_call): New insn. - (call, call_value, sibcall_value): Emit it before SHcompact - calls. - 2001-01-11 Alexandre Oliva - * config/sh/sh.md (call, call_value, sibcall): Make sure the - call cookie is non-NULL before taking its value. - 2001-01-10 Alexandre Oliva - * config.gcc (sh64): Set target_requires_64bit_host_wide_int. - 2001-01-09 Alexandre Oliva - * config/sh/sh.md (shcompact_incoming_args): Set argument memory - block. - * config/sh/sh.h (STATIC_CHAIN_REGNUM) [SH5]: Use r1. - * config/sh/sh.c (sh_expand_prologue) [SH5]: Use r0 as - temporary for stack adjusts. Use MACL and MACH to pass - arguments to shcompact_incoming_args. - * config/sh/sh.md (shcompact_incoming_args): Adjust. Don't - clobber r1. - * config/sh/lib1funcs.asm (shcompact_incoming_args): Likewise. - (nested_trampoline): Load static chain address into r1. - * config/sh/sh.md (movdi_media splits): Fix sign-extension. - 2001-01-07 Alexandre Oliva - * config/sh/sh.md (casesi): Sign-extend the first two operands, - and use signed compares for them. - * config/sh/sh.c (dump_table): Don't emit 8-byte constants after - 4-byte ones. Instead, inter-leave them, maintaining the 8-byte - ones properly aligned. - (find_barrier): Account for extra alignment needed for 8-byte wide - constants. - (machine_dependent_reorg): Require a label for the second 4-byte - constant after an 8-byte one. - * config/sh/lib1funcs.asm (sdivsi3): Fix typo in yesterday's - change. - 2001-01-05 Alexandre Oliva - * config/sh/sh.c (machine_dependent_reorg) [SHCOMPACT]: Reset - last_float when switching float modes. - * config/sh/sh.md (movdf) [SH5]: Don't use stack-pointer - auto-increment for general-purpose registers. - * config/sh/lib1funcs.asm (sdivsi3) [SHMEDIA]: Sign-extend the - result. - * config/sh/sh.c (sh_expand_prologue) [SH5]: Use r1 as temporary - for stack adjust. - * config/sh/sh.c (sh_builtin_saveregs): Support using all - registers for varargs. - 2001-01-01 Alexandre Oliva - * config/sh/sh.h (FUNCTION_ARG_ADVANCE): Simplify. - * config/sh/sh.h (CALL_COOKIE_STACKSEQ, - CALL_COOKIE_STACKSEQ_SHIFT, CALL_COOKIE_STACKSEQ_GET): New macros. - (CALL_COOKIE_INT_REG_SHIFT): Adjust. - (FUNCTION_ARG_ADVANCE): Use SHCOMPACT_FORCE_ON_STACK. Adjust - call_cookie accordingly. - (FUNCTION_ARG): Test SHCOMPACT_FORCE_ON_STACK. - (SHCOMPACT_BYREF): Likewise. - (SHCOMPACT_FORCE_ON_STACK): New macro. - * config/sh/sh.c (sh_expand_prologue): Use new call_cookie format. - (sh_builtin_saveregs): Likewise. - * config/sh/lib1funcs.asm (shcompact_call_trampoline, - shcompact_incoming_args): Use new shift values. Support - sequences of consecutive and non-consecutive pushes/pops. - * config/sh/sh.md (return): Don't explicitly use PR_REG. - 2001-01-05 Hans-Peter Nilsson - * config/sh/sh.h (TEXT_SECTION): Define. - * config/sh/elf.h (ASM_FILE_START): Output TEXT_SECTION_ASM_OP. - 2001-01-05 Alexandre Oliva - * config/sh/sh.h (INIT_CUMULATIVE_LIBCALL_ARGS): New macro. - * config/sh/sh.h (BASE_RETURN_VALUE_REG): Use FP regs for - return values on FPU-enabled SHmedia. - (FUNCTION_VALUE_REGNO_P): Mark FIRST_FP_RET_REG as used on - FPU-enabled SHmedia. - (INIT_CUMULATIVE_ARGS): Set up return trampoline only if - value is returned in a non-FP reg and is not returned by - reference. - * config/sh/sh.md (shcompact_return_tramp_i): Change type to - jump_ind. - 2000-01-04 Alexandre Oliva - * config/sh/sh.h (SH_MIN_ALIGN_FOR_CALLEE_COPY): New. - (FUNCTION_ARG_CALLEE_COPIES): Require argument to be - quad-aligned to be passed by callee-copy reference. - 2001-01-03 Alexandre Oliva - * config/sh/elf.h (MAX_WCHAR_TYPE_SIZE): Define. - * config/sh/sh64.h (MAX_WCHAR_TYPE_SIZE): Undefine. - 2001-01-02 Alexandre Oliva - * config/sh/lib1funcs.asm (shcompact_call_trampoline): Fix error in - copying low-numbered FP regs to r7 and r8. - * config/sh/sh.h (FUNCTION_ARG_ADVANCE): Don't request copying of - FP regs to general-purpose regs only if the copy was passed on the - stack. - * config/sh/lib1funcs.asm (shcompact_call_trampoline): Fix typo in - copying FP reg to r9. - * config/sh/sh.h (FUNCTION_ARG_ADVANCE): Use trampoline to - copy FP regs to general-purpose regs only in outgoing calls. - * config/sh/sh.md (movdf_media, movsf_media): Revert incorrect - change from 2000-10-30. Adjust for 64-bit (or 32-bit) - HOST_WIDE_INT. - * config/sh/sh.h (struct sh_args): Document all fields. - (FUNCTION_OK_FOR_SIBCALL): Functions that receive arguments - passed partially on the stack should not consider making - sibcalls. - * config/sh/sh.h (FUNCTION_ARG_ADVANCE): Add byref regs to - stack_regs only for incoming calls. When passing FP args, - make sure there are FP regs available before modifying - call_cookie. - (SHCOMPACT_BYREF): Pass double args in general-purpose - registers by reference. - 2000-12-30 Alexandre Oliva - * config/sh/sh.h (FUNCTION_OK_FOR_SIBCALL) [SHCOMPACT]: Don't - attempt to generate sibcalls if the caller got any arguments - by reference. - * config/sh/lib1funcs.asm (set_fpscr) [SH5]: Default to double. - * config/sh/sh.c (dump_table) [SHCOMPACT]: Align DImode and DFmode - to 8-byte boundaries. - * config/sh/sh.md (shcompact_preserve_incoming_args): New insn. - * config/sh/sh.h (CALL_COOKIE_INT_REG_GET): New macro. - * config/sh/sh.c (sh_expand_prologue): Preserve args that will be - stored in the stack. - * config/sh/lib1funcs.asm (ct_main_table, ia_main_table): Arrange - for the offsets to have the ISA bit set. - (shcompact_call_trampoline): Document. Swap r0 and r1, to match - invocation. Use beq instead of bgt to mark end of sequence of - loads. - (shcompact_incoming_args): Fix store of r2. Use beq instead of - bgt to mark end of sequence of stores. - * config/sh/sh.c (arith_operand): Don't check whether - CONST_OK_FOR_J for now. - * config/sh/sh.md (movdf_media, movsf_media): Use HOST_WIDE_INT - instead of long for conversion. - 2000-12-29 Alexandre Oliva - * config/sh/sh.c (print_operand_address): Convert INTVAL to int - before passing it to fprintf. - 2000-12-28 Alexandre Oliva - * config/sh/crt1.asm (start): Reset SR.FD, to enable the FP unit. - Call set_fpscr before reading/writing SR. - * config/sh/crt1.asm (start): Set SR.SZ and SR.PR, but not SR.FR. - Call set_fpscr. - * config/sh/lib1funcs.asm: Add `.align 2' directives before - SHmedia code. - (FMOVD_WORKS): Define on SH5 with FPU. - (set_fpscr): Define on SH5. Remove separate _fpscr_values - setting. - * config/sh/t-sh64 (LIB1ASMFUNCS): Add _set_fpscr instead of - _fpscr_values. - 2000-12-28 Hans-Peter Nilsson - * config/sh/lib1funcs.asm (ct_main_table): Align contents to even - address. - (ia_main_table): Ditto. - 2000-12-27 Alexandre Oliva - * config/sh/sh.h (MAX_WCHAR_TYPE_SIZE): Don't define. - * config/sh/sh64.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Reinstate - the definitions from sh.h. - * config/sh/sh.h (PTRDIFF_TYPE): Define as conditional on - TARGET_SH5. - (SUBTARGET_CPP_SPEC): Arrange for __PTRDIFF_TYPE__ to be defined. - * config/sh/elf.h (PTRDIFF_TYPE): Likewise. - * config/sh/sh64.h (SUBTARGET_CPP_SPEC): Likewise. - 2000-12-26 Alexandre Oliva - * config/sh/sh.md (movdi_media split): Don't add REG_LABEL notes. - Increment LABEL_NUSES. - - * config/sh/sh.h (SIZE_TYPE): Define as conditional on - TARGET_SH5. - (SUBTARGET_CPP_SPEC): Arrange for __SIZE_TYPE__ to be always - defined. - * config/sh/elf.h (SIZE_TYPE): Likewise. - * config/sh/sh64.h (SUBTARGET_CPP_SPEC): Likewise. - * config/sh/lib1funcs.asm (shcompact_call_trampoline, - shcompact_incoming_args): Load switch table addresses using - datalabel. - * config/sh/sh.h (SUBTARGET_CPP_SPEC): Define __SIZE_TYPE__. - (NO_BUILTIN_SIZE_TYPE): Define. - (SIZE_TYPE): Don't define. - * config/sh/sh64.h (SUBTARGET_CPP_SPEC): Define __SIZE_TYPE__. - * config/sh/sh.h (CPP_SPEC): Fixed typo that prevented the - definition of __SH5__=32 for -m5-compact-nofpu. - * config/sh/sh.c (barrier_align): Ensure 32-bit alignment after - ADDR_DIFF_VEC. - 2000-12-24 Alexandre Oliva - * config/sh/sh.h (FUNCTION_ARG_PADDING): Removed. - 2000-12-23 Alexandre Oliva - * config/sh/sh.h (TARGET_CACHE32): Enable on SH5. - (FUNCTION_BOUNDARY): Ensure 32-bit alignment for SHmedia. - (INSN_LENGTH_ALIGNMENT): Likewise. - 2000-12-22 Alexandre Oliva - * config/sh/sh.md (call, call_value, sibcall): Simplify - copying of non-branch-target register. - 2000-12-22 Alexandre Oliva - * glimits.h (__LONG_MAX__): Revert 2000-12-13's patch. - * config/sh/sh.h (CPP_SPEC): Define it here for 64-bit SHmedia. - 2000-12-22 Alexandre Oliva - * config/sh/sh.h (GET_SH_ARG_CLASS): Handle complex - floating-point values as structs. - (FUNCTION_ARG): Use SH5_PROTOTYPED_FLOAT_ARG. - (SH5_PROTOTYPELESS_FLOAT_ARG): List FP registers before - general-purpose register. - (SH5_PROTOTYPED_FLOAT_ARG): New macro. - 2000-12-20 Alexandre Oliva - * config/sh/sh.md (addsi3): Force operand1 to reg for SHmedia. - * config/sh/sh.md (movsi_media): Split CONST_DOUBLE loads too. - * config/sh/sh.h (DATALABEL_REF_P): Don't require the CONST. - (ENCODE_SECTION_INFO): Enclose variables and constants in - DATALABEL unspecs. - (SH_DATALABEL_ENCODING, DATALABEL_SYMNAME_P): Define. - (STRIP_NAME_ENCODING): Strip SH_DATALABEL_ENCODING off. - (ASM_OUTPUT_LABELREF, AMS_OUTPUT_SYMBOL_REF): Define. - * config/sh/sh.c (gen_datalabel_ref): Use UNSPEC_DATALABEL - only for LABEL_REFs. For SYMBOL_REFs, prepend - SH_DATALABEL_ENCODING to the symbol name. - * config/sh/sh.md (indirect_jump): Use SUBREG instead of - convert_mode(). - 2000-12-20 Alexandre Oliva - * config/sh/sh.md (casesi): Enclose ADDR_DIFF_VEC address in - UNSPEC_DATALABEL. - * config/sh/sh.c (gen_datalabel_ref): Accept LABEL_REFs. - * config/sh/sh.h (DATALABEL_REF_NO_CONST_P): Likewise. - (DATALABEL_REF_P): Don't require CONST. - (ASM_OUTPUT_ADDR_DIFF_ELT): On SH5, output datalabel before - REL label. - 2000-12-19 Alexandre Oliva - * config/sh/sh.md (extendhidi2, extendqidi2): Use arithmetic shift - right. - 2000-12-18 Alexandre Oliva - * config/sh/sh.md (movsi_media, call, call_value, sibcall): - Use shallow_copy_rtx and PUT_MODE to change the mode of - SYMBOL_REFs, LABEL_REFs, CONSTs, etc. - * config/sh/sh.h (PREFERRED_RELOAD_CLASS): Reload SYMBOL_REFs - on SHmedia using GENERAL_REGs. - * config/sh/sh.md (ble_media_i, blt_media_i, bleu_media_i, - bltu_media_i): Fix reversion of conditions. - 2000-12-18 Alexandre Oliva - * config/sh/sh.md (zero_extendhidi2): Use logical shift right. - * config/sh/sh.c (output_far_jump): Save r13 in macl. - 2000-12-17 Alexandre Oliva - * config/sh/sh.c (gen_datalabel_ref): Fix mode of the UNSPEC. - 2000-12-16 Alexandre Oliva - * config/sh/lib1funcs.asm (ic_invalidate): Define for SH5. - (GCC_nested_trampoline): Likewise. - * config/sh/sh-protos.h (gen_datalabel_ref): Declare. - * config/sh/sh.c (gen_datalabel_ref): Define. - * config/sh/sh.h (TRAMPOLINE_SIZE): Adjust for SH5. - (INITIALIZE_TRAMPOLINE): Likewise. - (TRAMPOLINE_ADJUST_ADDRESS): Define. - (DATALABEL_REF_NO_CONST_P, DATALABEL_REF_P): Define. - (EXTRA_CONSTRAINT_T): Match DATALABEL unspecs. - (OUTPUT_ADDR_CONST_EXTRA): Handle DATALABEL unspecs. - * config/sh/sh.md (UNSPEC_DATALABEL): New constant. - (ic_invalidate): Adjust for SH5. - (ic_invalidate_line_media, ic_invalidate_line_compact): New insns. - * config/sh/t-sh64 (LIB1ASMFUNCS): Added _ic_invalidate and - _nested_trampoline. - 2000-12-15 Alexandre Oliva - * config/sh/sh.h (MOVE_MAX): Set to 8 for SHmedia, 4 elsewhere. - (MOVE_MAX_PIECES): Set to 8 on SHmedia too. - 2000-12-14 Alexandre Oliva - * config/sh/sh.h (DBX_REGISTER_NUMBER): Adjust for sh64-elf-gdb. - * config/sh/elf.h (DBX_REGISTER_NUMBER): Likewise. - 2000-12-14 Alexandre Oliva - * config/sh/sh.c (target_reg_operand): Match only target-branch - registers and pseudos that aren't virtual registers. - * config/sh/sh.md (call, call_value, sibcall) [TARGET_SHMEDIA]: - Copy operands that don't match target_reg_operand to pseudos. - (call_media, call_value_media, sibcall_media): Use - target_reg_operand instead of target_operand. - 2000-12-13 Alexandre Oliva - * glimits.h (__LONG_MAX__) [SH5 == 64]: Adjust for 64 bits. - * config/sh/sh.c (target_reg_operand): Match hardware registers - other than branch-target registers. - * config/sh/sh.md (zero_extendqidi2): Input operand is %1. - * config/sh/lib1funcs.asm (sdivsi3) [SH5]: Make it global. - (fpscr_values) [SH5 == 32]: Define. - * config/sh/t-sh64 (LIB1ASMFUNCS): Add fpscr_values. - * config/sh/sh.md (call, call_value, sibcall) [TARGET_SHMEDIA]: - Handle function addresses coming in SUBREGs. - 2000-12-12 Alexandre Oliva - * config/sh/lib1funcs.asm (shcompact_call_trampoline, - shcompact_return_trampoline): Use datalabel where appropriate. - 2000-12-09 Alexandre Oliva - * config/sh/sh.h (SECONDARY_OUTPUT_RELOAD_CLASS): Use a - general-purpose register to copy one branch-target register to - another. - 2000-12-06 Alexandre Oliva - * config/sh/sh.c (target_operand): Accept LABEL_REFs and - SYMBOL_REFs with VOIDmode. - * config/sh/sh.md (ble_media_i, blt_media_i, bleu_media_i, - bltu_media_i): New insns. - 2000-12-06 Alexandre Oliva - * config/sh/sh.h (RETURN_IN_MEMORY): Adjust for SH5 ABI. - (INIT_CUMULATIVE_ARGS): Likewise. - 2000-12-01 Alexandre Oliva - * machmode.def (V16SFmode): New mode. - * c-common.c (type_for_mode): Support V2SF and V16SF. - * tree.c (build_common_tree_nodes_2): Likewise. - * tree.h (tree_index): Likewise. - * calls.c (emit_call_1): Take args_so_far. Adjust all - callers. Introduce CALL_POPS_ARGS. - * tm.texi (CALL_POPS_ARGS): Document. - * config/sh/crt1.asm: Implement in SHmedia mode. - * config/sh/crti.asm, config/sh/crtn.asm: Likewise - * config/sh/elf.h (ASM_SPEC, LINK_SPEC): Support SH5 flags. - (DBX_REGISTER_NUMBER): Renumber registers for SH5. - * config/sh/lib1funcs.asm: Disable functions unused in SH5. - Implement divsi and udivsi in SHmedia mode. Introduce - SHcompact trampolines. - * config/sh/sh.c (GEN_MOV, GEN_ADD3, GEN_SUB3): Use DImode - only in SHmedia64. - (regno_reg_class): Rewrite. - (fp_reg_names): Remove. - (sh_register_names, sh_additional_register_names): New. - (print_operand): Added `u'. Support SUBREGs in addresses. - Add parentheses around shifted CONSTs. - (output_file_start): Output .mode and .abi directives. - (shiftcosts, addsubcosts, multcosts): Adjust. - (output_stack_adjust): Compute alignment. Sanity-check SIZE. - (push_regs): Take array of HOST_WIDE_INTs. Adjust callers. - (calc_live_regs): Output to array of HOST_WIDE_INTs. Count - bytes, not registers. Take into account the need for the - SHcompact incoming args trampoline. Adjust all callers. - (sh_expand_prologue): Take stack_regs into account. Call - incoming args trampoline. Keep stack aligned as per SH5 ABI. - (sh_expand_epilogue): Take stack_regs into accoutn. Keep - stack aligned as per SH5 ABI. - (sh_builtin_saveregs): Support SH5 ABI. - (sh_build_va_list, sh_va_start): Likewise. - (initial_elimination_offset): Take alignment into account. - Compute location of PR according to the SH5 stack frame. - (arith_reg_operand): Reject branch-target registers. - (shmedia_6bit_operand): New. - (logical_operand): Use CONST_OK_FOR_P on SHmedia. - (target_reg_operand): Match DImode only. Accept SUBREGs. - (target_operand): New. - * config/sh/sh.h (CPP_SPEC, SUBTARGET_CPP_SPEC): Support SH5 flags. - (CONDITIONAL_REGISTER_USAGE): Implement SH5 ABI. Initialize - SIBCALL_REGS for SHmedia. - (TARGET_SH3E, TARGET_SH4): Only if SH1_BIT is set too. - (TARGET_FPU_DOUBLE, TARGET_FPU_ANY): New. - (TARGET_SHMEDIA32, TARGET_SHMEDIA64): New. - (TARGET_SWITCHES): New SH5 flags. - (OVERRIDE_OPTIONS): Set SH5-specific options. Use - VALID_REGISTER_P to disable unsupported registers. - (LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE): Set. - (POINTER_SIZE, PARM_BOUNDARY): Adjust. - (FUNCTION_ARG_PADDING): Define. - (FASTEST_ALIGNMENT): Adjust. - (SH_REGISTER_NAMES_INITIALIZER): New. - (sh_register_names): Declare. - (DEBUG_REGISTER_NAMES): Define. - (REGISTER_NAMES): Define based on sh_register_names. - (SH_ADDITIONAL_REGISTER_NAMES_INITIALIZER): New. - (sh_additional_register_names): Declare. - (LAST_GENERAL_REG, LAST_FP_REG, LAST_XD_REG): Adjust for SHmedia. - (FIRST_TARGET_REG, LAST_TARGET_REG): Define. - (TARGET_REGISTER_P, SHMEDIA_REGISTER_P, VALID_REGISTER_P): Define. - (REGISTER_NATURAL_MODE): Define. - (FIRST_PSEUDO_REGISTER): Adjust. - (FIXED_REGISTERS, CALL_USED_REGISTERS): Adjust. - (HARD_REGNO_CALL_PART_CLOBBERED): Define. - (HARD_REGNO_NREGS, HARD_REGNO_MODE_OK): Adjust. - (VECTOR_MODE_SUPPORTED_P): Define. - (REG_CLASS_CONTENTS): Adjust. - (SMALL_REGISTER_CLASSES): Adjust. - (REG_ALLOC_ORDER): Adjust. - (INDEX_REG_CLASS): Adjust. - (CONST_OK_FOR_O, CONST_OK_FOR_P): New. - (CONST_OK_FOR_LETTER_P): Adjust. - (PREFERRED_RELOAD_CLASS): Adjust. - (SECONDARY_OUTPUT_RELOAD_CLASS): Adjust. - (SECONDARY_INPUT_RELOAD_CLASS): Adjust. - (NPARM_REGS, FIRST_PARM_REG, FIRST_RET_REG): Adjust. - (FIRST_FP_PARM_REG): Adjust. - (CALL_POPS_ARGS): Define. - (FUNCTION_ARG_REGNO_P): Adjust. - (struct sh_args): New fields. - (GET_SH_ARG_CLASS): Adjust. - (INIT_CUMULATIVE_ARGS): Adjust. - (INIT_CUMULATIVE_INCOMING_ARGS): Define. - (FUNCTION_ARG_ADVANCE): Adjust. - (FUNCTION_ARG): Adjust. - (FUNCTION_ARG_PASS_BY_REFERENCE, SHCOMPACT_BYREF): Define. - (FUNCTION_ARG_CALLEE_COPIES): Define. - (SH5_PROTOTYPELESS_FLOAT_ARG): Define. - (STRICT_ARGUMENT_NAMING): Define. - (PRETEND_OUTGOING_VARARGS_NAMED): Adjust. - (FUNCTION_ARG_PARTIAL_NREGS): Adjust. - (SH5_WOULD_BE_PARTIAL_NREGS): Define. - (SETUP_INCOMING_VARARGS): Adjust. - (HAVE_POST_INCREMENT, HAVE_PRE_DECREMENT): Adjust. - (USE_LOAD_POST_INCREMENT, USE_STORE_PRE_DECREMENT): Adjust. - (REGNO_OK_FOR_INDEX_P, REG_OK_FOR_INDEX_P): Adjust. - (SUBREG_OK_FOR_INDEX_P): Adjust. - (EXTRA_CONSTRAINT_S): Update. - (EXTRA_CONSTRAINT_T): New. - (EXTRA_CONSTRAINT): Adjust. - (GO_IF_LEGITIMATE_INDEX): Adjust. - (GO_IF_LEGITIMATE_ADDRESS): Adjust. - (LEGITIMIZE_ADDRESS, LEGITIMIZE_RELOAD_ADDRESS): Adjust. - (MOVE_MAX): Adjust. - (MAX_MOVE_MAX): Define. - (Pmode): Adjust. - (CONST_COSTS): Adjust. - (REGISTER_MOVE_COST): Adjust. - (BRANCH_COST): Adjust. - (TEXT_SECTION_ASM_OP): Adjust. - (DBX_REGISTER_NUMBER): Adjust. - (ASM_OUTPUT_DOUBLE_INT): New. - (UNALIGNED_DOUBLE_INT_ASM_OP): New. - (PREDICATE_CODES): Adjust. - (PROMOTE_MODE): Adjust. - (CRT_CALL_STATIC_FUNCTION): Do not define for SHmedia. - * config/sh/sh.md (AP_REG, PR_REG, T_REG, GBR_REG): Renumber. - (MACH_REG, MACL_REG, FPUL_REG, RAP_REG, FPSCR_REG): Renumber. - (PR_MEDIA_REG, T_MEDIA_REG, R10_REG): New. - (DR0_REG, DR2_REG, DR4_REG): Renumber. - (TR0_REG, TR1_REG, TR2_REG): New. - (XD0_REG): Renumber. - (UNSPEC_COMPACT_ARGS): New. - (type): Added pt and ptabs. - (length): Default to 4 on SHmedia. Default pt length to 12 - and 20 on SHmedia32 and SHmedia64, respectively. - (pt): New function unit. - (movdi, movsi): Add types pt and ptabs. Don't increment LABEL_NUSES. - Add whitespace between operands of SHmedia instructions. - (movdicc): Fix. - (adddi3_media, addsi3_media): Adjust constraints. - (subsi3) [SHmedia]: Force operand 1 into a register. - (udivsi3_i1_media, udivsi3_i4_media): New. - (udivsi3): Support SHmedia. - (divsi3_i1_media, divsi3_i4_media): New. - (divsi3): Support SHmedia. - (anddi3, iordi3, xordi3): Adjust constraints. - (zero_extendhidi2, zero_extendqidi2): New. - (extendsidi2, extendhidi2, extendqidi2): New. - (push, pop, push_e, push_fpul, push_4): Disable on SH5. - (pop_e, pop_fpul, pop_4): Likewise. - (movsi_media): Support FP and BT registers. - (movsi_media_nofpu): New. Adjust splits to DImode. - (lduw, ldub): Renamed to zero_extend* above. - (movqi_media): Fix typo. - (movdi_media): Support FP and BT registers. - (movdi_media_nofpu): New. Adjust splits for SHmedia32. - (movdi_const_32bit): New. - (shori_media): Require immediate operand. Use `u' for output. - (movdf_media, movsf_media): Simplified. - (movdf_media_nofpu, movsf_media_nofpu): New. - (movdf, movsf): Adjust - (movv2sf, movv2sf, movv16sf): New. - (beq_media, beq_media_i): Adjust constraints. Don't use - scratch BT register. - (bne_media, bne_media_i): Likewise. - (bgt_media, bgt_media_i): Likewise. - (bge_media, bge_media_i): Likewise. - (bgtu_media, bgtu_media_i): Likewise. - (bgeu_media, bgeu_media_i): Likewise. - (beq, bne, bgt, blt, ble, bge, bgtu, bltu, bgeu, bleu, - bunordered): Emit jump insn. Force operands to registers when - needed. - (jump_media, jump): Simplify. - (call_compact, call_compact_rettramp): New. - (call_value_compact, call_value_compact_rettramp): New. - (call_media, call_value_media): Simplify. - (sibcall_compact, sibcall_media): New. - (call, call_value): Adjust for SHmedia and SHcompact. - (sibcall, sibcall_value, untyped_call): Likewise. - (sibcall_epilogue): Preserve r0 across epilogue for SHcompact. - (indirect_jump): Adjust for SHmedia. - (casesi_jump_media): New. - (nop): Re-enable for SHmedia. - (call_site): Restrict to SH1. - (casesi): Adjust for SHmedia. - (casesi_shift_media, casesi_load_media): New. - (return): Explicitly use PR register. Call return trampoline - on SHcompact. - (return_i): Explicitly use PR register. - (shcompact_return_tramp, shcompact_return_tramp_i): New. - (return_media): Adjust. - (shcompact_incoming_args): New. - (epilogue): Adjust. - (seq, slt, sle, sgt, sge, sgtu, sltu, sleu, sgeu, sne): Adjust. - (movstrsi): Disable on SH5. - (fpu_switch0, fpu_switch1, movpsi): Enable on SH4. - (addsf3, addsf3_media): Test TARGET_SHMEDIA_FPU. - (subsf3, subsf3_media): Likewise. - (mulsf3, mulsf3_media, mac_media): Likewise. - (divsf3, divsf3_media): Likewise. - (floatdisf2, floatsisf2_media): Likewise. Adjust constraints. - (floatsisf2, fux_truncsfsi2): Likewise. - (fix_truncsfdi2, fix_truncsfsi2_media): Likewise. Adjust - constraints. - (cmpeqsf_media, cmpgtsf_media, cmpgesf_media): Likewise. - (cmpunsf_media, cmpsf): Likewise. - (negsf2, negsf2_media, sqrtsf2, sqrtsf2_media): Likewise. - (abssf2, abssf2_media): Likewise. - (adddf3, adddf3_media, subdf3, subdf3_media): Likewise. - (muldf3, muldf3_media, divdf3, divdf3_media): Likewise. - (floatdidf2, floatsidf2_media): Likewise. Adjust constraints. - (floatsidf2, fix_truncdfsi2): Likewise. - (fix_truncdfdi2, fix_truncdfsi2_media): Likewise. Adjust - constraints. - (cmpeqdf_media, cmpgtdf_media): Likewise. - (cmpgedf_media, cmpundf_media, cmpdf): Likewise. - (negdf2, negdf2_media, sqrtdf2, sqrtdf2_media): Likewise. - (absdf2, absdf2_media): Likewise. - (extendsfdf2, extendsfdf2_media): Likewise. - (truncsfdf2, truncsfdf2_media): Likewise. - * config/sh/sh64.h: New file. - * config/sh/t-sh64: New file. - * config/sh/shmedia.h: New file. - * config/sh/ushmedia.h: New file. - * config/sh/sshmedia.h: New file. - * configure.in: Added sh64-*-elf. - * configure: Rebuilt. - 2000-10-10 Alexandre Oliva - * config/sh/sh.c (GEN_MOV, GEN_ADD3, GEN_SUB3): New macros. - (reg_class_from_letter): Use `b' for TARGET_REGS. - (print_operand): Support `%M', `%m', `AND' and - `ASHIFTRT'. Do not precede constants with `#' on SHmedia. - (andcosts): Adjust for SHmedia. - (output_stack_adjust, sh_expand_prologue, sh_expand_epilogue): - Likewise. - (target_reg_operand): New function. - * config/sh/sh-protos.h (target_reg_operand): Declare. - * config/sh/sh.h (CONDITIONAL_REGISTER_USAGE): Don't disable - FP registers on SH5. - (HARD_REGNO_MODE_OK): Accept them whenever they're acceptable - on SH4. - (TARGET_REGISTER_P): New macro. - (reg_class, REG_CLASS_NAMES, REG_CLASS_CONTENTS): Added TARGET_REGS. - (FUNCTION_VALUE): Use DImode for promoted types on SHmedia. - (EXTRA_CONSTRAINT_S): New macro. - (EXTRA_CONSTRAINT): Adjust. - (FLOAT_TYPE_SIZE): Define to 32. - (Pmode): DImode on SHmedia. - (CONST_COSTS): Adjust for SHmedia literals. - (PREDICATE_CODES): Added target_reg_operand. - (PROMOTE_MODE): Promote signed types to DImode on SHmedia. - * config/sh/sh.md: Remove all attrs from SHmedia insns. - (cmpeqdi_media, cmpgtdi_media, cmpgtudi_media): New insns. - (cmpdi): Accept SHmedia. - (movdicc_false, movdicc_true): New insns. - (movdicc): New expand. - (adddi3): Accept arith_operand for op2, but FAIL on SH1 if - no_new_pseudos. - (addsi3_media): Match `S' constraint. - (anddi3, andcdi3, iordi3, xordi3, negdi_media): New insns. - (negdi2): Expand for SHmedia. - (one_cmpldi2): New expand. - (zero_extendsidi2): Change from expand to insn. - (extendsidi2): Add constraints. - (movdi_media, movsi_media): Change `%x' to `%M'. Use `%m' for - LD/ST address. Fix SI immediate loading split. - (movhi_media, movqi_media, lduw, ldub): New insns. - (movhi, movqi): Accept SHmedia. - (shori_media, movdi_media): Relax input constraints. Split - symbolic constants. - (movdf_media, movsf_media): New insn. New split to movdi. - (movdf, movsf): Match on SHmedia. - (beq_media, bne_media, bgt_media, bge_media, bgtu_media, - bgeu_media): New insns and splits. New insns with `_i' suffix. - (beq, bne, bgt, blt, ble, bge, bgtu, bltu, bgeu, bleu): Adjust. - (bunordered): New expand. - (jump_compact): Renamed from `jump'. - (jump_media): New insn. - (jump): New expand. - (call_media, call_value_media): New insns. - (call, call_value): Adjust. - (indirect_jump_compact): Renamed from `indirect_jump'. - (indirect_jump_media): New insn. - (indirect_jump): New expand. - (untyped_call, return): Accept SHmedia. - (return_media): New insn. - (prologue, epilogue, blockage): Accept SHmedia. - (seq, slt, sle, sgt, sge, sgtu, sltu, sleu, sgeu, sne): Adjust. - (sunordered): New expand. - (addsf3, subsf3, mulsf3, divsf3, floatsisf2, fix_truncsfsi2, - cmpsf, negsf2, sqrtsf2, abssf2): Adjust for SHmedia. - (addsf3_media, subsf3_media, mulsf3_media, mac_media, - divsf3_media, floatdisf2, floatsisf2_media, fix_truncsfdi2, - fix_truncsfsi2_media, cmpeqsf_media, cmpgtsf_media, - cmpgesf_media, cmpunsf_media, negsf2_media, sqrtsf2_media, - abssf2_media): New insns. - (adddf3, subdf3, muldf3, divdf3, floatsidf2, fix_truncdfsi2, - cmpdf, negdf2, sqrtdf2, absdf2): Adjust for SHmedia. - (adddf3_media, subdf3_media, muldf3_media, divdf3_media, - floatdidf2, floatsidf2_media, fix_truncdfdi2, - fix_truncdfsi2_media, cmpeqdf_media, cmpgtdf_media, - cmpgedf_media, cmpundf_media, negdf2_media, sqrtdf2_media, - absdf2_media): New insns. - (extendsfdf2, truncdfsf2): Adjust for SHmedia. - (extendsfdf2_media, truncdfsf2_media): New insns. - 2000-09-14 Alexandre Oliva - * config/sh/sh.c (machine_dependent_reorg): On shmedia, skip for now. - * config/sh/sh.h (CONST_OK_FOR_J): Document. - (LEGITIMATE_CONSTANT_P): Accept CONST_DOUBLEs on shmedia. - * config/sh/sh.md (adddi3): New expand. - (adddi3_media, adddi3z_media): New insns. - (adddi3_compact): Renamed from adddi3. - (addsi3_media): Use add.l r63 to add constant zero. - (subdi3): New expand. - (subdi3_media): New insn. - (subdi3_compact): Renamed from subdi3. - (mulsidi3): New expand. - (mulsidi3_media): New insn. - (mulsidi3_compact): Renamed from mulsidi3. - (umulsidi3): New expand. - (umulsidi3_media): New insn. - (umulsidi3_compact): Renamed from umulsidi3. - (ashlsi3_media, ashrsi3_media, lshrsi3_media): New insns. - (ashlsi3, ashrsi3, lshrsi3): Use them. - (ashldi3_media, ashrdi3_media, lshrdi3_media): New insns. - (ashldi3, ashrdi3, lshrdi3): Use them. - (zero_extendsidi2): New expand. - (extendsidi2): New insn. - (movsi_media): New insn. Split to movdi to load constants. - (movsi): Enable for shmedia. - (movdi_media): New insn. Use shori_media to load wide constants. - (short_media): New insn. - (movdi): Enable for shmedia. - 2000-09-08 Alexandre Oliva - * config/sh/sh.h (CPP_SPEC): Added `m5'. - (SUBTARGET_CPP_SPEC): Added `!m5'. - (SH5_BIT, TARGET_SH5, TARGET_SHMEDIA, TARGET_SHCOMPACT): New macros. - (TARGET_SWITCHES): Added `5' and `5-compact'. Added SH1_BIT - to all other SH variants. - (TARGET_DEFAULT): Set to SH1_BIT. - (OVERRIDE_OPTIONS): Recognize sh5 CPU. - (BITS_PER_WORD): Raise to 64 on shmedia. - (MAX_BITS_PER_WORD): Change to 64. - (MAX_LONG_TYPE_SIZE, MAX_WCHAR_TYPE_SIZE): Set to MAX_BITS_PER_WORD. - (INT_TYPE_SIZE): Keep as 32. - (UNITS_PER_WORD): Raise to 8 on shmedia. - (MIN_UNITS_PER_WORD): Keep as 4. - (POINTER_SIZE): Raise to 64 on shmedia. - (CONST_OK_FOR_J): New macro. - (CONST_OK_FOR_LETTER_P): Use it. - (processor_type): Add PROCESSOR_SH5. - * config/sh/sh.md: Conditionalize all expands, insns and - splits to TARGET_SH1. - (cpu): Added sh5. - (addsi3_compact): Renamed from... - (addsi3): Now an expand. - (addsi3_media, subsi3_media): New insns. - (subsi3): Don't negate constants with SHmedia. - - * hooks.c: New file. - * hooks.h: New file. - * Makefile.in (HOOKS_H): New. - (TARGET_DEF_H): Added $(HOOKS_H). - (OBJS): Added hooks.o. - (cfgcleanup.o, bb-reorder.o): Added target.h. - (hooks.o): Added dependencies. - * target-def.h (TARGET_CANNOT_MODIFY_JUMPS_P): New, added to... - (TARGET_INITIALIZER): this. - * doc/tm.texi (TARGET_CANNOT_MODIFY_JUMPS_P): Document. - * target.h (struct gcc_target): Added cannot_modify_jumps_p. - * bb-reorder.c: Include target.h. - (reorder_basic_blocks): Skip if cannot modify jumps. - * cfgcleanup.c: Include target.h. - (try_optimize_cfg): Skip merge blocking if cannot modify jumps. - -2002-02-08 Chris Demetriou - - * config/mips/mips.md (casesi_internal, casesi_internal_di): - Protect jump delay slot instructions with .set noreorder and - .set nomacro. - -2002-02-08 Chris Demetriou - - * config/mips/mips.md (casesi_internal_di): Calculate - the index into the target offset table correctly. - -2002-02-08 Richard Henderson - - * expr.c (expand_expr): Mind EXPAND_INITIALIZER for truncation also. - * final.c (output_addr_const): Accept and discard SUBREG. - * varasm.c (decode_addr_const): Don't abort on unknown expressions -- - mark them unknown instead. - (simplify_subtraction): Handle RTX_UNKNOWN. - (initializer_constant_valid_p): Strip NOP_EXPRs that narrow the mode. - -2002-02-08 David Edelsohn - - * doc/invoke.texi (RS/6000 and PowerPC Options): Fix typo. - -2002-02-08 Richard Henderson - - * config/alpha/elf.h (ASM_OUTPUT_ALIGNED_BSS): New. - -2002-02-08 Andreas Jaeger - - * config.gcc (x86_64-*-linux): Add t-linux64 makefile fragment. - * config/i386/t-linux64: New file. - -2002-02-08 Jakub Jelinek - - * c-common.c (c_expand_expr): Revert 2002-02-06 patch. - * c-parse.in (compstmt): Clear last_expr_type. - -2002-02-07 Richard Henderson - - * loop.c (strength_reduce): Sink final_value when not - eliminating a biv. - -2002-02-07 David O'Brien - - * config/sparc/freebsd.h: Fix mismatched spec {. - -2002-02-07 Richard Henderson - - * cfgrtl.c: Include recog.h and insn-config.h. - (keep_with_call_p): Fix general_operand invocation. - * Makefile.in (cfgrtl.o): Update dependencies. - -2002-02-07 Kazu Hirata - - * config/h8300/h8300.c (two_insn_adds_subs_operand): Revise a - comment. Accept HImode only if TARGET_H8300. - -2002-02-07 Eric Christopher - - * config/mips/crtn.asm: Cleanup #ifdefs. - -2002-02-07 Eric Christopher - - * config/mips/crti.asm: Add changes for mips16. mips16 uses - register 7 as RA instead of $31. - * config/mips/crtn.asm: Ditto. - * config/mips/mips.c (mips_move_2words): Add case for - TARGET_MIPS16 when HOST_BITS_PER_WIDE_INT >= 64. - (compute_frame_size): Fix typo. - (save_restore_insns): Ditto. Make documentation about using - register $7 as return register more precise. - (mips_expand_epilogue): Fix comment. Add code to work around not - being able to add to the stack pointer directly. - * config/mips/mips.h (EH_RETURN_DATA_REGNO): Change register number - to 2 for TARGET_MIPS16 as we need 6 and 7 as clobbers in the - epilogue. - -2002-02-07 Tom Rix - - * config/rs6000/rs6000.c (reg_or_aligned_short_operand): New. For - immediates in ldu and stdu DS opcode field. - * config/rs6000/rs6000.md (movdi_update, movdi_update1): Use. - * config/rs6000/rs6000-protos.h: Add reg_or_aligned_short_operand. - * config/rs6000/rs6000.h (PREDICATE_CODES): Same. - -2002-02-07 Jeff Sturm - - * config/sparc/sparc.c (compute_frame_size): Don't correct frame - offset for stack bias. - -2002-02-07 H.J. Lu - - * config/mips/linux.h (SUBTARGET_ASM_DEBUGGING_SPEC): Defined. - -2002-02-07 Ulrich Weigand - - * testsuite/gcc.dg/cpp/charconst-2.c: Add -fsigned-char option. - -Thu Feb 7 12:14:17 CET 2002 Jan Hubicka - - * i386-protos.h (x86_order_regs_for_local_alloc): Declare - * i386.c (x86_order_regs_for_local_alloc): New global function. - * i386.h (REG_ALLOC_ORDER): CLeanup. - (ORDER_REGS_FOR_LOCAL_ALLOC): New. - -2002-02-07 Richard Henderson - - PR optimization/2463 - * alias.c (find_base_value): Recall base values for fixed hard regs. - * loop.c (loop_regs_update): Don't use single_set on non-insns. - -2002-02-07 Alexandre Oliva - - * config/mips/mips.md (define_delay) [mips16]: Adjust required - length. - -2002-02-06 Richard Henderson - - PR c/5609 - * stmt.c (resolve_operand_name_1): Take more care with mixed - named and unnamed operands. - -2002-02-06 Janis Johnson - Jan Hubicka - - * loop.c (remove_constant_addition): Avoid clobbering a shared - CONST expression. - -2002-02-06 Ulrich Weigand - - * config.gcc (s390x-*-linux*): Add t-linux64 makefile fragment. - * config/s390/t-linux64: New file. - * config/s390/libgcc-glibc.ver: New file. - -2002-02-06 Ulrich Weigand - - * config/s390/linux64.h: Delete file. - * config/s390/s390x.h: New file. - * config.gcc (s390x-*-linux*): Use s390x.h instead of linux64.h - as target header file. - * config/s390/linux.h (TARGET_VERSION): Define depending on - DEFAULT_TARGET_64BIT. - (CPP_SPEC, ASM_SPEC, LINK_SPEC): Likewise. - (SIZE_TYPE, PTRDIFF_TYPE): Likewise. - (NO_BUILTIN_SIZE_TYPE, NO_BUILTIN_PTRDIFF_TYPE): Define. - (CPP_ARCH31_SPEC, CPP_ARCH64_SPEC): New defines. - (LINK_ARCH31_SPEC, LINK_ARCH64_SPEC): New defines. - (EXTRA_SPEC): New define. - * config/s390/s390.h (TARGET_VERSION): Define depending on - DEFAULT_TARGET_64BIT. - (MASK_RETURN_ADDR): Add run-time check for TARGET_64BIT. - -2002-02-06 Jason Merrill - - * c-decl.c (finish_function): Warn about a non-void function with - no return statement and no abnormal exit. - (current_function_returns_abnormally): New variable. - (start_function): Clear it. - (struct c_language_function): Add returns_abnormally. - (push_c_function_context): Save it. - (pop_c_function_context): Restore it. - (builtin_function): Set TREE_THIS_VOLATILE on return fns. - (grokdeclarator): Set C_FUNCTION_IMPLICIT_INT on functions without - an explicit return type. - * c-tree.h: Declare current_function_returns_abnormally. - (C_FUNCTION_IMPLICIT_INT): New macro. - * c-typeck.c (build_function_call): Set it. - (c_expand_return): Set current_function_returns_value even if the - value is erroneous. - -2002-02-06 Jakub Jelinek - - PR c/5420: - * c-common.c (c_unsafe_for_reeval): Make COMPOUND_LITERAL_EXPR - unsafe for reevaluation. - -2002-02-06 Jakub Jelinek - - PR c/5482: - * c-common.c (c_expand_expr) [STMT_EXPR]: If last expression is not - EXPR_STMT, but COMPOUND_STMT, recurse into it. - -2002-02-06 Richard Henderson - - * cfganal.c (keep_with_call_p): Source for fixed_reg dest must - be a general_operand. Dest for function value must be a pseudo. - -2002-02-06 Nick Clifton - - * dbxout.c (dbxout_symbol_location): Accept LABEL_REFs as well - as SYMBOL_REFs from the constant pool. - -2002-02-06 Alexandre Oliva - - * dbxout.c (dbxout_parms): Apply DEBUGGER_ARG_OFFSET to parameters - passed by invisible reference. - -2002-02-05 Richard Henderson - - * config/sparc/sparc.h (ARG_POINTER_CFA_OFFSET): No stack bias. - -2002-02-06 Hans-Peter Nilsson - - Implement using "base addresses" in insn operands as default. - * config/mmix/mmix.c (mmix_conditional_register_usage): if - -mabi=gnu, modify fixed_regs to fit the GNU ABI. - (mmix_extra_constraint): Use 'R' to indicate that GETA should be - used to read the rtx value. - (mmix_target_asm_function_epilogue): Fix spacing. - (mmix_constant_address_p): Handle TARGET_BASE_ADDRESSES. - (mmix_legitimate_address): Ditto. - (mmix_encode_section_info): Set SYMBOL_REF_FLAG on rtx:es that - should be loaded with a GETA insn. Don't allocate needless extra - char for nul termination and fix misleading comment. - (mmix_print_operand_address): Handle constants if - TARGET_BASE_ADDRESSES. - (mmix_output_register_setting): Use base addressing if - TARGET_BASE_ADDRESSES and the number of insns is 3. - * config/mmix/t-mmix (MULTILIB_EXTRA_OPTS): New. - * config/mmix/mmix.md ("movdi"): Change the alternative with GETA - to use R as constraint, add LDA to match s. - * config/mmix/mmix.h (TARGET_BASE_ADDRESSES): New. - (TARGET_DEFAULT): Add TARGET_MASK_BASE_ADDRESSES. - (TARGET_SWITCHES): Add -mbase-addresses, -mno-base-addresses. - (FIXED_REGISTERS): Make registers $231..$246 fixed by default. - (MMIX_MMIXWARE_ABI_REG_ALLOC_ORDER): Move $231..$246 last, in - order with other fixed registers. - (MMIX_GNU_ABI_REG_ALLOC_ORDER): Put forward $231, in order with - other parameter/call-clobbered registers. - * doc/invoke.texi (Option Summary) : Add - -mbase-addresses, -mno-base-addresses. - (MMIX Options): Ditto. - -2002-02-05 John David Anglin - - * pa.h (PREDICATE_CODES): Add reg_before_reload_operand. - -2002-02-06 Aldy Hernandez - - * config/rs6000/altivec.h: Change elem to _S_elem. - -2002-02-05 Jason Thorpe - - * config/netbsd.h (WCHAR_TYPE): Define. - (WCHAR_TYPE_SIZE): Ditto. - (WINT_TYPE): Ditto. - * config/alpha/netbsd.h (WCHAR_TYPE): Remove. - (WCHAR_UNSIGNED): Ditto. - (WCHAR_TYPE_SIZE): Ditto. - (WINT_TYPE): Ditto. - * config/arm/netbsd.h: Likewise. - * config/i386/netbsd-elf.h: Likewise. - * config/i386/netbsd.h: Likewise. - * config/m68k/netbsd-elf.h: Likewise. - * config/m68k/netbsd.h: Likewise. - * config/ns32k/netbsd.h: Likewise. - * config/sparc/netbsd.h: Likewise. - * config/vax/netbsd.: Likewise. - -2002-02-05 Alexandre Oliva - - * target.h (struct gcc_target): Added ms_bitfield_layout_p. - * target-def.h (TARGET_MS_BITFIELD_LAYOUT_P): New. Added to... - (TARGET_INITIALIZER): this. - * doc/tm.texi (TARGET_MS_BITFIELD_LAYOUT_P): Document. - (BITFIELD_NBYTES_LIMITED): Markup fix. - * tree.h (default_ms_bitfield_layout_p): Declare. - (record_layout_info): Added prev_field. - * tree.c (default_ms_bitfield_layout_p): New fn. - * c-decl.c (finish_struct): Disregard EMPTY_FIELD_BOUNDARY and - PCC_BITFIELD_TYPE_MATTERS for MS bit-field layout. - * stor-layout.c: Include target.h. - (start_record_layout): Initialize prev_field. - (place_field): Handle MS bit-field layout, and disregard - EMPTY_FIELD_BOUNDARY, BITFIELD_NBYTES_LIMITED and - PCC_BITFIELD_TYPE_MATTERS in this case. Update prev_field. - * Makefile.in (stor-layout.o): Adjust dependencies. - -2002-02-05 Jason Merrill - - * collect2.c (dump_file): Pass DMGL_VERBOSE to cplus_demangle. - -2002-02-05 Andreas Jaeger - - * crtstuff.c: Fix comments. - -2002-02-05 Richard Henderson - - PR fortran/3393 - * loop.c (loop_iv_add_mult_emit_before): Copy multiplier as well. - (loop_iv_add_mult_sink, loop_iv_add_mult_hoist): Likewise. - - PR fortran/3392 - * config/mips/mips.c (function_arg): Handle TImode. - (function_arg_advance): Likewise. - -2002-02-05 Aldy Hernandez - - * config/rs6000/altivec.h (vec_step_help): Rename to - __vec_step_help. - -2002-02-05 Aldy Hernandez - - * config/rs6000/altivec.h: Fix typos. - -2002-02-05 Jason Thorpe - - * config/arm/netbsd.h: Correct a comment. - -2002-02-05 Aldy Hernandez - - * config/rs6000/rs6000.c (altivec_init_builtins): Fix typo - building void typed builtins. - - * config/rs6000/altivec.h (vec_ld*): Fix typos. - (vec_step): Implement for C++. - -Mon Feb 4 19:23:19 2002 Richard Kenner - - * final.c (final_scan_insn): Add case for NOTE_INSN_LOOP_END_TOP_COND. - -2002-02-04 Richard Henderson - - * combine.c (nonzero_bits): Re-introduce special case for - sp/fp/ap wrt REGNO_POINTER_ALIGN. - -2002-02-05 Aldy Hernandez - - * doc/extend.texi: Warn about unsupported usage of altivec - builtins. - - * config/rs6000/rs6000.md (altivec_vcmp*_p): Remove. - (altivec_predicate_*): New. - - * config/rs6000/altivec.h: Rewrite predicates to use new builtins. - Add C++ version of vec_*() functions. - - * config/rs6000/rs6000.c (bdesc_altivec_preds): New. - (bdesc_2arg): Remove altivec predicates. - (altivec_expand_builtin): Handle predicates. - (altivec_init_builtins): Handle predicates. - (altivec_expand_predicate_builtin): New. - -2002-02-04 John David Anglin - - * pa.c (DO_FRAME_NOTES): Move forward. - (store_reg): Revise handling of frame notes. - (load_reg): Likewise. - (set_reg_plus_d): Likewise. - (hppa_expand_prologue): Likewise. - (hppa_expand_epilogue): Likewise. - -2002-02-04 John David Anglin - - * unwind-dw2-fde-glibc.c: Define _GNU_SOURCE if not defined. - -2002-02-04 Jakub Jelinek - - PR c/4475, c++/3780: - * c-common.def (SWITCH_STMT): Add SWITCH_TYPE operand. - * c-common.h (SWITCH_TYPE): Define. - * c-typeck.c (c_start_case): Set SWITCH_TYPE. - * stmt.c (all_cases_count): Set lastval to thisval at end of loop. - Rename spareness variable to sparseness. - (expand_end_case_type): Renamed from expand_end_case, use orig_type - if non-NULL instead of TREE_TYPE (orig_index). - * tree.h (expand_end_case_type): Renamed from expand_end_case. - (expand_end_case): Define using expand_end_case_type. - * c-semantics.c (genrtl_switch_stmt): Pass SWITCH_TYPE - to expand_end_case_type. - * doc/c-tree.texi (SWITCH_STMT): Document SWITCH_TYPE. - -2002-02-04 John David Anglin - - * pa.h (PREFERRED_STACK_BOUNDARY): Define to match standard rounding. - (BIGGEST_ALIGNMENT): Change to 128. - -2002-02-04 John David Anglin - - * pa32-linux.h (LINK_COMMAND_SPEC): Define. - -2002-02-04 John David Anglin - - * pa.md (call_internal_reg_64bit): Remove unused variable. - -2002-02-04 Nick Clifton - - * config/arm/arm.h (machine_function): Add uses_anonymous_args - field. - (SETUP_INCOMING_VARARGS): Set uses_anonymous_args. - * config/arm/arm.c (current_function_anonymous_args): Delete, - replace uses with cfun->machine->uses_anonymous_args. - (arm_reorg): Do not reset uses_anonymous_args. - - * config/arm/arm.c (arm_hard_regno_mode_ok): Allow any value in - any geenral register. - -2001-02-04 Bernd Schmidt - - * cfgrtl.c (force_nonfallthru_and_redirect): Don't try to redirect - the entry block. - -2002-02-04 Richard Henderson - - * combine.c (force_to_mode): Remove STACK_BIAS code. - (nonzero_bits): Likewise. Replace sp/fp special case with - REGNO_POINTER_ALIGN. - - * config/sparc/sparc.h (FRAME_POINTER_REGNUM): Change to SFP. - (HARD_FRAME_POINTER_REGNUM): New. - (FIRST_PSEUDO_REGISTER, REG_CLASS_CONTENTS): Update. - (FIXED_REGS, CALL_USED_REGS): Update. - (REG_ALLOC_ORDER, REGISTER_NAMES): Update. - (CONDITIONAL_REGISTER_USAGE): Update for HFP. - (HARD_REGNO_NREGS): Update for SFP. - (STACK_POINTER_OFFSET): Include bias here ... - (FIRST_PARM_OFFSET): ... not here. - (STACK_BIAS): Remove. - (INIT_EXPANDERS): New. - (STARTING_FRAME_OFFSET): Do not include bias. - (ELIMINABLE_REGS, CAN_ELIMINATE, INITIAL_ELIMINATION_OFFSET): New. - (REGNO_OK_FOR_INDEX_P, REGNO_OK_FOR_BASE_P): Update for SFP. - (REG_OK_FOR_INDEX_P, REG_OK_FOR_BASE_P): Likewise. - * config/sparc/aout.h (DBX_REGISTER_NUMBER): Update for HFP. - * config/sparc/litecoff.h, config/sparc/sol2.h: Likewise. - * config/sparc/sparc.c (mem_min_alignment): Update for HFP. - (sparc_nonflat_function_prologue, epilogue_renumber): Likewise. - (MUST_SAVE_REGISTER): Likewise. - (sparc_flat_function_prologue): Likewise. - (sparc_flat_function_epilogue): Likewise. - (HARD_FRAME_POINTER_MASK): Rename from FRAME_POINTER_MASK. - (sparc_init_modes): SFP is GENERAL_REGS. - (sparc_builtin_saveregs): SFP does not have bias applied. - -2002-02-04 Richard Henderson - - * config/alpha/alpha.c (current_function_is_thunk): Don't check - current_function_is_thunk. - (alpha_sa_mask): Distinguish between current_function_is_thunk - called from ASM_OUTPUT_MI_THUNK and not. - (alpha_does_function_need_gp): Thunks always need gp. - (alpha_start_function, alpha_output_function_end_prologue): Likewise. - (alpha_output_mi_thunk_osf): New. - * config/alpha/alpha-protos.h: Update. - * config/alpha/alpha.h (ASM_OUTPUT_MI_THUNK): New. - -2002-02-04 Richard Sandiford - - * c-typeck.c (build_c_cast): Warn when qualifiers are added to - function types, not when they're taken away. - -Mon Feb 4 09:05:58 2002 Jeffrey A Law (law@redhat.com) - - * cfgrtl.c (try_redirect_by_replacing_jump): Remove associated - CODE_LABEL and jump table when replacing a table jump with a - simple jump. - -2002-02-04 Ulrich Weigand - - * config/s390/s390-protos.h (legitimize_la_operand, - s390_secondary_input_reload_class, s390_plus_operand, - s390_expand_plus_operand): Add prototypes. - - config/s390/s390.c (s390_secondary_input_reload_class, - s390_plus_operand, s390_expand_plus_operand): New functions. - - (struct s390_address): New member 'pointer'. - (s390_decompose_address): Compute it. - (legitimate_la_operand_p): Use it. - (legitimize_la_operand): New function. - (movti, movdi, movdf splitters): Call it. - - config/s390/s390.h (SECONDARY_INPUT_RELOAD_CLASS): Define. - (PREDICATE_CODES): Add s390_plus_operand. - - config/s390/s390.md (adddi3_inv_64, addaddr_ccclobber): Delete. - (la_ccclobber): Allow GENERAL_REGS as output operand. - - (reload_load_address, *reload_load_address_reg_0, *la, *do_la_reg_0, - *reload_la_64, *reload_la_31 and splitters): Delete, replace by ... - (*la_64, *la_31, reload_indi, reload_insi): ... these. - -2002-02-04 Ulrich Weigand - - * gcc/config/s390/s390.h (CRT_CALL_STATIC_FUNCTION): Fixed - register names for regular asm () construct. - -2002-02-04 Jakub Jelinek - - * config/i386/i386.md (movsf_1): Allow moving SF values in MMX - registers. - -2002-02-04 Jakub Jelinek - - * combine.c (recog_for_combine): Create a dummy insn with PATTERN - pat for recog. - -2002-02-04 Hartmut Penner - - * varasm.c (decode_rtx_const): Allow unspec (symbol_ref) in - constant pool to be identical by string address and index. - -2002-02-04 Anthony Green - - * output.h (SECTION_OVERRIDE): Define. - * varasm.c (named_section): Obey SECTION_OVERRIDE. - -2002-02-03 Jason Thorpe - - * config.gcc (arm*-*-netbsdelf*): Placeholder to prevent match - by existing arm*-*-netbsd* (a.out) target. - (ns32k-*-netbsdelf*): Likewise. - (sparc-*-netbsdelf*): Likewise. - (vax-*-netbsdelf*): Likewise. - -2002-02-03 Danny Smith - - * gthr-win32.h: Protect against conflicting typedef for BOOL in windows - headers and libobjc headers. - -2002-02-03 Mumit Khan - - * gthr-win32.h (__mingwthr_key_dtor): Use extern "C" linkage for C++. - (_mingw.h): Remove duplicate include. - -2002-02-03 Jason Thorpe - - * config.gcc: Set cpu_type to m68k for 68010, as well. - (m68010-*-netbsdelf*): New... - (m68k*-*-netbsdelf*): ...targets. - * config/m68k/netbsd-elf.h: New file. - -2002-02-02 Kazu Hirata - - * config/h8300/h8300.c (hand_list): Move inside function_arg. - -2002-02-02 Kazu Hirata - - * config/h8300/h8300.c (h8_push_ops): Move inside - h8300_init_once. - (h8_pop_ops): Likewise. - (h8_move_ops): Likewise. - -2002-02-02 Kazu Hirata - - * config/h8300/h8300.c (os_task): Make it static. - (monitor): Likewise. - (pragma_saveall): Likewise. - -2002-02-02 Alexandre Oliva - - * config/sh/sh.md (ic_invalidate_line): Make sure the immediate - constant is a valid sign-extension for Pmode. - -2002-02-02 Kazu Hirata - - * config/h8300/h8300.c: Fix formatting. - -2002-02-02 Kazu Hirata - - * config/h8300/h8300.md: Fix formatting. - -2002-02-02 Kazu Hirata - - * config/h8300/h8300.md (one_cmpl patterns): Tighten the - predicates of operands[1]. Split the patterns for each - processor variant. - -2002-02-02 Kazu Hirata - - * config/h8300/h8300.md (xor patterns): Tighten the predicates - of operands[1] to register_operand. - -2002-02-02 Neil Booth - - * cpphash.h (struct spec_nodes): Remove n__CHAR_UNSIGNED__. - * cpphash.c (_cpp_init_hashtable): Similarly. - * cppinit.c (cpp_create_reader): Default the signed_char flag. - (init_builtins): Define __CHAR_UNSIGNED__ appropriately. - (COMMAND_LINE_OPTIONS): Recognise -f{un,}signed-char. - (cpp_handle_option): Handle the new options. - * cpplex.c (cpp_interpret_charconst): Use new flag. - * cpplib.h (struct cpp_options): New member signed_char. - * gcc.c (cpp_unique_options): Remove %c spec and documentation. - (cpp_options): Handle -fsigned-char and -funsigned-char. - (static_specs): Remove signed_char_spec. - (do_spec1): Don't handle %c. - * system.h: Poison SIGNED_CHAR_SPEC. - * tradcif.y (yylex): Use flag_signed_char. - * tradcpp.h (flag_signed_char): New. - * tradcpp.c (flag_signed_char): New. - (main): Handle new command-line options. - (initialize_builtins): Define __CHAR_UNSIGNED__ if appropriate. -config: - * alpha/alpha.h (SIGNED_CHAR_SPEC): Remove. - * avr/avr.h: Remove old comments. - * i960/i960.h (CPP_SPEC): Pass -fsigned-char if -mic*. - (CC1_SPEC): Pass -fsigned-char if -mic*. - (SIGNED_CHAR_SPEC): Remove. -doc: - * tm.texi (SIGNED_CHAR_SPEC): Remove documentation. - -2002-02-01 Eric Christopher - - From Daniel Jacobowitz - * config/mips/mips.h (FUNCTION_PROFILER): Fix function profiling. - * config/mips/linux.h (ASM_OUTPUT_REG_PUSH): Undefine. - (ASM_OUTPUT_REG_POP): Ditto. - -2002-02-02 Neil Booth - - * c-decl.c, tree.c, tree.h, objc/objc-act.c: Revert bitfield - patch. - -2002-02-02 Jakub Jelinek - - * config/i386/i386.h (CPP_CPUCOMMON_SPEC): Add missing | separators. - -2002-02-02 Jakub Jelinek - - PR c/5304: - * expmed.c (expand_mult_highpart): Use immed_double_const for wide_op1 - unconditionally. - -2002-02-01 Janis Johnson - - * cfganal.c: Include tm_p.h. - (keep_with_call_p): Fix the test that determines if a register holds - the return value of a call. - -2002-02-01 DJ Delorie - - * config/sparc/sparc.c (sparc_emit_set_symbolic_const64): If - we are given conflicting registers, switch to the other one we - had allocated for us. - * config/sparc/sparc.md (reload_indi, reload_outdi): Pass op[2] - as TImode so we know when the "other" register is available. - -2002-02-01 David O'Brien - - * config/sparc/sol2-sld-64.h: Include sparc/biarch64.h rather than - sparc/sparc_bi.h. - -2002-02-01 Janis Johnson - - * cfganal.c (keep_with_call_p): New function. - (flow_call_edges_add): Prevent splitting a block between a call and - a single-set instruction that should be kept in the same block. - -2002-02-01 Craig Rodrigues - - * doc/install.texi (avr): Update outdated URL. - -2002-01-30 Andrew Haley - - * config/stormy16/stormy16.md (pushqi): New. - (popqi): New. - (pushhi): New. - (pophi): New. - (movhi): Remove stack operands. - (movqi): Likewise. - * config/stormy16/stormy16.h (PREDICATE_CODES): Add - nonimmediate_nonstack_operand. - * config/stormy16/stormy16.c (nonimmediate_nonstack_operand): - New. - * config/stormy16/stormy16-protos.h (nonimmediate_nonstack_operand) - New. - -2002-01-31 Jason Merrill - - * Makefile.in (c-parse.c): Handle .output file. - * objc/Make-lang.in (objc-parse.c): Likewise. - -2002-02-01 Alexandre Oliva - - * config/mips/mips.h (ENDIAN_SPEC): Output the endianness flag if - the -me[lb] option is given. Don't output the default flag - twice. - -2002-01-31 Zack Weinberg - - * c-lex.c (yyparse): Call debug_hooks->start_source_file for - the primary source file; this has not been done yet. - * c-decl.c (c_expand_body): Reset input_filename from - DECL_SOURCE_FILE (fndecl) before calling init_function_start. - -2002-01-31 Kazu Hirata - - * rtlanal.c (subreg_regno_offset): Do not use - SUBREG_REGNO_OFFSET. - * system.h: Add SUBREG_REGNO_OFFSET to the GCC poison list. - * doc/tm.texi (SUBREG_REGNO_OFFSET): Remove. - -2002-01-31 Joseph S. Myers - - * gccbug.in: Follow GNU Coding Standards for --version. Use GCC - version rather than GNATS version in --version output. - -2002-01-31 Richard Sandiford - - * ifcvt.c (noce_process_if_block): Make a copy of the destination - when copying back from a temporary. - -2002-01-30 Richard Henderson - - * ifcvt.c (dead_or_predicable): Handling merging when other_bb - and new_dest are the same. - -2002-01-30 Richard Henderson - - PR opt/5076 - * rtl.h (NOTE_INSN_LOOP_END_TOP_COND): New. - * rtl.c (note_insn_name): Update. - * emit-rtl.c (remove_unnecessary_notes): Kill it. - * stmt.c (expand_end_loop): Kill jump opt code. Use LOOP_END_TOP_COND - to perform loop rotation. - (expand_exit_loop_top_cond): New. - * tree.h (expand_exit_loop_top_cond): Declare it. - * c-semantics.c (genrtl_while_stmt): Use it. - (genrtl_for_stmt): Likewise. - -2002-01-30 Alexandre Oliva - - * config/mips/mips.h (PARM_BOUNDARY): Guarantee alignment of - arguments to 64-bit boundaries on 64-bit ABIs. - -2002-01-30 Steve Ellcey - - * loop.c (loop_invariant_p): Special case pic_offset_table_rtx. - -2002-01-31 Joseph S. Myers - - * c-decl.c (grokdeclarator): Handle type being a typedef for an - invalid type. - -2002-01-30 David O'Brien - - * config.gcc: Include sparc/biarch64.h rather than sparc/sparc_bi.h. - * config/sparc/sparc_bi.h: Remove file. - * config/sparc/biarch64.h: New file (rename of sparc_bi.h). - -2002-01-30 Richard Henderson - - * sched-deps.c (sched_analyze): Make a call read the frame pointer. - -2002-01-30 Zack Weinberg - - * expmed.c (emit_store_flag): Call protect_from_queue on op0 and op1. - -2002-01-30 Jason Merrill - - * dwarf2out.c (dwarf_cfi_name): Add other DWARF 3 codes. - (output_cfi): Likewise. Disable DW_CFA_GNU_negative_offset_extended. - (reg_save): Use DW_CFA_offset_extended_sf instead. - - * dwarf2out.c (dwarf2out_finish): Don't abort if there were errors. - -2002-01-29 Jakub Jelinek - - * cselib.c (cselib_record_sets): Use IF_THEN_ELSE result - in cselib_lookup. - -2002-01-29 Aldy Hernandez - - * rs6000.md ("*call_value_local32"): Remove constraints. - ("*call_value_local64"): Same. - ("*call_value_indirect_nonlocal_aix32"): Same. - ("*call_value_nonlocal_aix32"): Same. - ("*call_value_indirect_nonlocal_aix64"): Same. - ("*call_value_nonlocal_aix64"): Same. - ("*call_value_nonlocal_sysv"): Same. - -2002-01-29 Richard Henderson - - * config/alpha/elf.h (SDB_DEBUGGING_INFO): Undef. - -2002-01-29 Richard Henderson - - * expr.c (force_operand): Ignore flag_pic for detecting pic - address loads. - * regclass.c (init_reg_sets_1): Test fixed_regs not flag_pic - for determining if PIC_OFFSET_TABLE_REGNUM is call-clobbered. - * resource.c (mark_target_live_regs): Use regs_invalidated_by_call - instead of open-coded loop. - * doc/tm.texi (PIC_OFFSET_TABLE_REGNUM): Clarify that it must - be fixed when in use. - -2002-01-29 Richard Henderson - - * sched-int.h (struct deps_reg): Add uses_length, clobbers_length. - * sched-rgn.c (propagate_deps): Update them. - * sched-deps.c (sched_analyze_insn): Update them. Flush the - clobbers list when either gets too long. - -2002-01-29 Jakub Jelinek - - * config/i386/i386.h (LIMIT_RELOAD_CLASS): Handle LEGACY_REGS - and INDEX_REGS the same as GENERAL_REGS. - (SECONDARY_OUTPUT_RELOAD_CLASS): Likewise. - -2002-01-29 Neil Booth - - * tree.c (build_nonstandard_integer_type): Correct prototype. - -2002-01-29 Ulrich Weigand - - * config/s390/s390.md (movstrsico, movstrdix_64, - movstrsix_31): Remove, replace by ... - (movstrdi_short, movstrsi_short, movstrdi_long, - movstrsi_long): ... these. New. - (movstrdi, movstrsi): Adapt. - - (rotldi3, rotlsi3, ashldi3, *ashldi3_31, *ashldi3_64, - ashlsi3, lshrdi3, *lshrdi3_31, *lshrdi3_64, lshrsi3): - Remove unnecessary CC clobber. - (*ashrdi3_cc_31, *ashrdi3_cconly_31, *ashrdi3_cc_64, - *ashrdi3_cconly_64, *ashrsi3_cc, *ashrsi3_cconly): New. - - (divmoddi4): Don't partially initialize TImode register. - -2002-01-29 Geoffrey Keating - - * doc/sourcebuild.texi (C Tests): Document gcc.dg/debug directory. - -2002-01-29 Richard Henderson - - * flow.c (print_rtl_and_abort): Remove. - (print_rtl_and_abort_fcn): Remove. - (verify_local_live_at_start): Use dump_bb instead. - (verify_wide_reg): Likewise. Take a basic_block, not rtl endpoints. - (verify_wide_reg_1): Return 2 on mode test failure. - -2002-01-29 Neil Booth - - PR c/3325, c/3326, c/2511, c/3347 - * c-decl.c (enum_decl_context): Remove BITFIELD. - (grokdeclarator): Take bitfield width as an input. - Ensure bitfields are given the correct type. Perform - bitfield width validation with build_bitfield_integer_type - rather than waiting for finish_struct. - (grok_typename, grok_typename_in_parm_context, start_decl, - push_parmdecl, grokfield, start_function): Update calls to - grokdeclarator. - (build_bitfield_integer_type): New function. - (finish_struct): Move bitfield validation to grokdeclarator - and build_bitfield_integer_type. - * tree.c (build_nonstandard_integer_type): New function. - * tree.h (build_nonstandard_integer_type): New prototype. -objc: - * objc-act.c (objc_copy_list): Remove DECL_INITIAL kludge. - -2002-01-29 Jakub Jelinek - - PR other/1502: - * cppinit.c (cpp_handle_option): Add ignore argument, if it is zero, - don't ignore unrecognized -W* options. - (cpp_handle_options): Pass 1 as last argument to cpp_handle_option. - * cpplib.h (cpp_handle_option): Adjust prototype. - * c-decl.c (c_decode_options): Pass 0 as last argument to - cpp_handle_option. - - PR c/2896: - * gcc.c (cpp_unique_options): Split from cpp_options. - (cpp_options): Source cpp_unique_options. - (default_compilers): Use cpp_unique_options instead of cpp_options - when used together with cc1_options. - (static_specs): Add cpp_unique_options. - * objc/lang-specs.h: Use cpp_unique_options instead of cpp_options - when used together with cc1_options. - -2002-01-29 Kazu Hirata - - * config/h8300/h8300-protos.h: Update the prototype of - output_a_shift. - * config/h8300/h8300.c (output_a_shift): Remove an unused - argument 'insn'. Remove redundant code. - * config/h8300/h8300.md: Adust to the new prototype of - output_a_shift. - -2002-01-29 Kazu Hirata - - * config/h8300/h8300-protos.h: Update the prototypes of - emit_a_rotate and expand_a_rotate. - * config/h8300/h8300.c (emit_a_rotate): Change the type of the - first argument to 'enum rtx_code'. - (expand_a_rotate): Likewise. - -2002-01-28 Kazu Hirata - - * config/h8300/h8300-protos.h: Update the prototype of - output_simode_bld. - * config/h8300/h8300.c (output_simode_bld): Remove an argumen - 'log2'. - * config/h8300/h8300.md: Adjust to the new prototype. - -2002-01-28 Kazu Hirata - - * conifg/h8300/h8300.c (h8300_adjust_insn_length): Remove - redundant code. - -2002-01-28 John David Anglin - - * emit-rtl.c (gen_rtx_REG): Check that the PIC_OFFSET_TABLE_REGNUM - is a fixed register before returning pic_offset_table_rtx. - * loop.c (scan_loop): Don't hoist insns that set pic_offset_table_rtx - when PIC_OFFSET_TABLE_REG_CALL_CLOBBERED is defined. - -2002-01-28 Jason Merrill - - * dwarf2.h: Sync with src version. - -2002-01-28 Paul Koning - - * builtin-types.def (BT_FN_VOID_CONST_PTR_VAR): Replace - BT_FN_VOID_PTR_VAR. - * builtins.def (BUILT_IN_PREFETCH): Change first argument to be const. - * doc/extend.texi (__builtin_prefetch): Update documentation: - first argument is now const void ptr. - -2002-01-28 Kazu Hirata - - * config/h8300/h8300-protos.h: Remove an unused prototype. - -2002-01-28 Roman Zippel - - * toplev.c (lang_independent_init): Round up identifier size. - -2002-01-28 Richard Earnshaw - - * config.gcc: Revert previous change. - -2002-01-28 Andris Pavenis - - * config/i386/djgpp.h: Use STRIP_NAME_ENCODING in macro UNIQUE_SECTION - -2002-01-28 Richard Earnshaw - - * config.gcc (*-*-netbsdelf*): Set up generic parameters. - (*-*-netbsd*): Always use collect2. Remove collect2 settings from - other non-elf netbsd config frags. - * config/netbsd-aout.h (STARTFILE_SPEC): Don't pull in c++rt0 since - collect2 will does that. - * config/netbsd.h (LIBGCC_SPEC): Add white space before -lgcc, so that - shared-lib frobbing will work. - -2002-01-28 Kazu Hirata - - * config/h8300/h8300.h: Fix formatting. - * config/h8300/h8300.md: Likewise. - -2002-01-28 Loren J. Rittle - - * fixinc/inclhack.def (strict_ansi_not): Add a bypass based on - the old, removed AAA_standards fix. - * fixinc/fixincl.x: Rebuilt. - -2002-01-28 Hans-Peter Nilsson - - * config/cris/cris.h (CRT_CALL_STATIC_FUNCTION): Change to emit - atexit call in crtbegin, hooked in after call to frame_dummy; - register EH before registering __fini__start. - -2002-01-28 Aldy Hernandez - - * config/rs6000/altivec.h: Remove spurious semicolons. - -2002-01-27 Kazu Hirata - - * config/h8300/h8300.md: Replace dead bit extraction patterns - with ones that work. - -Sun Jan 27 13:23:40 2002 Richard Kenner - - * emit-rtl.c (get_mem_attrs): Don't default alignment for non-BLKmode - if not STRICT_ALIGNMENT. - * rtl.h (MEM_ALIGN): Likewise. - -2002-01-27 Craig Rodrigues - - * doc/invoke.texi (-fdump-translation-unit): Revert this - patch: 2001-10-21 Craig Rodrigues - -2002-01-27 Kazu Hirata - - * config/h8300/h8300.md (define_constants): New. - (anonymous patterns) Use defined constants appropriately. - -2002-01-27 Kazu Hirata - - * config/h8300/h8300.c (function_arg): Remove redundant code. - -2002-01-26 Richard Henderson - - * sched-deps.c (reg_pending_uses_head): New. - (reg_pending_barrier): Rename from reg_pending_sets_all. - (find_insn_list): Don't mark inline. - (find_insn_mem_list): Remove. - (add_dependence_list, add_dependence_list_and_free): New. - (flush_pending_lists): Replace only_write param with separate - for_read and for_write parameters. Update all callers. Use - add_dependence_list_and_free. - (sched_analyze_1): Do not add reg dependencies here; just set - the pending bits. Use add_dependence_list. - (sched_analyze_2): Likewise. - (sched_analyze_insn): Replace schedule_barrier_found with - reg_pending_barrier. Add all dependencies for pending reg - uses, sets, and clobbers. - (sched_analyze): Don't add reg dependencies for calls, just - set pending bits. Use regs_invalidated_by_call. Treat - sched_before_next_call as a normal list, not a fake insn. - (init_deps): No funny init for sched_before_next_call. - (free_deps): Free pending mems lists. Don't zero reg_last. - (init_deps_global): Init reg_pending_uses. - (finish_deps_global): Free it. - * sched-int.h (deps): Make in_post_call_group_p boolean. Update docs. - (find_insn_mem_list): Remove. - * sched-rgn.c (concat_INSN_LIST, concat_insn_mem_list): New. - (propagate_deps): Use them. Zero temp mem lists. - -2002-01-26 Richard Henderson - - * Makefile.in (CRTSTUFF_CFLAGS): New. - (crtbegin.o, crtend.o, crtbeginS.o, crtendS.o, crtbeginT.o): Use it. - * config.gcc (alpha-linux, alpha-freebsd, alpha-netbsd): Use plain - crtstuff.c instead of alpha assembly version. - * crtstuff.c (CRT_CALL_STATIC_FUNCTION): Rewrite to assume the - entire dummy function sequence. Use FORCE_CODE_SECTION_ALIGN - not FORCE_{INIT,FINI}_SECTION_ALIGN. - (__do_global_dtors_aux): Mark used. - (frame_dummy, __do_global_ctors_aux): Mark used. - (fini_dummy, init_dummy): Remove. - - * config/alpha/crtbegin.asm: Remove file. - * config/alpha/crtend.asm: Remove file. - * config/alpha/t-crtbe: Remove file. - * config/alpha/elf.h (CRT_CALL_STATIC_FUNCTION): New. - (LINK_EH_SPEC): New. - - * config/cris/cris.h (CRT_CALL_STATIC_FUNCTION): Rewrite old - FORCE_INIT_SECTION_ALIGN hack. Register __fini_start before - calling constructors. - * config/cris/linux.h (CRT_CALL_STATIC_FUNCTION): Undef. - - * config/i386/i386.h (CRT_CALL_STATIC_FUNCTION): New. - * config/i386/linux.h (CRT_CALL_STATIC_FUNCTION): Replace old - CRT_END_INIT_DUMMY hack. - * config/i386/sol2.h (FORCE_CODE_SECTION_ALIGN): Replace - FORCE_{INIT,FINI}_SECTION_ALIGN. - - * config/mcore/mcore-elf.h (FORCE_CODE_SECTION_ALIGN): Replace - FORCE_{INIT,FINI}_SECTION_ALIGN. - - * config/s390/s390.h (CRT_CALL_STATIC_FUNCTION): Update for new - invocation sequence. - * config/sh/sh.h (CRT_CALL_STATIC_FUNCTION): Likewise. - - * doc/tm.texi (CRT_CALL_STATIC_FUNCTION): Update. - (FORCE_CODE_SECTION_ALIGN): New. - -2002-01-26 Richard Henderson - - * config/cris/cris.c (cris_print_operand): Handle 64-bit CONST_INT. - -2002-01-26 Richard Henderson - - * config/alpha/alpha.c (alpha_sa_mask): Mark RA for unicos here too. - (alpha_sa_size): Use alpha_sa_mask to compute size of saved regs. - -2002-01-26 Kazu Hirata - - * config/h8300/h8300.md: Remove bit extraction patterns that - cannot be triggered. - Restrict each bit extraction pattern to a variant on which the - pattern is tested. - -2002-01-26 Joseph S. Myers - - * doc/include/texinfo.tex: Update to version 2002-01-04.07. - -2002-01-26 Kazu Hirata - - * config/h8300/h8300.md: Remove bit test patterns that cannot - be triggered. - Restrict each bit test pattern to a variant on which the - pattern is tested. - -2002-01-26 Kaveh R. Ghazi - - * builtins.c (expand_builtin_strncat): Remove redundant check for - INTEGER_CST. - -2002-01-25 David O'Brien - - * config/i386/x86-64.h (DEFAULT_PCC_STRUCT_RETURN): Do not overide - default setting. - * config/i386/freebsd64.h (DEFAULT_PCC_STRUCT_RETURN): Do not override - existing setting. - -2002-01-25 Geoffrey Keating - - * dbxout.c (dbxout_init): Use assemble_name rather than just - stripping off the first character. - (dbxout_source_file): Likewise. - -2002-01-25 DJ Delorie - - * config/sparc/sparc.c (sparc_emit_set_symbolic_const64): Compare - using rtx_equal_p, not by comparing pointers. - -2002-01-25 Steve Ellcey - - * emit-rtl.c (gen_rtx_REG): Always return the same rtx - for PIC_OFFSET_TABLE_REGNUM. - (init_emit_once): Use gen_raw_REG to initialize pic_offset_table_rtx. - -2002-01-25 David O'Brien - - * config.gcc (x86_64-*-freebsd*): New target. - (x86_64-*-netbsd*,x86_64-*-linux*): Use ${tm_file} rather than its - value. - (i[34567]86-*-freebsd*): Don't include svr4.h. - * config/i386/freebsd64.h: New file. - -2002-01-25 Douglas B Rupp - - * config/alpha/x-vms (version): Make static. - - * config/alpha/vms.h (MD_FALLBACK_FRAME_STATE_FOR): Fix error - in previous checkin. - - * Makefile.in (install-headers-cp): New target. - * config.gcc (alpha-dec-*vms*): Install headers with - install-headers-cp - -Fri Jan 25 22:42:49 CET 2002 Jan Hubicka - - * unroll.c (unroll_loop): Lower final_value to nonmemory operand; - avoid it's copies. - -Fri Jan 25 08:26:19 2002 Richard Kenner - - * builtins.c (expand_builtin_strncpy): Use integer_zerop instead - of compare_tree_int. - (expand_builtin_strncat): Likewise. - * c-decl.c (finish_struct): Use tree_low_cst. - * tree.h (compare_tree_int): Arg is unsigned HOST_WIDE_INT. - * tree.c (compare_tree_int): Likewise. - -2002-01-25 Ulrich Weigand - - * reload1.c (eliminate_regs_in_insn): Recognize frame pointer - adjustments even if they are implemented by more than two insns. - -Fri Jan 25 20:43:56 CET 2002 Jan Hubicka - - * df.c (df_ref_create, df_ref_record_1, df_ref_record): Kill BB arg. - * df.h (struct ref): Kill B. - (DF_REF_BB, DF_REF_BBNO): Use BLOCK_FOR_INSN. - - * basic-block.h (PROP_EQUAL_NOTES): New flag. - * flow.c (propagate_one_insn): Use it. - (mark_used_regs): Handle NIL. - -2002-01-25 Geoffrey Keating - - * config/stormy16/stormy16.md (tablejump_pcrel): Use a MEM - to help folding. - -2002-01-25 David Edelsohn - - * rs6000.md (prefetch): Make address V4SI mode so that the address - is restricted to legitimate form for instruction. - -2002-01-25 Bob Wilson - - * doc/install.texi (xtensa-*-elf): New target. - (xtensa-*-linux*): New target. - * doc/contrib.texi: Add myself. - -2002-01-25 Nick Clifton - - * config/arm/arm.c (arm_hard_regno_mode_ok): Allow any general - purpose register to hold an SImode (or smaller) value. - -2002-01-25 Jakub Jelinek - - * unwind-dw2-fde-glibc.c: If inhibit_libc, use __register_frame* - registry only. - * crtstuff.c: Likewise. - -2002-01-25 Kazu Hirata - - * config/h8300/h8300.md (negation patterns): Tighten - predicates to register_operand. - -2002-01-24 Aldy Hernandez - - * loop.c (emit_prefetch_instructions): Use the prefetch insn's - mode, not Pmode. - - * builtins.c (expand_builtin_prefetch): Same. - -2002-01-24 Alexandre Oliva - - * config/sh/sh.md (sym_label2reg): Make sure all CONSTs have - modes. - -2002-01-24 Kazu Hirata - - * config/h8300/h8300.c (print_operand): Remove support for - operand character 'A'. - * config/h8300/h8300.md (three anonymous patterns): Replace - operand character 'A' with either 'T' or 'S'. - -2002-01-24 Kazu Hirata - - * config/h8300/h8300.c (print_operand): Remove support for - operand character 'U'. - -2002-01-24 Andris Pavenis - - * config/i386/t-djgpp: Use NATIVE_SYSTEM_HEADER_DIR. - -2002-01-24 Nick Clifton - - * config/arm/arm.c (arm_hard_regno_mode_ok): Allow SImode - values to be assigned to the stack pointer. - -2002-01-14 Hartmut Penner - - * emit_rtl.c (gen_lowpart_common): Conversion from const_int - to const_double needs to be done right for big-endian systems. - -2002-01-24 Jason Merrill - - PR c++/2432 - * config/sparc/sparc.md (call-jump peepholes): Pass the right insn - to can_throw_internal. - -2002-01-23 Richard Henderson - - * fold-const.c (fold): Change UINT_MAX test to check vs precision - rather than TYPE_MAX_VALUE. Fix indentation and a bogus negation. - -2002-01-24 Alexandre Oliva - - * config/sh/sh.md (symGOT_load, sym2GOT, sym2GOTOFF): New expands. - (symGOT2reg): Use them, then set as GOT value as unchanging. - (symGOTOFF2reg): Set REG_EQUAL note. Use a different pseudo - as a temporary, if possible. - (symPLT_label2reg): Enclose (pc) in UNSPEC_PIC. Emit - sym@PLT-(.LPCS#+2-.) instead of sym@PLT+.-(.LPCS#+2). - -2002-01-23 Kazu Hirata - - * config/h8300/h8300.md: Fix xorqi and xorqi so that they will - accept to accept 0x80 as operands[2]. - -2002-01-24 Alexandre Oliva - - * config/sparc/sparc.md (fix_trunctfdi2): Correct typo in mode. - -2002-01-23 Richard Henderson - - * config/alpha/alpha.md (call_value_osf_1_er peepholes): Fix typo. - -2002-01-23 Aldy Hernandez - - * c-parse.in (parmlist_or_identifiers): Add maybe_attribute. - (parmlist_or_identifiers_1): Verify that only a parmlist follows - an attribute. - -2002-01-23 Richard Henderson - - * expr.c (move_by_pieces_1): Extend size before negation. - - * config/m68k/t-m68kbare (MULTILIB_OPTIONS): Add 68040 and 68060. - (MULTILIB_MATCHES): Remove 68040 and 68060 aliases. - (MULTILIB_EXCEPTIONS): Ignore 68881 and soft-float for 68040 and 68060. - * config/m68k/t-m68kelf: Likewise. - -2002-01-23 Bob Wilson - - * config/xtensa/elf.h: New file. - * config/xtensa/lib1funcs.asm: New file. - * config/xtensa/lib2funcs.S: New file. - * config/xtensa/linux.h: New file. - * config/xtensa/t-xtensa: New file. - * config/xtensa/xtensa-config.h: New file. - * config/xtensa/xtensa-protos.h: New file. - * config/xtensa/xtensa.c: New file. - * config/xtensa/xtensa.h: New file. - * config/xtensa/xtensa.md: New file. - * config.gcc (xtensa-*-elf*): New target. - (xtensa-*-linux*): New target. - * cse.c (canon_hash): Compare rtx pointers instead of register - numbers. This is required for the Xtensa port. - * integrate.c (copy_insn_list): Handle case where the static - chain is in memory and the memory address has to be copied to - a register. - * doc/invoke.texi (Option Summary): Add Xtensa options. - (Xtensa Options): New node. - * doc/md.texi (Machine Constraints): Add Xtensa machine constraints. - -2002-01-23 Zack Weinberg - - * diagnostic.c (internal_error): Do ICE suppression only - when ENABLE_CHECKING is not defined. - - * c-typeck.c (require_complete_type): Return error_mark_node - if type is error_mark_node. - -2002-01-23 Janis Johnson - - * toplev.c (process_options): Disable -fprefetch-loop-arrays with - -Os and issue a warning. - -2002-01-23 Zack Weinberg - - * doc/fragments.texi, doc/hostconfig.texi: Update to reflect - current (lack of) need for host configuration by hand. - - * doc/gccint.texi, doc/rtl.texi, doc/tm.texi: Adjust cross - references. Documentation of some target macros moved from - hostconfig.texi to tm.texi. - -2002-01-23 Will Cohen - - * config/arm/arm.h (THUMB_FUNCTION_PROFILER): Define if not currently - defined. - -2002-01-23 Kazu Hirata - - * config/h8300/h8300.md (*andorhi3): Accept 0x8000 as an - operand[3]. - -2002-01-23 Jason Merrill - - * tree.c (build1): Don't set TREE_READONLY on INDIRECT_REF. - - * function.c (assign_parms): Don't put args of inline functions - into registers when not optimizing. - -2002-01-23 Nick Clifton - - * config/arm/arm.md (UNSPEC_PROLOGUE_USE): New unspec constant. - (prologue_use): New pattern. - * config/arm/arm.c (expand_prologue): Use gen_prologue_use in - preference to gen_rtx_USE. - (thumb_expand_prologue): Use gen_prologue_use in preference to - gen_rtx_USE. - (thumb_expand_epilogue): Use gen_prologue_use in preference to - gen_rtx_USE. - -2002-01-23 Hans-Peter Nilsson - - * loop.c [!HAVE_prefetch] (CODE_FOR_prefetch): Define to 0. - -2002-01-23 Neil Booth - - PR c/3504 - * doc/extend.texi: Correct documentation of __alignof__. - -2002-01-22 Zack Weinberg - - * params.h: Rename arguments of DEFPARAM so that it will be - recognized as a translation keyword. - -2002-01-22 Aldy Hernandez - - * extend.texi: Document altivec functions. - Fix N-bit adjectives in X86 builtin documentation. - -2002-01-22 Alexandre Oliva - - * reload.c (reg_overlap_mentioned_for_reload_p): Handle PLUS and - auto_inc_dec values. - -2002-01-22 Richard Earnshaw - - * config/netbsd-aout.h (SWITCH_TAKES_ARG): Remove bogus white space - after backslash. - (ASM_DECLARE_OBJECT_NAME): Add missing backslash before final line. - -2002-01-22 Alexandre Oliva - - * config/i386/freebsd-aout.h (ASM_QUAD): Undefine. - -2002-01-22 Richard Henderson - - * config/alpha/alpha.c (split_small_symbolic_mem_operand): Use - copy_insn not copy_rtx. - -2002-01-23 Alan Modra - - * combine.c (simplify_and_const_int): Don't trunc_int_for_mode - "nonzero" as that might add "1" bits. Ensure "constop" is - properly sign extened. - (force_to_mode): Tweak for sign extended constop. - -2002-01-22 Richard Henderson - - * config/alpha/alpha.c (some_small_symbolic_mem_operand) Use - for_each_rtx instead of assuming we're already looking at the MEM. - (split_small_symbolic_mem_operand): Likewise. - * config/alpha/alpha.h (PREDICATE_CODES): Update. - * config/alpha/alpha.md (small symbolic memory splitters): Update. - -2002-01-22 Richard Henderson - - * config/alpha/alpha.md (divmodsi_internal_er): Generate lituse - sequence number for the literal. - (divmoddi_internal_er): Likewise. - -2002-01-22 Craig Rodrigues - - PR java/4972 - * aclocal.m4 (AM_ICONV): Put linking flags for libiconv - in LIBICONV variable. - * configure: Regenerated. - -2002-01-22 Krister Walfridsson - - * dependence.c (build_def_use): Remove array_idx. - - * dwarfout.c (last_filename): Remove. - (output_compile_unit_die): Remove last_filename. - -2002-01-22 Roger Sayle - Richard Henderson - - PR opt/3640 - * fold-const.c (fold): Optimize unsigned comparisons against - UINT_MAX (and similar unsigned constants). - -2002-01-22 Janis Johnson - - * Makefile.in (loop.o): Depend on OPTABS_H. - * loop.c (emit_prefetch_instructions): Check the prefetch operand - against the predicate. - - PR target/5379 - * config/i386/i386.md (prefetch_sse): Specify "p" as a constraint - for the address operand. - -2002-01-22 Richard Henderson - - * config/alpha/freebsd.h (FUNCTION_PROFILER): Remove. - -2002-01-22 Craig Rodrigues - - PR other/5450 - * config/i386/sysv4.h (CPP_SPEC): Define, and add CPU - preprocessor flags. - -2002-01-22 Jason Thorpe - - * config.gcc (x86_64-*-netbsd*): New target. - * config/i386/netbsd64.h: New file. - -2002-01-22 Aldy Hernandez - - * regrename.c (kill_value): Fix typo. - -2002-01-22 Aldy Hernandez - - * doc/tm.texi: Remove STARTING_FRAME_PHASE. - - * config/rs6000/rs6000.h: Same. - - * function.c (instantiate_virtual_regs): Remove - STARTING_FRAME_PHASE. - (assign_stack_local_1): Same. - Calculate frame phase. - -2002-01-22 Nick Clifton - - * config/arm/arm.h (CONDITIONAL_REGISTER_USAGE): Move 'regno' - variable declaration to outer scope in order to simplify - future extensions. - (HARD_REGNO_MODE_OK): Replace macro body with a with a call to - arm_hard_regno_mode_ok. - * config/arm/arm-protos.h: Add a prototype for - arm_hard_regno_mode_ok. - * config/arm/arm.c (soft_df_operand): Remove now redundant - check for DImode values using IP_REGNUM. - (nonimmediate_soft_df_operand): Remove now redundant check for - DImode values using IP_REGNUM. - (arm_hard_regno_mode_ok): New function. New check: make sure - that DImode values are not stored in IP_REGNUM. - - * config/arm/arm.c (arm_expand_prologue): Replace REG_MAYBE_DEAD - note with a USE. - (thumb_expand_prologue): Replace REG_MAYBE_DEAD note with a USE. - -2002-01-22 Jason Merrill - - * c-semantics.c (genrtl_compound_stmt): Only check nesting - consistency if this COMPOUND_STMT is scoped. - -2002-01-22 Kazu Hirata - - * predict.c: Fix formatting. - * print-tree.c: Likewise. - * protoize.c: Likewise. - * real.h: Likewise. - * rtl.h: Likewise. - * sbitmap.h: Likewise. - * scan.c: Likewise. - * sched-deps.c: Likewise. - * sched-vis.c: Likewise. - * sdbout.c: Likewise. - * sibcall.c: Likewise. - * ssa.c: Likewise. - * ssa-ccp.c: Likewise. - * ssa-dce.c: Likewise. - * stmt.c: Likewise. - * stor-layout.c: Likewise. - * system.h: Likewise. - -Tue Jan 22 06:26:33 2002 Richard Kenner - - * tree.c (int_fits_type_p): If bounds of a subtype are variable, see - if fits in bounds of base type. - - * dwarf2out.c (equate_decl_number_to_die): Add "int" to decls. - (loc_descriptor_from_tree, case CALL_EXPR, case ADDR_EXPR): New. - (add_bound_info, default): If can't find a context, make a - SAVE_EXPR. - (dwarf2out_finish): Check for SAVE_EXPR in node->created_for. - -2002-01-22 Hans-Peter Nilsson - - * c-typeck.c (parser_build_binary_op): If result from - build_binary_op is ERROR_MARK just return error_mark_node without - further processing. - -2002-01-21 Jason Thorpe - - * config/netbsd.h (TARGET_HAS_F_SETLKW): define. - Split a.out-specific bits into... - * config/netbsd-aout.h: ...this. - * config/netbsd-elf.h: New file. - * config/alpha/netbsd-elf.h: Remove. - * config/alpha/netbsd.h: Rewrite for a NetBSD/alpha ELF target. - * config/i386/netbsd-elf.h (LIB_SPEC): Remove. - (STARTFILE_SPEC): Remove redundant definition. - (ENDFILE_SPEC): Likewise. - (LINK_SPEC): Likewise. - (CPP_SPEC): Likewise. - (ASM_SPEC): Likewise. - (LIB_SPEC): Likewise. - (SWITCH_TAKES_ARG): Likewise. - (TARGET_MEM_FUNCTIONS): Likewise. - (CPP_PREDEFINES): Redefine. - (ASM_FINAL_SPEC): Remove redefinition. - (ASM_COMMENT_START): Redefine. - (FUNCTION_PROFILER): Define. - (TARGET_VERSION): Redefine. - Comment and formatting cleanup. - * config/i386/netbsd.h: Include . - * config/m68k/netbsd.h: Include . - * config/mips/netbsd.h: Rewrite for NetBSD/mips ELF target, - big- or little-endian. - * config/ns32k/netbsd.h: Include . - * config.gcc (*-*-netbsd*): Add definitions common to all - NetBSD configs. - (alpha*-*-netbsd*): Remove redundant xm_defines, gas, and - gnu_ld definitions. Add netbsd-elf.h to and remove - alpha/netbsd-elf.h from tm_file. Remove alpha/t-crtfm from - tmake_file, and don't lose previous tmake_file contents. - (arm*-*-netbsd*): Add netbsd-aout.h to tm_file. - (i[34567]86-*-netbsdelf*): Remove redundant xm_defines, gas, and - gnu_ld definitions. Add netbsd-elf.h to tm_file. - (mips-dec-netbsd*): Remove as alias for mipsel-*-netbsd*. - (mipsel-*-netbsd*): Rename this to... - (mips*-*-netbsd*): ...this. Add elfos.h to tm_file. Add - mips/little.h to tm_file for mips*el-*. - (powerpc-*-netbsd*): Remove redundant xm_defines definition. - (sparc-*-netbsd*): Add netbsd-aout.h to tm_file. - (vax-*-netbsd*): Add netbsd-aout.h to tm_file. - -2002-01-21 John David Anglin - - * pa-protos.h (reg_before_reload_operand): New function prototype. - * pa.c (reg_before_reload_operand): New function implementation. - * pa.md (decrement_and_branch_until_zero, movb): Use it. Change "!*m" - contraints to "*m". - -2002-01-21 Franz Sirl - - * combine.c (simplify_and_const_int): Properly sign-extend CONSTOP. - -2002-01-21 John David Anglin - - * pa64-hpux.h (MD_EXEC_PREFIX): Set to "/usr/ccs/bin". - (MD_STARTFILE_PREFIX): Set to "/usr/ccs/lib/pa20_64/". - (MD_STARTFILE_PREFIX_1): Set to "/opt/langtools/lib/pa20_64/". - (EH_FRAME_IN_DATA_SECTION): Define and update comment on init sections. - (ENDFILE_SPEC): Undefine. - (STARTFILE_SPEC): Redefine for PA. - -2002-01-21 Franz Sirl - - * config/rs6000/t-ppccomm (CRTSTUFF_T_CFLAGS_S): Re-add -fPIC. - -2002-01-21 Daniel Jacobowitz - - * config.gcc: Add entries to supported PowerPC --with-cpu - types. - -2002-01-21 Jakub Jelinek - - * config/i386/i386.c (ix86_function_arg_regno_p): Never return - true for 64-bit mode only SSE registers in 32-bit mode. - -2002-01-21 Kazu Hirata - - * unwind-dw2.c: Fix formatting. - * unwind-dw2-fde.c: Likewise. - * unwind-dw2-fde.h: Likewise. - * unwind-pe.h: Likewise. - * varasm.c: Likewise. - * varray.h: Likewise. - -2002-01-21 Hans-Peter Nilsson - - Remove workaround for register stack overwrite bug in mmix. - * config/mmix/mmix.c (mmix_target_asm_function_prologue): Remove - support for TARGET_REG_STACK_FILL_BUG. - * config/mmix/mmix.h: Remove member has_call_without_parameters. - (TARGET_MASK_REG_STACK_FILL_BUG, TARGET_REG_STACK_FILL_BUG): - Delete. - (TARGET_DEFAULT): Remove TARGET_MASK_REG_STACK_FILL_BUG. - (TARGET_SWITCHES): Remove -mreg-stack-fill-bug-workaround and - -mno-reg-stack-fill-bug-workaround. - * config/mmix/mmix.md ("call", "call_value"): Don't set struct - machine member has_call_without_parameters. - * doc/invoke.texi (Option Summary) : Remove - -mreg-stack-fill-bug-workaround and - -mno-reg-stack-fill-bug-workaround. - (MMIX Options): Ditto. - -2002-01-21 Kazu Hirata - - * config/h8300/h8300.c (function_arg): Replace 0 with NULL_RTX - as appropriate. - Remove redundant code. - -2002-01-21 Joseph S. Myers - - * config/alpha/alpha.h, config/arc/arc.h, config/avr/avr.h, - config/c4x/c4x.h, config/d30v/d30v.h, config/dsp16xx/dsp16xx.h, - config/fr30/fr30.h, config/ia64/ia64.h, config/m68hc11/m68hc11.h, - config/mips/mips.h, config/rs6000/rs6000.h, config/sparc/sparc.h, - config/stormy16/stormy16.h, config/v850/v850.h: Remove commented - out target macro definitions and non-target-specific comments - mostly taken from old versions of the manual. - -2002-01-20 Kazu Hirata - - * config/h8300/h8300.h: Fix comment formatting. - * config/ia64/aix.h: Likewise. - * config/ia64/ia64-protos.h: Likewise. - * config/ia64/ia64.c: Likewise. - * config/ia64/ia64.h: Likewise. - * config/ia64/ia64intrin.h: Likewise. - * config/ia64/linux.h: Likewise. - * config/ia64/unwind-aix.c: Likewise. - * config/ia64/unwind-ia64.c: Likewise. - -2002-01-20 Kazu Hirata - - * config/h8300/h8300.c: Revise comments about shift code. - -2002-01-20 Kazu Hirata - - * config/h8300/h8300.c (function_arg): Update a comment. - -2002-01-20 Kazu Hirata - - * config/h8300/h8300.md: Update the comments at the beginning - of the file. - -2002-01-20 Kazu Hirata - - * config/i370/i370.c: Fix comment formatting. - * config/i370/i370.h: Likewise. - * config/i370/i370.md: Likewise. - * config/i370/linux.h: Likewise. - -Sun Jan 20 18:40:14 2002 Richard Kenner - - * reg-stack.c (subst_stack_regs): Properly check for deleted insn. - - * dwarf2out.c (loc_descriptor_from_tree): Add TRUTH_*_EXPR cases. - (gen_struct_or_union_type_die): Don't SIGSEGV if no TYPE_STUB_DECL - in incomplete case. - -2002-01-20 Graham Stott - - * cfgloop.c (flow_loop_preheader_scan): Fix typo. - -2002-01-19 John David Anglin - - * config.gcc (hppa*64*-*-hpux11*): Fix tmake_file. - -2002-01-19 Tom Rix - - * config/rs6000/rs6000.md: Fix DF split for 64 bit hosts. - -2002-01-18 Aldy Hernandez - - * doc/tm.texi (STARTING_FRAME_PHASE): Document. - - * function.c (assign_stack_local_1): Adjust x_frame_offset with - STARTING_FRAME_PHASE. - (STARTING_FRAME_PHASE): New. - (instantiate_virtual_regs): Check saneness of - STARTING_FRAME_PHASE. - - * config/rs6000/rs6000.h (STARTING_FRAME_PHASE): New. - -2002-01-19 Alexandre Oliva - - * config/sh/sh.md (movdf_i4 split): Fix alter_subreg calls. - -2002-01-18 Craig Rodrigues - - * doc/install.texi (hppa*-hp-hpux11): Clarify that GCC 2.95.x cannot - be used for bootstrapping GCC 3.0. - -2002-01-18 Kazu Hirata - - * config/h8300/h8300.md: Fix an insn length. - -2002-01-18 Kazu Hirata - - * bitmap.h: Fix comment formatting. - * combine.c: Likewise. - * cppfiles.c: Likewise. - * c-pragma.h: Likewise. - * c-typeck.c: Likewise. - * df.c: Likewise. - * dwarf2out.c: Likewise. - * function.c: Likewise. - * gcc.c: Likewise. - * genattrtab.c: Likewise. - * gthr-win32.h: Likewise. - * haifa-sched.c: Likewise. - * predict.c: Likewise. - * rtlanal.c: Likewise. - * rtl.h: Likewise. - * unwind-dw2-fde.h: Likewise. - * unwind-pe.h: Likewise. - * vmsdbgout.c: Likewise. - -Thu Jan 17 15:28:26 2002 Richard Kenner - - * attribs.c (decl_attributes): Clear ATTR_FLAG_TYPE_IN_PLACE - if type_required and passed decl. - -2002-01-17 Aldy Hernandez - - * config.gcc (cpu_type): Include altivec.h in powerpc - extra_headers. - Same for darwin. - - * config/rs6000/altivec.h: New. - -2002-01-17 David Edelsohn - - * doc/install.texi (*-ibm-aix*): Update assembler and exception - handling information. - * doc/trouble.texi (Interoperation): Add libstdc++ information - for AIX. - (Misunderstandings): Add template instantiation and static template - member information for AIX. - -2002-01-17 Jason Merrill - - * dbxout.c (dbxout_type): Support const and volatile. - - * except.c (add_partial_entry): Remove backwards compatibility code. - (end_protect_partials): Likewise. - -2002-01-17 Jakub Jelinek - - * config/ia64/ia64.md (prologue_use): New. - * config/ia64/ia64.c (ia64_expand_prologue): Use - gen_prologue_use instead of gen_rtx_USE. - (group_barrier_needed_p): Handle CODE_FOR_prologue_use the same way - as CODE_FOR_pred_rel_mutex. - (ia64_sched_reorder2): Likewise. - -2002-01-16 Eric Christopher - - * config/mips/r3900.h: Reformat. - (SUBTARGET_CPP_SIZE_SPEC): Remove. - * config/mips/isa3264.h (SUBTARGET_CPP_SIZE_SPEC): Ditto. - * config/mips/mips.h (ABI_GAS_ASM_SPEC): Default to "". - (SUBTARGET_CPP_SIZE_SPEC): Rewrite. - * config/mips/t-elf: Remove mips3 multilib. - -2002-01-16 H.J. Lu - - * config/mips/linux.h: Include "mips/abi64.h". - -2002-01-16 H.J. Lu - - * config/mips/t-linux: New. - - * config.gcc: Add mips/t-linux to tmake_file for mips*-*-linux*. - - * config/mips/linux.h: Don't include "gofast.h". - (INIT_SUBTARGET_OPTABS): Removed. - -2002-01-16 Kazu Hirata - - * config/h8300/h8300-protos.h: Replace emit_a_shift with - output_a_shift. - * config/h8300/h8300.c: Likewise. - * config/h8300/h8300.md: Likewise. - -2002-01-16 Kazu Hirata - - * config/h8300/h8300.md (pushqi1_h8300): Use a tab instead of - spaces after an opcode name. - (pushqi1_h8300hs): Likewise. - (pushhi1_h8300hs): Likewise. - -2002-01-16 Kazu Hirata - - * doc/extend.texi: Replace "option" with "attribute" - appropriately. - -2002-01-16 Jakub Jelinek - - * config/alpha/alpha.c (some_small_symbolic_mem_operand): Look into - (and:DI () (const_int -8)). - (split_small_symbolic_mem_operand): Split - (mem (and:DI () (const_int -8)). - -2002-01-16 Jakub Jelinek - - PR target/5309: - * config/sparc/sparc.c (ultrasparc_adjust_cost): Handle TYPE_IDIV the - same way as TYPE_IMUL. - (ultrasparc_sched_reorder): Likewise. - * config/sparc/sparc.md (type): Add comment to update - ultrasparc_sched_reorder when making changes. - -2002-01-16 Kazu Hirata - - * doc/invoke.texi: Change the dump file name of block - reordering pass from 28.bbro to 29.bbro. - Mention -dk option. - -Wed Jan 16 17:54:22 CET 2002 Jan Hubicka - - * i386.md (minsf splitter): Fix pasto. - -2002-01-16 Nick Clifton - - * config/arm/arm.c (arm_expand_prologue): Add REG_MAYBE_DEAD note - to frame pointer initialisation instruction. - (thumb_expand_prologue): Add REG_MAYBE_DEAD note to frame pointer - initialisation instruction. - (soft_df_operand): Do not accept the IP register. - (nonimmediate_soft_df_operand): Do not accept the IP register. - -2002-01-16 Jakub Jelinek - - PR target/5357: - * config/sparc/sparc.c (sparc_override_options): Avoid MASK_V9 and - MASK_V8 being both set. - -2002-01-16 Ulrich Weigand - - * config/s390/s390.c (s390_emit_prologue): Do not emit USE - insn for GOT register; add REG_MAYBE_DEAD notes instead. - config/s390/s390.md (call, call_value): Add GOT register to - CALL_INSN_FUNCTION_USAGE where needed. - (call_exp, call_value_exp): New. - -2002-01-16 Nick Clifton - - * config/arm/arm.c: General formatting tidy up. - -2002-01-16 Graham Stott - - * calls.c (try_to_integrate): Use "(size_t)" intermediate - cast and when casting an integer literal to "rtx" pointer. - (expand_call): Likewise. - * flow.c (try_pre_increment): Likewise. - (find_use_as_address): Likewise. - * integrate.c (expand_iline_function): Likewise. - * regmove.c (try_auto_increment): Likewise. - -2002-01-16 Graham Stott - - * sched-rgn.c (passed): Use sbitmap_free. - (header): Likewise. - (inner): Likewise. - (in_queue): Likewise. - (in_stack): Likewise. - -2002-01-15 Eric Christopher - - * flow.c (propagate_one_insn): Change to use fatal_insn. - -2002-01-15 Kazu Hirata - - * expmed.c (extract_fixed_bit_field): Remove unused code. - * system.h: Poison SLOW_ZERO_EXTEND. - * doc/tm.texi: Remove. - * config/1750a/1750a.h (SLOW_ZERO_EXTEND): Remove. - * config/arm/arm.h: Likewise. - * config/avr/avr.h: Likewise. - * config/clipper/clipper.h: Likewise. - * config/convex/convex.h: Likewise. - * config/d30v/d30v.h: Likewise. - * config/dsp16xx/dsp16xx.h: Likewise. - * config/elxsi/elxsi.h: Likewise. - * config/fr30/fr30.h: Likewise. - * config/h8300/h8300.h: Likewise. - * config/i370/i370.h: Likewise. - * config/i386/i386.h: Likewise. - * config/m68k/m68k.h: Likewise. - * config/mips/mips.h: Likewise. - * config/ns32k/ns32k.h: Likewise. - * config/pdp11/pdp11.h: Likewise. - * config/pj/pj.h: Likewise. - * config/s390/s390.h: Likewise. - * config/sh/sh.h: Likewise. - * config/stormy16/stormy16.h: Likewise. - * config/v850/v850.h: Likewise. - * config/vax/vax.h: Likewise. - * config/we32k/we32k.h: Likewise. - -2002-01-15 Aldy Hernandez - - * config/rs6000/rs6000.md (altivec_stvx): Add parallels to stvx. - (altivec_lvsl): Change constraint to b. - (altivec_lvsr): Same. - (altivec_lvebx): Same. - (altivec_lvehx): Same. - (altivec_lvewx): Same. - (altivec_lvxl): Same. - (altivec_lvx): Same. - (altivec_stvx): Add parallel. - (altivec_stvxl): Same. - (altivec_stvehx): Same. - (altivec_stvebx): Same. - (altivec_stvebx): Same. - -2002-01-15 Aldy Hernandez - - * config.gcc: Change altivec.h to altivec-defs.h. - - * config/rs6000/altivec.h: Delete. - - * config/rs6000/altivec-defs.h: Add. - -2002-01-15 John David Anglin - - * vax.c (vax_rtx_cost): Return MAX_COST for unsupported MULT, UDIV - and UMOD modes. - - * vax.h (INDEX_TERM_P): Restrict indexing to modes which have a size - less than or equal to eight bytes. - - * vax.md (andsi3): Remove constraints and change SET destination - operand type to nonimmediate_operand. - (andhi3, andqi3): Likewise. Don't clear high order bits of operand 1 - when it is a CONST_INT. - -2002-01-15 Jason Merrill - - * c-common.def (FILE_STMT): New code. - * c-common.c (statement_code_p): It's a statement. - * c-common.h (stmt_tree_s): Add x_last_filename. - (FILE_STMT_FILENAME_NODE, FILE_STMT_FILENAME): New macros. - (last_expr_filename): New macro. - * c-semantics.c (begin_stmt_tree): Initialize it. - (add_stmt): If the filename changed, also insert a - FILE_STMT. - (expand_stmt): Handle seeing one. - -2002-01-15 Eric Christopher - - * flow.c (propagate_one_insn): Add error message and print out - insn for debugging. - -2002-01-15 Joseph S. Myers - - * system.h (ASM_IDENTIFY_GCC, STDC_VALUE, TRAMPOLINE_ALIGN, - ASM_IDENTIFY_GCC_AFTER_SOURCE): Poison. - * config/pdp11/pdp11.h (TRAMPOLINE_ALIGN): Rename to - TRAMPOLINE_ALIGNMENT. - * config/arm/arm.h, config/mcore/mcore.h: Likewise. Change value - to be in bits. - * config/i386/cygwin.h (PCC_BITFIELDS_TYPE_MATTERS): Rename to - PCC_BITFIELD_TYPE_MATTERS. - * config/interix.h (STDC_VALUE): Remove. Use - STDC_0_IN_SYSTEM_HEADERS. - * config/darwin.h (ASM_IDENTIFY_GCC), config/dsp16xx/dsp16xx.h - (ASM_IDENTIFY_GCC), config/stormy16/stormy16.h (ASM_IDENTIFY_GCC, - ASM_IDENTIFY_GCC_AFTER_SOURCE): Remove. - -2002-01-15 Craig Rodrigues - - * doc/install.texi (hppa*-hp-hpux11): --enable-threads does - not work on this platform currently. - -2002-01-15 Joseph S. Myers - - * c-typeck.c (build_unary_op): Don't wrap msgid argument of - readonly_warning in _(). - -2002-01-15 Douglas B Rupp - - * gcc.c (delete_if_ordinary): Backout previous change. - -2002-01-15 Kazu Hirata - - * config/h8300/h8300.c (print_operand): Remove support for - unused operand characters. - - * read-rtl.c: Fix formatting. - * real.c: Likewise. - * recog.c: Likewise. - * regclass.c: Likewise. - * regmove.c: Likewise. - * reg-stack.c: Likewise. - * reload1.c: Likewise. - * rtlanal.c: Likewise. - -2002-01-15 Kazu Hirata - - * config/i386/i386.c: Fix formatting. - -2002-01-15 Jakub Jelinek - - * c-typeck.c (process_init_element): Don't save_expr - COMPOUND_LITERAL_EXPR if just its initializer will be used. - -2002-01-15 David Edelsohn - - * config/rs6000/rs6000.c (rs6000_output_function_epilogue): Do not - emit optional traceback table if optimize_size or TARGET_ELF. - * config/rs6000/rs6000.md (prefetch): New. - -2002-01-15 Andreas Jaeger - - * config.gcc (x86_64-*-*): Install mmintrin.h and xmmintrin.h. - -2002-01-15 Kazu Hirata - - * mips-tfile.c: Fix formatting. - -Tue Jan 15 00:56:11 CET 2002 Jan Hubicka - - * unroll.c (final_reg_note_copy): Fix previous commit. - -2002-01-14 Kazu Hirata - - * config/h8300/h8300-protos.h: Remove the prototype for - eq_operator. - * config/h8300/h8300.c (eq_operator): Remove. - -2002-01-14 Richard Henderson - - * config/i386/i386.md (prefetch): Tidy. - (prefetch_3dnow): Fix locality operand. - -2002-01-14 Richard Henderson - - * config/mips/mips.h (HI_AND_FP_REGS): New register class. - (CLASS_CANNOT_CHANGE_MODE): Disallow HI in little-endian mode. - -2002-01-14 Hans-Peter Nilsson - - * reload1.c (reload_combine): Pass reg_sum replacement through - copy_rtx in loop performing multiple changes. - -2002-01-14 Jakub Jelinek - - * except.c (remove_unreachable_regions): New. - (free_eh_status): Clear exception_handler_labels. - (convert_from_eh_region_ranges): Call remove_unreachable_regions. - (find_exception_handler_labels): Don't add the same label more than - once. - (remove_exception_handler_label): Don't die if - find_exception_handler_labels hasn't been called for the current - function yet. - -Mon Jan 14 21:26:13 CET 2002 Jan Hubicka - - * toplev.c (rest_of_compilation): Rebuild jump labels after - gcse. - -2002-01-14 Joseph S. Myers - - * doc/extend.texi: Move documentation of X86 built-in functions - here. - * doc/invoke.texi: From here. - * doc/sourcebuild.texi: Document location of documentation for - machine built-in functions. - -2002-01-13 Christopher Faylor - - * cppfiles.c (TEST_THRESHOLD): New macro. - (SHOULD_MMAP): Ditto. - (read_include_file): Use SHOULD_MMAP macro to decide when mmap should - be used. - -Mon Jan 14 20:23:34 CET 2002 Jan Hubicka - - * unroll.c (final_reg_note_copy): Properly handle - REG_LABEL - (unroll_loops): Fix LOOP_CONDITION heuristics. - -2002-01-14 Geoffrey Keating - - * doc/invoke.texi (Xstormy16 Options): Add xstormy16 option. - * doc/md.texi (Machine Constraints): Use @minus{} where appropriate. - -Mon Jan 14 20:18:19 CET 2002 Jan Hubicka - - * cfgcleanup.c (try_forward_edges): Avoid infinite loop at infinite - threaded loop. - -2002-01-14 Tom Rix - - * config/rs6000/rs6000.md: Fix typo with sradi. - -2002-01-14 Ulrich Weigand - - * config/s390/s390.md (movstrdix_64, movstrsix_31, movstrdi_64, - movstrsi_31, clrstrsi_64, clrstrsi_31): Improve RTL templates. - (clrstrdi, clrstrsi): Adapt callers. - - (extendsidi2, zero_extendsidi2): Remove no-conflict blocks. - - (movti splitter): Never use register 0 as base register. - -2002-01-14 Hartmut Penner - - * combine.c (simplify_shift_const): Always generate new rtx - for shift expression instead of reusing given expression. - -Mon Jan 14 07:08:55 2002 Richard Kenner - - * config/alpha/alpha.c (alpha_expand_mov): Don't call - alpha_legitimize_address unless mode is Pmode. - -2002-01-13 Geoffrey Keating - - * doc/md.texi (Modifiers): Document the '*' constraint for the - user. - - * doc/md.texi (Machine Constraints): Add constraints for xstormy16. - * doc/extend.texi (Function Attributes): 'interrupt' is valid - for xstormy16 too. - -2002-01-13 Richard Henderson - - * reload.c (find_reloads): Use a hard reg destination as reload reg - for an input reload of the source. - -2002-01-13 Gerald Pfeifer - - * doc/install.texi (Binaries): Make link to ftp.writtenword.com - more generic. - -Sun Jan 13 07:23:01 2002 Douglas B Rupp - - * Makefile.in (LIB2FUNCS): Split into LIB2FUNCS_1 and LIB2FUNCS_2. - * mklibgcc.in (LIB2FUNCS): Split into LIB2FUNCS_1 and LIB2FUNCS_2. - - * config/alpha/x-vms (USE_COLLECT2): Set to empty. - -Sun Jan 13 06:55:31 2002 Richard Kenner - - * dwarf2out.c (mem_loc_descriptor, case ADDRESSOF): New case. - -2002-01-12 Tom Rix - - * config/rs6000/rs6000.c (rs6000_emit_set_long_const): Use ior for - TARGET_POWERPC64. - -2002-01-12 Richard Henderson - - * config/i386/i386.c (bdesc_2arg): Mark psadbw MASK_3DNOW_A. - - * doc/invoke.texi: Update Alpha options. - - * doc/invoke.texi: Update i386 built-in function lists. - -Sat Jan 12 17:38:11 CET 2002 Jan Hubicka - - * unroll.c (final_reg_note_copy): Avoid crash on REG_LABEL note - referencing outside. - -Sat Jan 12 08:54:51 2002 Richard Kenner - - * diagnostic.c (warn_deprecated_use): Rework to lower indentation. - * expr.c (emit_move_insn_1): Remove warning, use HOST_WIDE_INT for - offsets, and change line folding. - * optabs.c (expand_binop): Remove warnings. - * sdbout.c (sdbout_record_type_name): Constify NAME to avoid warning. - -2002-01-12 Graham Stott - - * attribs.c (handle_deprecated_attribute): constify WHAT. - * diagnostic.c (warn_deprecated_use): Add braces, fixes - dangling else warning and constify WHAT. - * except.h (struct function, struct inline_remap): Move - struct tag forward defs before all prototypes. - (duplicate_eh_regions): Whitespace. - -2002-01-12 Nick Clifton - - * config/arm/arm.h (ARM_LEGITIMIZE_RELOAD_ADDRESS): Use - MODE_BASE_REG_CLASS. - (THUMB_LEGITIMIZE_RELOAD_ADDRESS): Use MODE_BASE_REG_CLASS. - -2002-01-12 Richard Henderson - - * config/i386/i386.c (override_options): If SSE, enable sse prefetch. - (ix86_expand_vector_move): New. - (bdesc_2arg): Remove andps, andnps, orps, xorps. - (ix86_init_mmx_sse_builtins): Make static. Remove composite builtins. - Remove old prefetch builtins. Special case the logicals removed above. - (ix86_expand_builtin): Likewise. - (safe_vector_operand): Use V4SFmode, not TImode. - (ix86_expand_store_builtin): Remove shuffle arg. Update callers. - (ix86_expand_timode_binop_builtin): New. - * config/i386/i386-protos.h: Update. - * config/i386/i386.h (enum ix86_builtins): Update. - * config/i386/i386.md: Correct predicates on MMX/SSE patterns. - Use ix86_expand_vector_move in vector move expanders. - (movti_internal, movti_rex64): Add xorps alternative. - (sse_clrv4sf): Rename and adjust from sse_clrti. - (prefetch): Don't work so hard. - (prefetch_sse, prefetch_3dnow): Use PREFETCH rtx, not UNSPEC. - * config/i386/xmmintrin.h (__m128): Use V4SFmode. - (_mm_getcsr, _mm_setcsr): Fix typo in builtin name. - -2002-01-11 Richard Henderson - - * config/i386/mmintrin.h: New file. - * config/i386/xmmintrin.h: New file. - * config.gcc (i?86-*-*): Add extra_headers. - * simplify-rtx.c (simplify_unary_operation): Handle saturating - truncation codes. - (simplify_binary_operation): Handle saturating arithmetic codes. - * config/i386/i386.c (ix86_expand_sse_comi): Return the full result, - not the lowpart subreg. - (ix86_expand_builtin): Return a TImode dummy register instead of 0 - on error. - * config/i386/i386.md (mmx_clrdi): Override memory attribute. - -2002-01-12 Michael Hayes - - * conflict.c (conflict_graph_compute): Free regsets when finished. - * ssa.c (compute_coalesced_reg_partition): Likewise. - -2002-01-12 Herman A.J. ten Brugge - - * global.c (find_reg): Check for HARD_REGNO_CALL_PART_CLOBBERED - every where we allocate a register. - -2002-01-12 Michael Hayes - - * gcse.c (compute_pre_data, pre_gcse): Use sbitmap_free. - * lcm.c (compute_earliest, compute_farthest): Likewise. - -2002-01-11 Janis Johnson - - * expr.c (expand_assignment): Fix misuse of MEM_KEEP_ALIAS_SET. - -2002-01-11 Janis Johnson - - * doc/rtl.texi (Insns): Fix 2 typos. - -2002-01-11 Joseph S. Myers - - * doc/invoke.texi: Avoid overfull hboxes. Add summary of D30V - options. Use @table @gcctabopt for MMIX options. Add index - entries for MMIX options. Start new paragraph with first - heading of the machine-dependent options. - -2002-01-11 Craig Rodrigues - - PR other/5299 - * config/ns32k/ns32k.md: Fix spelling mistake of "than" in comments. - * combine.c (force_to_mode): Same. - * reload1.c (clear_reload_reg_in_use): Same. - -2002-01-11 Nick Clifton - - * config/arm/arm.c (arm_gen_constant): Correct test of 'remainder' - and 'subtargets'. - -2002-01-11 Andreas Jaeger , - Brad Lucier - - * config/i386/i386.h (CPP_CPUCOMMON_SPEC): Remove wrong - mcpu. - -Fri Jan 11 07:35:12 2002 Douglas B Rupp - - * config/alpha/vms.h: (MD_FALLBACK_FRAME_STATE_FOR): Fix errors. - Protect with IN_LIBGCC. - (LINK_EH_SPEC): Add required trailing space. - -Fri Jan 11 09:25:05 2002 Nicola Pero - - * c-tree.h: Move function declarations so that they are listed - under the filename which contains them. - (check_identifier, finish_decl_top_level, - lookup_name_current_level_global, shadow_record_fields): Remove. - -2002-01-11 Andreas Jaeger - - * config/i386/i386.h (CPP_CPUCOMMON_SPEC): Remove duplicated - march. - -2002-01-10 Richard Henderson - - * config/alpha/alpha.c (print_operand): Add 'J'. - * config/alpha/alpha.md (call_osf_1_er, call_value_osf_1_er): Take a - new operand with the sequence number for the lituse. When splitting - the insns, use gen_movdi_er_high_g and generate a sequence number. - (gen_movdi_er_high_g): Print the sequence number if non-zero. - -2002-01-10 Aldy Hernandez - - * config/rs6000/rs6000.c (altivec_init_builtins): Add support for - lvebx, lvehx, lvewx, lvxl, lvx, stvx, stvebx, stvehx, stvewx, - stvxl. - (altivec_expand_builtin): Same. - (altivec_expand_stv_builtin): New. - - * config/rs6000/rs6000.h (rs6000_builtins): Same. - - * config/rs6000/rs6000.md ("altivec_lvebx"): New. - ("altivec_lvehx"): New. - ("altivec_lvewx"): New. - ("altivec_lvxl"): New. - ("altivec_lvx"): New. - ("altivec_stvx"): New. - ("altivec_stvebx"): New. - ("altivec_stvehx"): New. - ("altivec_stvewx"): New. - ("altivec_stvxl"): New. - -2002-01-10 Richard Henderson - - * cfgrtl.c (delete_insn): Assert insn hasn't been deleted yet. - * reload1.c (delete_output_reload): Zap spill_reg_store. Take - care not to delete instructions twice. - -2002-01-10 Zack Weinberg - - * toplev.c: Don't declare environ (it's not used anywhere). - * configure.in: Don't check for declaration of environ. - * config/i386/xm-mingw32.h: Don't #define environ. - * config.in, configure: Regenerate. - -2002-01-10 Zack Weinberg - - * configure.in: Set stage1_cflags for powerpc-*-darwin*. - * configure: Regenerate. - - * config/interix.h: Set DO_GLOBAL_CTORS_BODY and - DO_GLOBAL_DTORS_BODY here, not in xm-interix.h. - * config/alpha/vms.h: Set INCLUDE_DEFAULTS here, not in - alpha/xm-vms.h. - * config/m68k/t-next: Set OTHER_FIXINCLUDES_DIRS and - LIMITS_H_TEST here, not in m68k/x-next. - * config/rs6000/beos.h: Set STANDARD_INCLUDE_DIR and - SYSTEM_INCLUDE_DIR here, not in rs6000/xm-beos.h. - - * config/x-interix: Don't set RANLIB, RANLIB_TEST, SHELL, - LIBGCC2_INCLUDES, or SYSTEM_HEADER_DIR. - * config/alpha/x-vms: Don't set USE_COLLECT2. Add comments. - - * config/i386/x-djgpp: Renamed i386/t-djgpp. - * config/m88k/x-dolph: Renamed m88k/t-dolph. - * config/m88k/x-texXD88: Renamed m88k/t-texXD88. - * config/pa/x-pa-mpeix: Renamed pa/t-mpeix. Update for - replacement of quadlib.asm with quadlib.c. - - * config/x-interix3, config/xm-interix.h, config/i386/x-beos, - config/i386/xm-osf1elf.h, config/rs6000/x-darwin, - config/rs6000/xm-beos.h: Delete file. - - * config.gcc: Update to match above changes. - -2002-01-10 Kazu Hirata - - * config/h8300/h8300.h: Fix comment typos. - * config/h8300/h8300.md: Likewise. - * config/h8300/lib1funcs.asm: Likewise. - -2002-01-10 Dale Johannesen - - PR optimization/5269 - * unroll.c (precondition_loop_p): Make *increment be the correct - sign when n_iterations known, to avoid confusing caller. - -2002-01-10 Kazu Hirata - - * doc/extend.texi (deprecated): Fix a typo. - -Thu Jan 10 22:35:54 CET 2002 Jan Hubicka - - * basic-block.h (update_br_prob_note): Declare. - * cfgcleanup.c (try_simplify_condjump): Call update_br_prob_note. - (try_forward_edges): Care negative frequencies and update note. - (outgoing_edges_match): Tweek conditional merging heuristics. - (try_crossjump_to_edge): use update_br_prob_note. - * cfglayout.c (fixup_reorder_chain): Likewise. - * cfrtl.c (update_br_prob_note): New. - * ifcvt.c (dead_or_predicable): Call update_br_prob_note. - - * i386.c (ix86_decompose_address): Return -1 if address contains - shift. - (legitimate_address_p): Require ix86_decompose_address to return 1. - - * gcse.c (hash_scan_set): Use CONSTANT_INSN_P. - (cprop_insn): Likewise. - -2002-01-10 Kazu Hirata - - * toplev.c: Fix formatting. - * tree.c: Likewise. - * tree-dump.c: Likewise. - * unroll.c: Likewise. - * unwind-dw2.c: Likewise. - * unwind-dw2-fde.c: Likewise. - * unwind-dw2-fde-glibc.c: Likewise. - * unwind-sjlj.c: Likewise. - -2002-01-10 Joseph S. Myers - - * doc/invoke.texi: Document PDP-11 options. - -2002-01-10 Kazu Hirata - - * config/h8300/h8300.h: Fix formatting. - -2002-01-10 Ira Ruben - - Add __attribute__ ((deprecated)). - * extend.texi: Document __attribute__ ((deprecated)). - * invoke.texi: Document -Wno-deprecated-declarations. - * testsuite/g++.dg/other/deprecated.C: New C++ test. - * testsuite/gcc.dg/deprecated.c: New C test. - * attribs.c (enum attrs): Declare handle_deprecated_attribute(). - (c_common_attribute_table): Add "deprecated" entry. - (handle_deprecated_attribute): New function. - * c-decl.c (deprecated_states): New enum. - deprecated_state: State of "deprecated" handling. - (start_decl): Set deprecated_state based on attributes. - (grokdeclarator): Test for deprecated uses, propagate attribute. - * c-typeck.c (build_component_ref): Test for deprecated fields. - (build_external_ref): Test for deprecated primaries. - * diagnostic.c (warn_deprecated_use) New function to issue - warnings about __attribute__ ((depricated)) references. - * flags.h (warn_deprecated_decl): Extern declared for - -W[no-]deprecated-declarations option. - * print-tree.c (print_node): Show deprecated flag status. - * toplev.c (warn_deprecated_decl): Defined. - (W_options): Added "deprecated-declaration". - * toplev.h (warn_deprecated_use): Extern declared. - * tree.h (struct tree_common): Define deprecated_flag. - (TREE_DEPRECATED): New macro to access flag. - * cp/call.c (build_call): Test for deprecated calls. - * cp/class.c (add_implicitly_declared_members): Set global - flag to tell grokdeclarator to not issue deprecated warnings. - * cp/cp-tree.h: Add extern for adding_implicit_members. - * cp/decl.c (deprecated_states): New enum. - (start_decl): Set deprecated_state based on attributes. - (grokdeclarator): Test for deprecated uses, propagate attribute. - * cp/lex.c (do_identifier): Test for deprecated primaries. - * cp/typeck.c (build_component_ref): Test for deprecated fields. - -2002-01-10 Ira Ruben - - Fix to assign attributes to inline member functions. - * cp/decl.c (start_method): Handle attrlist. - -2002-01-10 Kazu Hirata - - * combine.c (expand_field_assignment): Use subreg_lsb(). - -2002-01-10 David Edelsohn - - * alias.c (find_base_value): Add cases for HIGH, PRE_INC, PRE_DEC, - POST_INC, POST_DEC, PRE_MODIFY, and POST_MODIFY. - (find_base_term): Add cases for TRUNCATE, PRE_MODIFY, and POST_MODIFY. - Recurse for any operand of AND as long as constant is non-zero. - -2002-01-10 Kazu Hirata - - * config/h8300/h8300.md: Remove constraints from expanders. - -2002-01-10 Kazu Hirata - - * varasm.c: Fix formatting. - * varray.c: Likewise. - * vmsdbgout.c: Likewise. - * xcoffout.c: Likewise. - -Thu Jan 10 17:19:12 CET 2002 Jan Hubicka - - * cfgcleanup.c (try_forward_edges): Properly initialize nthreaded_edges; - update edge probabilities to match. - -2002-01-10 Joseph S. Myers - - * Makefile.in ($(docdir)/gccint.info, gccint.dvi): Add additional - dependencies. - * doc/languages.texi, doc/sourcebuild.texi: New files. - * doc/configfiles.texi: Make a subsubsection. Update. - * doc/configterms.texi: Add @node. Remove warning that this isn't - instructions for building GCC. - * doc/makefile.texi: Make a subsection. - * doc/gccint.texi: Update. - -Thu Jan 10 16:39:58 CET 2002 Jan Hubicka - - * i386.md (sse_mov?fcc_const0_?): Fix constraints. - -Thu Jan 10 12:45:50 2002 Nicola Pero - - * doc/cpp.texi: Document the __OBJC__ preprocessor macro. - -Thu Jan 10 11:19:18 CET 2002 Jan Hubicka - - * optabs.c (expand_fix): Look for wider integer modes first. - - * i386.md (mov?f): Avoid the fake const double trick for medium - memory model. - (min?f*/max?f*): Prohibit memory operands for i387 variant. - (fop_df_4): Disable for SSE compilation. - -2002-01-10 Graham Stott - - * dwarf2out.c (indirect_string_alloc, output_indirect_string): - Move prototype into DWARF2_DEBUGGING_INFO conditional block. - -2002-01-10 Richard Henderson - - * config/alpha/alpha.md (extendsidi2_fix): Penalize f/f alternative. - -2002-01-10 Richard Henderson - - * regrename.c (find_oldest_value_reg): Fix typo in mode change check. - (copyprop_hardreg_forward_1): Likewise. Use mode_change_ok. - -2002-01-10 Kazu Hirata - - * combine.c (can_combine_p): Fix a comment typo. - -2002-01-09 Zack Weinberg - - * Makefile.in (s-gencheck, s-options, s-specs): Handle an - empty list correctly. Change loop index $t to $f for - consistency with rest of Makefile. - -2002-01-08 Aldy Hernandez - - * testuite/gcc.dg/altivec-4.c: Add test for mtvscr, dssall, - mfvscr, dss, lvsl, lvsr, dstt, dstst, dststt, dst. - - * config/rs6000/rs6000.c (altivec_expand_builtin): Add support for - mtvscr, dssall, mfvscr, dss, lvsl, lvsr, dstt, dst, dstst, dststt. - (altivec_init_builtins): Same. - (altivec_expand_unop_builtin): Return NULL_RTX on error. - (altivec_expand_binop_builtin): Same. - (altivec_expand_ternop_builtin): Same. - (bdesc_dst): New. - - * config/rs6000/rs6000.md ("altivec_mtvscr"): New. - ("altivec_vctuxs"): Fix typo. - ("altivec_vnmsubfp"): Same. - ("altivec_dssall"): New. - ("altivec_mfvscr"): New. - ("altivec_dss"): New. - ("altivec_lvsl"): New. - ("altivec_lvsr"): New. - ("altivec_dstt"): New. - ("altivec_dstst"): New. - ("altivec_dststt"): New. - ("altivec_dst"): New. - - * config/rs6000/rs6000.h (rs6000_builtins): Add mtvscr, dssall, - mfvscr, dss, lvsl, lvsr, dstt, dstst, dststt, dst. - -2002-01-09 Richard Henderson - - * config/alpha/alpha.md (prologue_mcount): Remove lituse_jsr reloc. - -2002-01-10 Hans-Peter Nilsson - - * config/mmix/mmix.c (mmix_asm_identify_gcc): Remove unused - function. - * config/mmix/mmix-protos.h (mmix_asm_identify_gcc): Don't - prototype. - * config/mmix/mmix.h (ASM_IDENTIFY_GCC): Remove unused macro. - -2002-01-09 Kazu Hirata - - * read-rtl.c: Fix formatting. - * real.c: Likewise. - * regclass.c: Likewise. - * regrename.c: Likewise. - * reg-stack.c: Likewise. - * reload1.c: Likewise. - * reload.c: Likewise. - * rtl.c: Likewise. - -2002-01-09 Kazu Hirata - - * rtlanal.c (find_reg_fusage): Use XEXP instead of SET_DEST - to extract items in the expr_list chain. - -2002-01-09 Richard Henderson - - * config/vax/vax.c (vax_rtx_cost): Never abort. - - * config/vax/vax.h (REAL_ARITHMETIC): Define. - -2002-01-09 Jan Hubicka - - * gcse.c (cprop_jump): Delete insn if simplified jump is no-op. - -2002-01-09 Richard Henderson - - * config/arm/arm.c (arm_gen_constant): Use trunc_int_for_mode. - Unify code from various alternatives. - -2002-01-09 Richard Henderson - - * regrename.c (copy_value): Ignore the copy if the source register - is present in the value chain with a narrower mode. - -2002-01-09 Herman A.J. ten Brugge - - * real.c (c4xtoe, toc4x): Do some special conversion on long doubles - for the c4x target. Also improve layout. - -2002-01-09 Richard Henderson - - * config/m32r/m32r.c (move_src_operand): Fix 32-bit int test. - * config/m32r/m32r.md (and ior xor splitters): Swap operands - to match insn patterns. - -2002-01-09 Richard Henderson - - * regrename.c (find_oldest_value_reg): Use gen_rtx_raw_REG. - (copyprop_hardreg_forward_1): Likewise. - -2002-01-09 John David Anglin - - * pa.md (decrement_and_branch_until_zero): Change predicate for - operand 0 from register_operand to reg_or_nonsymb_mem_operand. - -2002-01-09 Bryce McKinlay - - * ginclude/stddef.h: Define _BSD_WCHAR_T_DEFINED_ if _BSD_WCHAR_T_ - gets undefined. For Darwin. - -2002-01-09 Herman A.J. ten Brugge - - * config/c4x/c4x.h: Use PUSH_ARGS and PUSH_ROUNDING for stack passing. - -2002-01-09 Michael Hayes - - * config/c4x/c4x/md: Remove extraneous constraints from define_splits. - -2002-01-08 Richard Henderson - - * regrename.c (copy_value): Ignore overlapping copies. - -2002-01-08 Richard Henderson - - * config/alpha/alpha.c (alpha_split_conditional_move): Call copy_rtx - as needed to avoid shared structure. - -2002-01-08 Kazu Hirata - - * config/h8300/h8300.c (get_shift_alg): Fix 15-bit LSHIFTRT on - H8/300H and H8/S. - -2002-01-08 Joseph S. Myers - - * doc/tm.texi (EASY_DIV_EXPR, IMPLICIT_FIX_EXPR, - LONGJMP_RESTORE_FROM_STACK, MAX_INT_TYPE_SIZE): Remove - documentation of obsolete macros. - * system.h: Poison these macros. - * config/1750a/1750a.h, config/a29k/a29k.h, config/alpha/alpha.h, - config/arc/arc.h, config/arm/arm.h, config/avr/avr.h, - config/c4x/c4x.h, config/clipper/clipper.h, - config/convex/convex.h, config/cris/cris.h, config/d30v/d30v.h, - config/dsp16xx/dsp16xx.h, config/elxsi/elxsi.h, - config/fr30/fr30.h, config/h8300/h8300.h, config/i370/i370.h, - config/i386/i386.h, config/i860/i860.h, config/i960/i960.h, - config/ia64/ia64.h, config/m32r/m32r.h, config/m68hc11/m68hc11.h, - config/m68k/m68k.h, config/m88k/m88k.h, config/mcore/mcore.h, - config/mips/mips.h, config/mmix/mmix.h, config/mn10200/mn10200.h, - config/mn10300/mn10300.h, config/ns32k/ns32k.h, config/pa/pa.h, - config/pdp11/pdp11.h, config/pj/pj.h, config/romp/romp.h, - config/rs6000/rs6000.h, config/s390/s390.h, config/sh/sh.h, - config/sparc/sparc.h, config/stormy16/stormy16.h, - config/v850/v850.h, config/vax/vax.h, config/we32k/we32k.h: Remove - definitions and commented out definitions of obsolete macros. - * config/mips/iris5.h (MAX_WCHAR_TYPE_SIZE): Don't define in terms - of MAX_INT_TYPE_SIZE. - -2002-01-08 Ulrich Weigand - - * config/s390/s390.c (s390_preferred_reload_class): Never - return ADDR_REGS if it isn't a subset of the given class. - * config/s390/s390.h (REGISTER_MOVE_COST): Penalize not just - FP_REGS, but all superclasses as well. - - * config/s390/s390.c (s390_function_profiler): Fix thinko. - - * config/s390/s390.md (cmpdi_ccu_mem, cmpsi_ccu_mem, - cmphi_ccu_mem, cmpqi_ccu_mem): First operand of compare - must not be a const_int. - -2002-01-08 Richard Henderson - - * Makefile.in (toplev.o): Depend on options.h. - (gcc.o): Depend on specs.h. - -2002-01-08 Jakub Jelinek - - * expr.c (store_expr): Convert VOIDmode constants back to target's - mode. - -2002-01-08 Gerald Pfeifer - - * doc/invoke.texi: Markup gcc as @command. Refer to - http://gcc.gnu.org/onlinedocs/gcc/Contributors.html instead - of http://gcc.gnu.org/thanks.html. - -2002-01-08 Dale Johannesen - - * config/rs6000/rs6000.md: Add missing int register - target case to movdf_low. - -2002-01-08 Zack Weinberg - - * Makefile.in (cs-tconfig.h): Don't depend on $(CONFIG_H) or - except.h. Remove commands to define USING_SJLJ_EXCEPTIONS. - (cppinit.o): Depend on except.h. - (gencheck.h, options.h, specs.h, s-gencheck, s-options, - s-specs): New rules. - - * configure.in: Don't AC_DEFINE_UNQUOTED PACKAGE or VERSION. - Don't create specs.h/options.h/gencheck.h here. Remove - unnecessary variable settings from last argument of AC_OUTPUT. - * config.in, configure: Regenerate. - * intl.c: Hardcode package name as "gcc". - - * cppinit.c: Include except.h. - (builtin_array): Define __USING_SJLJ_EXCEPTIONS__ when - appropriate. - * unwind-dw2.c, unwind-sjlj.c, config/ia64/unwind-ia64.c: - Use #if(n)def __USING_SJLJ_EXCEPTIONS, not #if - (!)USING_SJLJ_EXCEPTIONS. - * doc/cpp.texi: Document __USING_SJLJ_EXCEPTIONS__. - -2002-01-08 Joseph S. Myers - - * doc/tm.texi (ASM_OUTPUT_EH_REGION_BEG, ASM_OUTPUT_EH_REGION_END, - ASM_OUTPUT_LABELREF_AS_INT, DOESNT_NEED_UNWINDER, EH_TABLE_LOOKUP, - OBJC_SELECTORS_WITHOUT_LABELS, OMIT_EH_TABLE): Remove - documentation of obsolete macros. - * system.h: Poison these macros. - * config/d30v/d30v.h, config/ns32k/encore.h, - config/stormy16/stormy16.h: Remove definitions and commented out - definitions of obsolete macros. - -Tue Jan 8 15:56:41 2002 Nicola Pero - - * objc/objc-act.c (handle_class_ref): Mark the declaration of - %sobjc_class_ref_%s as used - to prevent unwanted compiler - warnings. - -2002-01-08 Ulrich Weigand - - * config/s390/linux.h (ASM_OUTPUT_LABELREF): Remove. - * config/s390/s390.c (s390_emit_epilog): Add REG_FRAME_RELATED_EXPR - to insn adjusting stack/frame pointer. - * config/s390/s390.md (reload_la_64, reload_la_31): Do not - accept operands that cause the insn to be non-splittable. - -2002-01-08 Graham Stott - - * c-tree.h (C_TYPE_FIELDS_READONLY): Uppercase macro parameter. - (C_TYPE_FIELDS_VOLATILE): Likewise. - (C_TYPE_BEING_DEFINED): Likewise. - (C_IS_RESERVED_WORD): Likewise. - (C_TYPE_VARIABLE_SIZE): Likewise. - (C_DECL_VARIABLE_SIZE): Likewise. - (C_MISSING_PROTOTYPE_WARNED): Likewise. - (C_SET_EXP_ORIGINAL_CODE): Likewise. - (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter and remove - parenthesis. - (C_DECL_ANTICIPATED): Likewise. - (c_build_type_variant): Add parenthesis. - -2002-01-08 Joseph S. Myers - - * gcc.c (option_map): Remove --version. - (process_command): Handle -fversion following the GNU Coding - Standards. Partially addresses PR other/704. - -2002-01-08 Graham Stott - - * combine.c (combine_instructions): Fix typo. - -2002-01-08 Graham Stott - - * debug.h: Use "tree" and "rtx" throughout. - - * debug.c: Likewise. - -2002-01-08 Nick Clifton - - * dbxout.c (dbxout_symbol_location): If a symbol ref is in the - constant pool, use the pool's version of the symbol instead. - -2002-01-07 Richard Henderson - - * regrename.c (find_oldest_value_reg): Ignore the value chain if - the original register was copied in a mode with a fewer number of - hard registers than the desired mode. - (copyprop_hardreg_forward_1): Likewise. - (debug_value_data): Fix loop test. - * toplev.c (parse_options_and_default_flags): Reenable - -fcprop-registers at -O1. - -2002-01-07 Aldy Hernandez - - * config/rs6000/rs6000.c (bdesc_2arg): Add altivec predicates. - (altivec_init_builtins): New node v4si_ftype_v16qi_v16qi. - - * config/rs6000/rs6000.h (rs6000_builtins): Add enums for altivec - predicates. - - * config/rs6000/rs6000.md: Add altivec predicate patterns. - -2002-01-07 John David Anglin - - * pa.c (FUNC_BEGIN_PROLOG_LABEL, current_function_number): Define. - (pa_output_function_prologue): Output local label at the beginning of - the prologue when profiling. - (hppa_profile_hook): Use the local label rather than the function label. - * pa.h (PROFILE_BEFORE_PROLOGUE): Define. - -2002-01-07 Aldy Hernandez - - * config/rs6000/rs6000.c (print_operand): Remove extra space. - (altivec_expand_unop_builtin): Fix thinko. - (altivec_expand_binop_builtin): Same. - (altivec_expand_ternop_builtin): Same. - (altivec_expand_builtin): Same. - -2002-01-07 Richard Henderson - - * config/rs6000/xcoff.h (ASM_FILE_START): Reverted to profile_flag. - -2002-01-07 Jason Merrill - - * unwind-dw2.c (execute_cfa_program): Use < again. - -2002-01-07 Jakub Jelinek - - * predict.c (combine_predictions_for_insn): Avoid division by zero. - -2002-01-07 Jakub Jelinek - - * simplify-rtx.c (simplify_plus_minus): Bump n_ops for NOT. - Don't allow -1 - x -> ~x simplifications in the first pass. - -2002-01-07 Aldy Hernandez - - * rs6000.c (altivec_expand_ternop_builtin): Don't die on invalid - arguments. - (altivec_expand_binop_builtin): Same. - (altivec_expand_unop_builtin): Same. - (print_operand): Fix typo. - (bdesc_1arg): Add vupk* variants. - - * rs6000.h (rs6000_builtins): Add vupk* enums. - - * rs6000.md: Add altivec_vupk* variants. - -2002-01-07 Joseph S. Myers - - * doc/gcc.texi, doc/gccint.texi, doc/cppinternals.texi, - doc/install.texi, doc/invoke.texi, doc/rtl.texi: Update copyright - and last update dates. - -2002-01-07 Janis Johnson - - * doc/rtl.texi (Flags): Clean up documentation of RTL flags - -2002-01-07 Marek Michalkiewicz - - * config/avr/avr.c (avr_mcu_types): Add new MCU types. - * config/avr/avr.h (CPP_SPEC): Likewise. - (LINK_SPEC): Likewise. - (CRT_BINUTILS_SPECS): Likewise. - * config/avr/t-avr (MULTILIB_MATCHES): Likewise. - * doc/invoke.texi (AVR Options): Document them. - -Mon Jan 7 11:59:34 CET 2002 Jan Hubicka - - * unroll.c (copy_loop_body): Always properly update JUMP_LABEL and - LABEL_NUSES. - -2002-01-07 Graham Stott - - * config/i386/i386.h: Update copyright date. - (HALF_PIC_PTR): Add parenthesis. - (OPTIMIZATION_OPTIONS): Whitespace, add parenthesis and wrap. - (CONSTANT_ALIGNMENT): Add parenthesis. - (DATA_ALIGNMENT): Likewise. - (LOCAL_ALIGNMENT): Likewise. - (FUNCTION_ARG_BOUNDARY): Whitespace, add parenthesis and wrap. - (IS_STACK_MODE): Uppercase macro parameter, add parenthesis and wrap. - (CONDITIONAL_REGISTER_USAGE): Wrap in do {...} while (0). - (HARD_REGNO_NREGS): Add paranethesis. - (VALID_SSE_REG_MODE): Whitespace. - (VALID_MMX_REG_MODE): Whitespace. - (VALID_FP_MODE_P): Uppercase macros parameter and whitespace. - (ix86_hard_regno_mode_ok): Add parenthesis. - (HARD_REGNO_CALLER_SAVE_MODE): Whitespace. - (RETURN_IN_MEMORY): Whitespace. - (N_REG_CLASSES): Add parenthesis. - (INTEGER_CLASS_P): Add parenthesis and wrap. - (FLOAT_CLASS_P): Likewise. - (SSE_CLASS_P): Likewise. - (MMX_CLASS_P): Likewise. - (MAYBE_INTEGER_CLASS_P): Likewise. - (MAYBE_FLOAT_CLASS_P): Likewise. - (MAYBE_SSE_CLASS_P): Likewise. - (MAYBE_MMX_CLASS_P): Likewise. - (Q_CLASS_P): Likewise. - (GENERAL_REGNO_P): Uppercase macro parameter. - (REX_INT_REGNO_P): Uppercase macro parameter and wrap. - (FP_REGNO_P): Likewise. - (ANY_FP_REGNO_P): Uppercase macro parameter. - (SSE_REGNO_P): Likewise. - (SSE_REGNO): Likewise. - (SSE_REG_P): Likewise. - (SSE_FLOAT_MODE_P): Likewise. - (MMX_REGNO_P): Likewise. - (MMX_REG_P):Likewise. - (STACK_REG_P): Likewise. - (NON_STACK_REG_P): Likewise. - (STACK_TOP_P): Likewise. - (CONVERT_HARD_REGISTER_TO_SSA_P): Add parenthesis. - (PREFERRED_RELOAD_CLASS): Add parenthesis and whitespace. - (SECONDARY_MEMORY_NEEDED): Likewise. - (SECONDARY_OUTPUT_RELOAD_CLASS): Whitespace. - (MD_ASM_CLOBBERS): Whitespace and wrap. - (MUST_PASS_IN_STACK): Whitespace and wrap. - (RETURN_POPS_ARGS): Add parenthesis. - (INIT_CUMULATIVE_ARGS): Likewise. - (FUNCTION_ARG): Likewise. - (FUNCTION_OK_FOR_SIBCALL): Add parenthesis and whitespace. - (SETUP_INCOMING_VARARGS): Likewise. - (BUILD_VA_LIST_TYPE): Add parenthesis. - (EXPAND_BUILTIN_VA_START): Uppercase macro paremeters and add - parenthsis. - (EXPAND_BUILTIN_VA_ARG): Likewise. - (FUNCTION_PROFILER): Wrap in do { ... } while (0) and add parenthesis. - (INITIALIZE_TRAMPOLINE): Add parenthesis. - (INITIAL_ELIMINATION_OFFSET): Likewise. - (REGNO_OK_FOR_INDEX_P): Add parenthesis. - (REGNO_OK_FOR_BASE_P): Likewise. - (REGNO_OK_FOR_SIREG_P): Add parenthesis and wrap. - (REGNO_OK_FOR_DIREG_P): Likewise. - (REG_OK_FOR_INDEX_P): Whitespace. - (REG_OK_FOR_BASE_P): Whitespace. - (GO_IF_LEGITIMATE_ADDRESS): Wrap in do { ... } while (0) and add - parenthesis. - (FIND_BASE_TERM): Fix typo. - (LEGITIMIZE_ADDRESS): Wrap in { .. } while (0) and add parenthesis. - (REWRITE_ADDRESS): Uppercase macro parameter and whitespace. - (SYMBOLIC_CONST; Whitespace. - (GO_IF_MODE_DEPENDENT_ADDRESS):Wrap in { .. } while (0) and wrap. - (ENCODE_SECTION_INFO): Whitespace. - (FINALIZE_PIC): Remove do { ... } while (0). - (PROMOTE_MODE): Wrap in do { ... } while (0). - (CONST_COSTS): Whitespace. - (RTX_COSTS): Add paramethesis, whitespace and wrap. - (REGISTER_MOVE_COST): Add parenthesis. - (MEMORY_MOVE_COST): Likewise. - (EXTRA_CC_MODES): Whitespace. - (SELECT_CC_MODE): Add parenthesis and whitespace. - (DBX_REGISTER_NUMBER): Uppercase macro parameter and add parenthsis. - (ASM_PREFERRED_EH_DATA_FORMAT): Add parenthesis and whitespace. - (ASM_OUTPUT_LABEL): Add paramethesis. - (ASM_OUTPUT_REG_PUSH): Add parenthesis and whitespace. - (ASM_OUTPUT_REG_POP): Likewise. - (ASM_OUTPUT_ADDR_VEC_ELT): Add parenthesis. - (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise. - - * config/i386/i386.c: Update copyright. - (CHECK_STACK_LIMIT): Add parenthesis. - (AT_BP): Uppercase macro parameter. - (x86_64_int_parameter_registers): Constify. - (x86_64_int_return_registers): Likewise. - (ix86_compare_op0): Use rtx. - (construct_container): Constify INTREG parameter. - (function_arg): Use rtx. - - * diagnostic.h: Update copyright date. - (output_buffer_state): Add parenthesis. - (output_buffer_format_args): Likewise. - - * combine.c (combine_instructions): Replace XEXP (links, 0) - with link. - -2002-01-06 H.J. Lu - - * cfgcleanup.c (thread_jump): Fix 2 typos. - -2002-01-06 Aldy Hernandez - - * config.gcc: Add support for --enable-altivec. - -2002-01-06 Craig Rodrigues - - * emit-rtl.c (gen_highpart): Add check for NULL_RTX. - -2002-01-06 Jakub Jelinek - - * objc/objc-act.c (handle_impent): Use assemble_variable to emit - __objc_class_name_*. - -2002-01-06 Craig Rodrigues - - * doc/install.texi (sparcv9-*-solaris2*): Add documentation. - -2002-01-06 Richard Henderson - - * reorg.c (emit_delay_sequence): Remove death notes, not merely - nop them out. Increment label reference count for REG_LABEL. - (fill_slots_from_thread): Frob label reference count around - delete_related_insns. - -2002-01-05 Richard Henderson - - * cfgcleanup.c (try_forward_edges): Detect infinite loops while - jump threading. - -2002-01-05 Richard Henderson - - * c-decl.c (c_expand_body): Don't call outlining_inline_function. - * integrate.c (output_inline_function): Likewise. - * toplev.c (rest_of_compilation): Do it here instead. Move call - to remove_unnecessary_notes after emitting abstract instance. - Force an emitted nested function to have its parent emited as well. - * dwarf2out.c (loc_descriptor_from_tree): Read mode after checking - for null. - (rtl_for_decl_location): Do not look at reload data structures - before reload has run. - -2002-01-05 Kazu Hirata - - * cse.c: Fix formatting. - * dwarf2asm.c: Likewise. - * dwarf2out.c: Likewise. - * explow.c: Likewise. - * expmed.c: Likewise. - * function.c: Likewise. - * gcov.c: Likewise. - * gencheck.c: Likewise. - * genrecog.c: Likewise. - * ggc-common.c: Likewise. - * ggc-page.c: Likewise. - * global.c: Likewise. - -2002-01-05 Kazu Hirata - - * combine.c: Fix formatting. - -2002-01-05 Craig Rodrigues - - PR middle-end/1557 - * config/ia64/ia64.h (RENAME_EXTENDED_BLOCKS): Remove. - -2002-01-05 David Edelsohn - - * config/rs6000/rs6000.h (TARGET_POWERPC): For IN_LIBGCC2, define - as 1 for __powerpc64__ as well. - - * config/rs6000/t-aix43 (T_ADAFLAGS): Define. - - * alias.c (find_base_value, PLUS/MINUS): If we found a base, - return it. - -2002-01-05 Daniel Berlin - - * lcm.c: Revert change, due to performance regression it causes on - SPEC because it's slightly more conservative (sigh, I hate - edge-based LCM). - -Sat Jan 5 11:52:05 CET 2002 Jan Hubicka - - * cfgcleanup.c (try_forward_edges): Allow multiple jump threading. - -2002-01-05 Neil Booth - - * doc/cppinternals.texi: Update. - -2002-01-05 Hans-Peter Nilsson - - * doc/invoke.texi (Option Summary) : Document - -mbranch-predict, -mreg-stack-fill-bug-workaround and their - negatives. - (MMIX Options): Ditto. Fix item/itemx typo for -mno-zero-extend. - * config/mmix/mmix.c (mmix_target_asm_function_prologue): Rework - kludge for pre-october-14th mmix versions to handle new-found bug - with PUSHJ/PUSHGO and the register stack. - * config/mmix/mmix.h (struct machine_function): Rename member - has_call_value_without_parameters to has_call_without_parameters. - All referers changed. - (TARGET_MASK_REG_STACK_FILL_BUG, TARGET_DEFAULT - TARGET_MASK_BRANCH_PREDICT): New macros. - (TARGET_SWITCHES): New options -mreg-stack-fill-bug-workaround, - -mno-reg-stack-fill-bug-workaround. - * config/mmix/mmix.md ("call"): Set struct machine member - has_call_without_parameters. - -Sat Jan 5 02:20:22 CET 2002 Jan Hubicka - - * cfgcleanup.c (thread_jump): Fix handling of reversed branches. - -Sat Jan 5 01:35:29 CET 2002 Jan Hubicka - - * cfgcleanup.c: Include tm_p.h - (mark_effect): Fix handling of hard register; fix handling of SET - -2002-01-04 Kazu Hirata - - * config/h8300/h8300.md (anonymous patterns): Check that - operands are registers before using REGNO on them. - -2002-01-03 Roland McGrath - - * doc/invoke.texi (RS/6000 and PowerPC Options): Add -mcall-gnu. - -2002-01-04 Jakub Jelinek - - * tree.h (expand_expr_stmt_value): Add maybe_last argument. - * c-common.h (genrtl_expr_stmt_value): Likewise. - * stmt.c (expand_expr_stmt): Pass 1 as maybe_last. - (expand_expr_stmt_value): Add maybe_last argument. - Don't warn about statement with no effect if it is the last statement - in expression statement. - * c-semantics.c (genrtl_expr_stmt): Pass 1 as maybe_last. - (genrtl_expr_stmt_value): Add maybe_last argument, pass it down to - expand_expr_stmt_value. - (expand_stmt) [EXPR_STMT]: Pass 1 as maybe_last to - genrtl_expr_stmt_value if t is the last EXPR_STMT in its scope. - * expr.c (expand_expr) [LABELED_BLOCK_EXPR, LOOP_EXPR]: Pass 1 - as maybe_last to expand_expr_stmt_value. - -Fri Jan 4 11:45:05 2002 Jeffrey A Law (law@redhat.com) - - * c-common.c (c_expand_start_cond): Expect the IF_STMT node to - be passed in, do not build it. - (c_begin_if_stmt): New function. - (c_begin_while_stmt, c_finish_while_stmt_cond): Likewise. - * c-common.h (c_expand_start_cond): Update prototype. - (c_begin_if_stmt): Prototype new function. - (c_begin_while_stmt, c_finish_while_stmt_cond): Likewise. - * c-parse.in (if_prefix): Use c_begin_if_stmt, - c_begin_while_stmt and c_finish_while_stmt_cond. - -2002-01-04 William Cohen - - * config/pa/elf.h (ASM_FILE_START): Reverted to profile_flag. - * config/pa/pa-linux.h (ASM_FILE_START): Likewise. - * config/pa/pa64-hpux.h (ASM_FILE_START): Likewise. - * config/pa/som.h (ASM_FILE_START): Likewise. - -2002-01-04 Daniel Berlin - - * lcm.c: Include df.h. - Add available_transfer_function prototype. - (compute_available): Rework to use iterative dataflow framework. - (struct bb_info): s/bb_info/lcm_bb_info/g to avoid conflict - with bb_info in df.h - (available_transfer_function): New function. - - * Makefile.in (lcm.o): add df.h to dependencies. - -2002-01-04 Richard Henderson - - * config/alpha/alpha.c (some_operand): Accept HIGH. - (input_operand): Likewise; accept simple references to globals. - (alpha_const_ok_for_letter_p): New, outlined from alpha.h. - (alpha_const_double_ok_for_letter_p): Likewise. - (alpha_extra_constraint): Likewise. - (alpha_preferred_reload_class): Likewise. Do not force - symbolic constants to memory. - (alpha_legitimate_address_p): Accept simple references - to small_symbolic_operand. - (alpha_legitimize_address): New arg scratch. Be prepared to be - called when no_new_pseudos. Emit simple symbolic references. - Split integers into low, high, and rest. - (alpha_expand_mov): Use alpha_legitimize_address. - (some_small_symbolic_mem_operand): New. - (split_small_symbolic_mem_operand): New. - * config/alpha/alpha-protos.h: Update. - * config/alpha/alpha.h (CONST_OK_FOR_LETTER_P): Out-line. - (CONST_DOUBLE_OK_FOR_LETTER_P): Likewise. - (EXTRA_CONSTRAINT): Likewise. - (PREFERRED_RELOAD_CLASS): Likewise. - (LEGITIMIZE_ADDRESS): Update for alpha_legitimize_address change. - (PREDICATE_CODES): Update. - * config/alpha/alpha.md: New post-reload splitters to convert - simplfied symbolic operands to the form that references $29. - (divide expanders): Use emit_move_insn, not gen_movdi_er_high_g. - (movdi_er_nofix, movdi_er_fix): Accept any symbolic operand. - -2002-01-03 Richard Henderson - - * local-alloc.c (function_invariant_p): Update commentary. - -2002-01-04 H.J. Lu - - * toplev.c (rest_of_compilation): Fix a typo when calling - cleanup_cfg. - -2002-01-03 Kazu Hirata - - * c-common.c: Fix formatting. - * diagnostic.c: Likewise. - * doloop.c: Likewise. - * dwarf2out.c: Likewise. - -2002-01-03 Kazu Hirata - - * config/h8300/h8300.c (output_logical_op): Use 'not.w' instead - of 'neg.w' when xoring with 0x0000ffff or 0xffff0000. - -2002-01-03 Neil Booth - - * cpperror.c: Update comments and copyright. - * cppexp.c, cppfiles.c, cpphash.c, cpphash.h, cppinit.c, - cpplex.c, cpplib.c, cpplib.h, cppmacro.c, cppmain.c: Similarly. - -2002-01-03 John David Anglin - - * collect2.c (main): Use strcmp when testing for "-shared". - -2002-01-03 Neil Booth - - * cppmacro.c: Don't include intl.h. Update comments. - (new_number_token): Allocate enough buffer for 64-bit unsigned - integers; update prototype. - * cppmain.c: Update comments. - -2002-01-03 William Cohen - - * function.h (struct function): Add profile. - (current_function_profile): New. - doc/extend.texi: Update documentation. - * final.c (final_start_function): Use current_function_profile - instead of profile_flag. - (profile_after_prologue): Likewise. - * function.c (expand_function_start): Likewise. - (expand_function_start): Likewise. - * config/alpha/alpha.c (direct_call_operand): - (alpha_does_function_need_gp): Likewise. - (alpha_expand_prologue): Likewise. - * config/arm/arm.c (arm_expand_prologue): Likewise. - thumb_expand_prologue: Likewise. - * config/d30v/d30v.c (d30v_stack_info): Likewise. - * config/fr30/fr30.c (MUST_SAVE_RETURN_POINTER): Likewise. - (fr30_expand_prologue): Likewise. - * config/i386/cygwin.h (SUBTARGET_PROLOGUE): Likewise. - * config/i386/i386.c (ix86_osf_output_function_prologue): Likewise. - * config/i386/i386.h (FINALIZE_PIC): Likewise. - * config/i386/win32.h (SUBTARGET_PROLOGUE): Likewise. - * config/i960/i960.c (i960_output_function_prologue): Likewise. - * config/ia64/ia64.c (ia64_compute_frame_size): Likewise. - * config/m32r/m32r.c (MUST_SAVE_RETURN_ADDR): Likewise. - (m32r_expand_prologue): Likewise. - * config/m88k/m88k.c (m88k_layout_frame): Likewise. - (m88k_expand_prologue): Likewise. - * config/m88k/m88k.h (ADJUST_INSN_LENGTH): Likewise. - * config/mips/mips.c (compute_frame_size): Likewise. - (mips_expand_prologue): Likewise. - (mips_can_use_return_insn): Likewise. - * config/pa/elf.h (ASM_FILE_START): Likewise. - * config/pa/pa-linux.h (ASM_FILE_START): Likewise. - * config/pa/pa64-hpux.h (ASM_FILE_START): Likewise. - * config/pa/som.h (ASM_FILE_START): Likewise. - * config/romp/romp.c (romp_using_r14): Likewise. - * config/rs6000/rs6000.c (first_reg_to_save): Likewise. - (rs6000_stack_info): Likewise. - * config/rs6000/sysv4.h (ASM_DECLARE_FUNCTION_NAME): Likewise. - * config/rs6000/xcoff.h (ASM_FILE_START): Likewise. - * config/v850/v850.c (compute_register_save_size): Likewise. - -2002-01-03 Jakub Jelinek - - * simplify-rtx.c (simplify_binary_operation) [DIV]: If - gen_lowpart_common fails, use gen_lowpart_SUBREG. - -2002-01-03 Turly O'Connor - - * darwin.c (machopic_output_possible_stub_label): Don't generate - stub routines for pseudo-stubs which we've just defined. - -2002-01-03 Kazu Hirata - - * builtins.c: Fix formatting. - * c-typeck.c: Likewise. - * combine.c: Likewise. - * expr.c: Likewise. - * loop.c: Likewise. - -2002-01-03 Andreas Schwab - - * cppfiles.c (_cpp_pop_file_buffer): Change return type to bool - and return true if _cpp_push_next_buffer pushed a new include - file. - * cpplib.c (_cpp_pop_buffer): Only call obstack_free if - _cpp_pop_file_buffer did not push a new file. - * cpphash.h (_cpp_pop_file_buffer): Update declaration. - -2002-01-02 Eric Christopher - - * final.c (final_scan_insn): Change 0 -> NULL_RTX in - FIND_REG_INC_NOTE call. Update copyright. - * loop.c (canonicalize_condition): Ditto. - * reorg.c (delete_scheduled_jump): Ditto. - -2002-01-03 Kazu Hirata - - * gcse.c: Fix formatting. - -2002-01-03 Graham Stott - - * mkconfig.sh: Output to config.h, hconfig.h and tconfig.h - forward defs for struct tags rtx_def, union_tree, rtvec_def - also output corresponding typedefs for rtx, tree, and rtvec. - - * system.h: Move forward defs for struct tags rtx_def, union_tree, - rtvec_def along with corresponding typedefs for rtx, tree, and - rtvec to config.h, hconfig.h, tconfig.h. - -2002-01-03 Graham Stott - - * tree.h: Update copyright date. - (IS_EXPR_CODE_CLASS): Add parenthesis. - (TREE_SET_CODE): Add whitespace. - (TREE_CHECK): Add parenthesis. - (TREE_CLASS_CODE): Add parenthesis and wrap long line. - (CST_OR_CONSTRUCTOR_CHECK): - (EXPR_CHECK): Add parenthis, whitespace and wrap line. - (TREE_SYMBOL_REFERENCED): Whitespace. - (INT_CST_LT): Likewise. - (INT_CST_LT_UNSIGNED): Likewise. - (tree_real_cst): Unwrap comment. - (tree_string): Likewise. - (tree_complex): Likewise. - (IDENTIFIER_POINTER): correct cast. - (SAVE_EXPR_CONTEXT): Whitespace. - (EXPR_WFL_FILENAME_NODE): Likewise. - (EXPR_WFL_FILENAME): Remove parenthesis. - (DECL_ORIGIN): Add parenthesis. - (DECL_FROM_INLINE): Use NULL_TREE. - (build_int_2): Whitespace. - (build_type_variant): Add parenthesis. - - * gcc/jcf-parse.c: Update copyright date. - (yyparse): Constify resource_filename. - -2002-01-03 Graham Stott - - * rtl.h: Update copyright date. - (RTL_CHECK1): Wrap long line. - (RTL_CHECK2): Likewise. - (RTL_CHECKC1): Wrap long line and whitespace. - (RTL_CHECKC2): Likewise. - (XWINT): Whitespace. - (XINT): Likewise. - (XSTR): Likewise. - (XEXP): Likewise. - (XVEC): Likewise. - (XMODE): Likewise. - (XBITMAP): Likewise. - (XTREE): Likewise. - (XBBDEF): Likewise. - (XTMPL): Likewise. - (X0WINT): Likewise. - (X0INT):Likewise. - (X0UINT): Likewise. - (X0STR): Likewise. - (X0EXP): Likewise. - (X0VEC): Likewise. - (X0MODE): Likewise. - (X0BITMAP): Likewise. - (X0TREE): Likewise. - (X0BBDEF): Likewise. - (X0ADVFLAGS): Likewise. - (X0CSELIB): Likewise. - (X0MEMATTR): Likewise. - (XCWINT): Likewise. - (XCINT): Likewise. - (XCUINT): Likewise. - (XCSTR): Likewise. - (XCEXP): Likewise. - (XCVEC): Likewise. - (XCMODE): Likewise. - (XCBITMAP): Likewise. - (XCTREE): Likewise. - (XCBBDEF): Likewise. - (XCADVFLAGS): Likewise. - (XCCSELIB): Likewise. - (XC2EXP): Likewise. - (INSN_UID): Likewise. - (PREV_INSN): Likewise. - (PATTERN): Likewise. - (INSN_CODE): Likewise. - (PUT_REG_NOTE_KIND): Likewise. - (CODE_LABEL_NUMBER): Likewise. - (NOTE_SOURCE_FILE): Likewise. - (NOTE_BLOCK): Likewise. - (NOTE_EH_HANDLER): Likewise. - (NOTE_RANGE_INFO): Likewise. - (NOTE_LIVE_INFO): Likewise. - (NOTE_BASIC_BLOCK): Likewise. - (NOTE_EXPECTED_VALUE): Likewise. - (NOTE_LINE_NUMBER): Likewise. - (LABEL_NAME): Likewise. - (LABEL_NUSES): Likewise. - (LABEL_ALTERNATE_NAME): Likewise. - (ADDRESSOF_DECL): Likewise. - (JUMP_LABEL): Likewise. - (LABEL_NEXTREF): Likewise. - (REGNO): Likewise. - (ORIGINAL_REGNO: Likewise. - (HARD_REGISTER_NUM_P): Add parenthesis. - (SUBREG_REG): Whitespace. - (SUBREG_BYTE): Likewise. - (ASM_OPERANDS_TEMPLATE): Remove parenthesis. - (ASM_OPERANDS_OUTPUT_CONSTRAINT): Likewise. - (ASM_OPERANDS_OUTPUT_IDX): Likewise. - (ASM_OPERANDS_INPUT_VEC): Likewise. - (ASM_OPERANDS_INPUT_CONSTRAINT_VEC): Likewise. - (ASM_OPERANDS_INPUT): Likewise. - (ASM_OPERANDS_INPUT_LENGTH): Likewise. - (ASM_OPERANDS_INPUT_CONSTRAINT_EXP): Likewise. - (ASM_OPERANDS_INPUT_CONSTRAINT): Likewise. - (ASM_OPERANDS_INPUT_MODE): Likewise. - (ASM_OPERANDS_SOURCE_FILE): Likewise. - (ASM_OPERANDS_SOURCE_LINE): Likewise. - (MEM_SET_IN_STRUCT_P): Minor reformat. - (TRAP_CONDITION): Whitespace. - (TRAP_CODE): Likewise. - (COND_EXEC_TEST): Likewise. - (COND_EXEC_CODE): Likewise. - (FIND_REG_INC_NOTE): Uppercase macro args and add parenthesis. - (PHI_NODE_P): Add parenthesis. - (plus_constant): Whitespace and add parenthesis. - -2002-01-03 Kazu Hirata - - * config/avr/avr.c: Fix comment typos. - * config/c4x/c4x.md: Likewise. - * config/dsp16xx/dsp16xx.h: Likewise. - * config/dsp16xx/dsp16xx.md: Likewise. - * config/i386/i386.md: Likewise. - * config/ia64/ia64.c: Likewise. - * config/m32r/m32r.h: Likewise. - * config/m68hc11/m68hc11.md: Likewise. - * config/mmix/mmix.c: Likewise. - * config/mn10200/mn10200.c: Likewise. - * config/romp/romp.c: Likewise. - * config/sh/sh.c: Likewise. - * config/stormy16/stormy16.c: Likewise. - * config/stormy16/stormy16.h: Likewise. - * config/stormy16/stormy16.md: Likewise. - -2002-01-03 Graham Stott - - * loop.h: Update copyright date. - (LOOP_MOVABLES): Fix typo. - (LOOP_REGS): Likewise. - (LOOP_IVS): Likewise. - -2002-01-03 Graham Stott - - * cppinit.c: Update copyright date. - Don't include output.h - * Makefile.in: Update copyright date. - Update dependency. - -2002-01-02 Craig Rodrigues - - PR c/5226 - * invoke.texi (-mthreads): Remove from documented RS/6000 options. - (-pthread) Add to RS/6000 options. - -2002-01-02 Kazu Hirata - - * except.c: Fix comment typos. - * loop.c: Likewise. - * varasm.c: Likewise. - * doc/tm.texi: Fix a typo. - -2002-01-02 Jakub Jelinek - - * c-typeck.c (output_init_element): Allow initializing static storage - duration objects with compound literals. - -2002-01-02 Richard Henderson - - * objc/objc-act.c (hack_method_prototype): Clear current_function_decl - after abusing it. - -2002-01-02 Kaveh R. Ghazi - - * gcc.c (default_compilers): Const-ify. - * mips-tdump.c (stab_names): Likewise. - * mips-tfile.c (map_coff_types, map_coff_storage, - map_coff_sym_type, map_coff_derived_type, stabs_symbol, - pseudo_ops_t, pseudo_ops): Likewise. - * protoize.c (default_include): Likewise - - * real.c (GET_REAL, PUT_REAL): Don't cast away const-ness. - (ezero, ehalf, eone, etwo, e32, elog2, esqrt2, epi): Const-ify. - Add array size in declaration. - (endian, emov, eisneg, eisinf, eisnan, eiisnan, eiisneg, emovi, - emovo, emovz, eiisinf, ecmpm, eaddm, esubm, m16m, edivm, emulm, - esub, eadd, eadd1, ediv, emul, e53toe, e64toe, e113toe, e24toe, - etoe113, etoe64, etoe53, etoe24, ecmp, eround, ltoe, ultoe, - eifrac, euifrac, e24toasc, e53toasc, e64toasc, e113toasc, etoasc, - efloor, efrexp, eldexp, eremain, dectoe, etodec, ibmtoe, etoibm, - c4xtoe, etoc4x, uditoe, ditoe, etoudi, etodi, esqrt, etens, - emtens, make_nan): Const-ify. - (TFbignan, TFlittlenan, XFbignan, XFlittlenan, DFbignan, - DFlittlenan, SFbignan, SFlittlenan): Make static and const-ify. - -2002-01-02 Joseph S. Myers - - * config.gcc (ia64-*-*): Set extra_headers. - (alpha*-dec-osf*): Likewise. Don't use alpha/t-osf. - * config/alpha/t-osf: Remove. - * config/ia64/t-ia64 (EXTRA_HEADERS): Remove. - -2002-01-02 David Edelsohn - - * config/rs6000/t-aix43: Revert previous change. - -2002-01-02 Jason Merrill - - * c-decl.c (c_expand_body): Call outlining_inline_function when - emitting an inline function out of line. - -2002-01-02 Richard Henderson - - * dwarf2out.c (limbo_die_node): Add created_for member. - (new_die): New argument created_for. Update all callers. - (mark_limbo_die_list): New. - (dwarf2out_init): Register limbo_die_list as a root. - (dwarf2out_finish): Force insert limbo dies into their function - context. - -2002-01-02 Nathan Sidwell - - PR c++/5089 - * doc/invoke.texi (-Wold-style-cast): Only warn about non-void casts. - -2002-01-02 Kazu Hirata - - * config/h8300/fixunssfsi.c: Update copyright. - Fix comment typos. - Fix formatting. - * config/h8300/h8300.c: Update copyright. - Eliminate warnings. - -2002-01-02 Kazu Hirata - - * config/romp/romp.c: Fix comment formatting. - * config/romp/romp.h: Likewise. - * config/romp/romp.md: Likewise. - * config/s390/s390.c: Likewise. - * config/stormy16/stormy16.c: Likewise. - * config/stormy16/stormy16.h: Likewise. - -2002-01-02 Alexandre Oliva - - * c-common.h (genrtl_expr_stmt_value): Declare. - * c-semantics.c (genrtl_goto_stmt): Redirect to... - (genrtl_goto_stmt_value): ... this new function. Pass new - argument down to expand_expr_stmt_value, taking - TREE_ADDRESSABLE into account. - * c-common.c (c_expand_expr): Mark the last EXPR_STMT of a - STMT_EXPR as addressable, i.e., one whose result we want. - * expr.c (expand_expr): Don't save expression statement value - of labeled_blocks or loop_exprs. - * stmt.c (expand_expr_stmt): Redirect to... - (expand_expr_stmt_value): ... this new function. Use new - argument to tell whether to save expression value. - (expand_end_stmt_expr): Reset last_expr_type and - last_expr_value if we don't have either. - * tree-inline.c (declare_return_variable): Mark its use - statement as addressable. - * tree.h: Document new use of TREE_ADDRESSABLE. - (expand_expr_stmt_value): Declare. - -2002-01-01 Tom Rix - - * config/rs6000/rs6000.c (rs6000_emit_set_long_const): Fix for use by - rs6000_emit_allocate_stack. - -2002-01-01 Joseph S. Myers - - * configure.in: Prepend ${srcdir}/config/${cpu_type}/ instead of - ${srcdir}/ginclude/ to every entry in extra_headers. - * configure: Regenerate. - * ginclude/math-3300.h: Rename to config/m68k/math-3300.h. - * ginclude/math-68881.h: Rename to config/m68k/math-68881.h. - * ginclude/ppc-asm.h: Rename to config/rs6000/ppc-asm.h. - * ginclude/proto.h: Rename to config/convex/proto.h. - -Tue Jan 1 17:12:56 2002 Richard Kenner - - * attribs.c (handle_vector_size_attribute): Use host_integerp - and tree_int_cst; remove warnings. - * caller-save.c (insert_restore): Add cast to get rid of warning. - (insert_save): Likewise. - * emit-rtl.c (adjust_address_1, offset_address): Likewise. - * regmove.c (find_matches): Add temporary var to kill a warning. - -2002-01-01 Douglas B Rupp - - * config/alpha/vms.h (DWARF2_UNWIND_INFO, EH_RETURN_HANDLER_RTX, - LINK_EH_SPEC, MD_FALLBACK_FRAME_STATE_FOR): Define. - * config/alpha/t-vms (EXTRA_PARTS): Add vms-dwarf2eh.o - (vms-dwarf2eh.o): Add Makefile rule. - * config/alpha/vms-ld.c (main): Handle vms-dwarf2eh.o. - * config/alpha/vms-dwarf2eh.asm: New file. - - * gcc.c (delete_if_ordinary): Delete all versions. - -2002-01-01 Hans-Peter Nilsson - - * config/mmix/mmix.md: Update FIXME to not mention - define_constants. - (MMIX_rJ_REGNUM): New define_constants constant. - ("movqi", "movsi", "movdi", "*movdicc_real_foldable", - "*movdicc_real"): Adjust contraints formatting. - ("*bCC_foldable"): Add %+ for P in output format and delete FIXME - for branch prediction. - ("*bCC", "*bCC_inverted_foldable", "*bCC_inverted"): Add %+ in - output template. - ("*call_real", "*call_value_real", "nonlocal_goto_receiver", - "*nonlocal_goto_receiver_expanded"): Use MMIX_rJ_REGNUM instead of - number. Delete related FIXMEs. - * config/mmix/mmix.h (MMIX_INCOMING_RETURN_ADDRESS_REGNUM): Change - from number to MMIX_rJ_REGNUM. - (TARGET_MASK_BRANCH_PREDICT): New. - (TARGET_DEFAULT): Change to TARGET_MASK_BRANCH_PREDICT. - (TARGET_SWITCHES): Update comment. Correct -mno-toplevel-symbols - value. Add -mbranch-predict and -mno-branch-predict. - (TARGET_VERSION): Drop date. - (ADDITIONAL_REGISTER_NAMES): Use MMIX_rJ_REGNUM, not number. - * config/mmix/mmix.c (mmix_encode_section_info): Correct condition - for finding out global symbols. - (mmix_asm_output_labelref): Revert condition for global symbol. - (mmix_print_operand): : Emit P for a likely branch. - (mmix_print_operand_punct_valid_p): A '+' is valid. - -See ChangeLog.6 for earlier changes. +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 5cd3fdb47d95..4ed06520ca47 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 05305362c0d7..ef67034a5969 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 e49d764994ae..a7cff363cd6c 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 c3a4461d4af0..067d9adb68f8 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 129c1f9f5c5b..ac0f7e0ffd09 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 40eccd1ef84e..9bd21c1a544f 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 d0e9a233be58..5618eaa29e2d 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 000000000000..dc7282b839c9 --- /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 0fea5530d8c0..e7ae6c5af0a2 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 38de90cfe2ec..1e80eab580ca 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 8bc51568eee0..d1e07198e642 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 e7c29b9e55a1..75e4d038af17 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) +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, enquire, and crt*.o. +# 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) + 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) -$(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) +$(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) -$(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) +$(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) -$(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) +$(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 4d4b54b65c13..f4b358102ee7 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. ---------------------------------------- +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 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. - -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 d69c3869b3fe..04638b2a00cd 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 0c4b5c638d0b..b634e06d384e 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 +#include -#if !defined (MAP_ANONYMOUS) && defined (MAP_ANON) -# define MAP_ANONYMOUS MAP_ANON +#ifndef MAP_ANONYMOUS +#define MAP_ANONYMOUS MAP_ANON #endif +], +[int n = MAP_ANONYMOUS;], + gcc_cv_decl_map_anon=yes, + gcc_cv_decl_map_anon=no)]) -/* 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; - -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); -#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.]) + 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 -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).]) -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 db9dc07ed9ee..4fa4f5c46940 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 (! x) + return 0; - if (GET_RTX_CLASS (code) == 'i') - { - /* Constant functions can be constant if they don't use - scratch memory used to mark function w/o side effects. */ - if (code == CALL_INSN && CONST_OR_PURE_CALL_P (x)) - { - x = CALL_INSN_FUNCTION_USAGE (x); - if (x == 0) - return 0; - } - else - x = PATTERN (x); - code = GET_CODE (x); - } - - switch (code) + 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 9a7c5777ff2e..f8f2d737bf0a 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 47b7cf21bf79..c5a8a73026b7 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 aa78b451a3b1..1829fdebed24 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 b0cc46215ea6..857e0fbc6ec3 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 786689b4ad52..917e87bb0232 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) + if (head->using_obstack) { - 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) + 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 8925d86b2100..85f8239cce75 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))) + 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 alloca. Note alloca cannot be passed as an - argument to a function, so we set a temporary variable to the value - returned by alloca and pass that variable to bitmap_initialize(). - PTR is then set to the value returned from bitmap_initialize() to - avoid having it appear more than once in case it has side effects. */ -#define BITMAP_ALLOCA(PTR) \ -do { \ - bitmap temp_bitmap_ = (bitmap) alloca (sizeof (bitmap_head)); \ - (PTR) = bitmap_initialize (temp_bitmap_); \ -} while (0) - /* Allocate a bitmap with xmalloc. */ #define BITMAP_XMALLOC() \ - bitmap_initialize ((bitmap) xmalloc (sizeof (bitmap_head))) + 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 10b370893e2e..7bdbd6280865 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 -DEF_ATTR_IDENT (ATTR_PRINTF, "printf") -DEF_ATTR_IDENT (ATTR_SCANF, "scanf") -DEF_ATTR_IDENT (ATTR_STRFTIME, "strftime") -DEF_ATTR_IDENT (ATTR_STRFMON, "strfmon") - +/* Construct tress for identifiers. */ +DEF_ATTR_IDENT (ATTR_CONST, "const") DEF_ATTR_IDENT (ATTR_FORMAT, "format") DEF_ATTR_IDENT (ATTR_FORMAT_ARG, "format_arg") +DEF_ATTR_IDENT (ATTR_MALLOC, "malloc") +DEF_ATTR_IDENT (ATTR_NONNULL, "nonnull") +DEF_ATTR_IDENT (ATTR_NORETURN, "noreturn") +DEF_ATTR_IDENT (ATTR_NOTHROW, "nothrow") +DEF_ATTR_IDENT (ATTR_PRINTF, "printf") +DEF_ATTR_IDENT (ATTR_PURE, "pure") +DEF_ATTR_IDENT (ATTR_SCANF, "scanf") +DEF_ATTR_IDENT (ATTR_STRFMON, "strfmon") +DEF_ATTR_IDENT (ATTR_STRFTIME, "strftime") + +DEF_ATTR_TREE_LIST (ATTR_NOTHROW_LIST, ATTR_NOTHROW, ATTR_NULL, ATTR_NULL) + +DEF_ATTR_TREE_LIST (ATTR_CONST_NOTHROW_LIST, ATTR_CONST, \ + ATTR_NULL, ATTR_NOTHROW_LIST) +DEF_ATTR_TREE_LIST (ATTR_PURE_NOTHROW_LIST, ATTR_PURE, \ + ATTR_NULL, ATTR_NOTHROW_LIST) +DEF_ATTR_TREE_LIST (ATTR_NORETURN_NOTHROW_LIST, ATTR_NORETURN, \ + ATTR_NULL, ATTR_NOTHROW_LIST) +DEF_ATTR_TREE_LIST (ATTR_MALLOC_NOTHROW_LIST, ATTR_MALLOC, \ + ATTR_NULL, ATTR_NOTHROW_LIST) + +DEF_ATTR_TREE_LIST (ATTR_NONNULL_1, ATTR_NONNULL, ATTR_LIST_1, \ + ATTR_NOTHROW_LIST) +DEF_ATTR_TREE_LIST (ATTR_NONNULL_2, ATTR_NONNULL, ATTR_LIST_2, \ + ATTR_NOTHROW_LIST) +DEF_ATTR_TREE_LIST (ATTR_NONNULL_3, ATTR_NONNULL, ATTR_LIST_3, \ + ATTR_NOTHROW_LIST) /* Construct a tree for a format attribute. */ -#define DEF_FORMAT_ATTRIBUTE(TYPE, 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 c594bd2d1231..d5c39b4b8252 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 d8874d6a1473..4c5650a88f31 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 c6f6dc426f9c..c208b7516291 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) + 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_UNUSED_BUILTIN(BUILT_IN_GETEXP) -DEF_UNUSED_BUILTIN(BUILT_IN_GETMAN) +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) + BT_FN_VOID_CONST_PTR_VAR, + ATTR_NULL) + +/* stdio.h builtins (without FILE *). */ -/* Stdio builtins. */ -DEF_FALLBACK_BUILTIN(BUILT_IN_PUTCHAR, - "__builtin_putchar", - BT_FN_INT_INT) -DEF_FALLBACK_BUILTIN(BUILT_IN_PUTS, - "__builtin_puts", - BT_FN_INT_CONST_STRING) DEF_FRONT_END_LIB_BUILTIN(BUILT_IN_PRINTF, "__builtin_printf", - BT_FN_INT_CONST_STRING_VAR) -DEF_FALLBACK_BUILTIN(BUILT_IN_FPUTC, - "__builtin_fputc", - BT_FN_INT_INT_PTR) + 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) + BT_FN_INT_INT, + ATTR_NULL) -DEF_GCC_BUILTIN(BUILT_IN_VARARGS_START, - "__builtin_varargs_start", - BT_FN_VOID_VALIST_REF) -DEF_GCC_BUILTIN(BUILT_IN_STDARG_START, +/* 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 67ecae6cea17..761fa848606b 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 3511f157d0e8..b40a35aecb54 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,6 +1212,112 @@ combine_strings (strings) TREE_STATIC (value) = 1; return value; } + +/* Given a VARRAY of STRING_CST nodes, concatenate them into one + STRING_CST. */ + +tree +combine_strings (strings) + varray_type strings; +{ + const int wchar_bytes = TYPE_PRECISION (wchar_type_node) / BITS_PER_UNIT; + const int nstrings = VARRAY_ACTIVE_SIZE (strings); + tree value, t; + int length = 1; + int wide_length = 0; + int wide_flag = 0; + int i; + char *p, *q; + + /* Don't include the \0 at the end of each substring. Count wide + strings and ordinary strings separately. */ + for (i = 0; i < nstrings; ++i) + { + t = VARRAY_TREE (strings, i); + + if (TREE_TYPE (t) == wchar_array_type_node) + { + wide_length += TREE_STRING_LENGTH (t) - wchar_bytes; + wide_flag = 1; + } + else + { + length += (TREE_STRING_LENGTH (t) - 1); + if (C_ARTIFICIAL_STRING_P (t) && !in_system_header) + warning ("concatenation of string literals with __FUNCTION__ is deprecated"); + } + } + + /* If anything is wide, the non-wides will be converted, + which makes them take more space. */ + if (wide_flag) + length = length * wchar_bytes + wide_length; + + p = xmalloc (length); + + /* Copy the individual strings into the new combined string. + If the combined string is wide, convert the chars to ints + for any individual strings that are not wide. */ + + q = p; + for (i = 0; i < nstrings; ++i) + { + int len, this_wide; + + t = VARRAY_TREE (strings, i); + this_wide = TREE_TYPE (t) == wchar_array_type_node; + len = TREE_STRING_LENGTH (t) - (this_wide ? wchar_bytes : 1); + if (this_wide == wide_flag) + { + memcpy (q, TREE_STRING_POINTER (t), len); + q += len; + } + else + { + const int nzeros = (TYPE_PRECISION (wchar_type_node) + / BITS_PER_UNIT) - 1; + int j, k; + + if (BYTES_BIG_ENDIAN) + { + for (k = 0; k < len; k++) + { + for (j = 0; j < nzeros; j++) + *q++ = 0; + *q++ = TREE_STRING_POINTER (t)[k]; + } + } + else + { + for (k = 0; k < len; k++) + { + *q++ = TREE_STRING_POINTER (t)[k]; + for (j = 0; j < nzeros; j++) + *q++ = 0; + } + } + } + } + + /* Nul terminate the string. */ + if (wide_flag) + { + for (i = 0; i < wchar_bytes; i++) + *q++ = 0; + } + else + *q = 0; + + value = build_string (length, p); + free (p); + + if (wide_flag) + TREE_TYPE (value) = wchar_array_type_node; + else + TREE_TYPE (value) = char_array_type_node; + + return value; +} static int is_valid_printf_arglist PARAMS ((tree)); static rtx c_expand_builtin PARAMS ((tree, rtx, enum machine_mode, enum expand_modifier)); @@ -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) { - type = TREE_TYPE (type); - code = TREE_CODE (type); + if (op == SIZEOF_EXPR) + { + if (complain && (pedantic || warn_pointer_arith)) + pedwarn ("invalid application of `sizeof' to a function type"); + value = size_one_node; + } + else + value = size_int (FUNCTION_BOUNDARY / BITS_PER_UNIT); + } + else if (type_code == VOID_TYPE || type_code == ERROR_MARK) + { + if (type_code == VOID_TYPE + && complain && (pedantic || warn_pointer_arith)) + pedwarn ("invalid application of `%s' to a void type", op_name); + value = size_one_node; } - - 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. */ - -enum built_in_attribute +/* Define NAME with value TYPE precision. */ +static void +builtin_define_type_precision (name, type) + const char *name; + 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 -}; - -static tree built_in_attributes[(int) ATTR_LAST]; - -static bool c_attrs_initialized = false; - -static void c_init_attributes PARAMS ((void)); - -/* Common initialization before parsing options. */ -void -c_common_init_options (lang) - enum c_language_kind lang; -{ - c_language = lang; - parse_in = cpp_create_reader (lang == clk_c ? CLK_GNUC89: - lang == clk_cplusplus ? CLK_GNUCXX: CLK_OBJC); - - /* Mark as "unspecified" (see c_common_post_options). */ - flag_bounds_check = -1; + builtin_define_with_int_value (name, TYPE_PRECISION (type)); } -/* Post-switch processing. */ -void -c_common_post_options () +/* 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; { - cpp_post_options (parse_in); + /* Used to convert radix-based values to base 10 values in several cases. - flag_inline_trees = 1; + 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. */ - /* 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) + 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) { - if (!flag_no_inline) - flag_no_inline = 1; - if (flag_inline_functions) - { - flag_inline_trees = 2; - flag_inline_functions = 0; - } + sprintf (buf, "0x1p%d", (fmt->emin - fmt->p) * fmt->log2_b); + builtin_define_with_hex_fp_value (name, type, decimal_dig, + buf, fp_suffix); + } + else + { + sprintf (buf, "0.0%s", fp_suffix); + builtin_define_with_value (name, buf, 0); + } +} + +/* Hook that registers front end and target-specific built-ins. */ +void +cb_register_builtins (pfile) + cpp_reader *pfile; +{ + /* -undef turns off target-specific built-ins. */ + if (flag_undef) + return; + + if (c_language == clk_cplusplus) + { + if (SUPPORTS_ONE_ONLY) + cpp_define (pfile, "__GXX_WEAK__=1"); + else + cpp_define (pfile, "__GXX_WEAK__=0"); + if (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"); + + if (flag_iso) + cpp_define (pfile, "__STRICT_ANSI__"); + + if (!flag_signed_char) + cpp_define (pfile, "__CHAR_UNSIGNED__"); + + if (c_language == clk_cplusplus && TREE_UNSIGNED (wchar_type_node)) + cpp_define (pfile, "__WCHAR_UNSIGNED__"); + + /* Make the choice of ObjC runtime visible to source code. */ + if (flag_objc && flag_next_runtime) + cpp_define (pfile, "__NEXT_RUNTIME__"); + + /* A straightforward target hook doesn't work, because of problems + linking that hook's body when part of non-C front ends. */ +# define preprocessing_asm_p() (cpp_get_options (pfile)->lang == CLK_ASM) +# define preprocessing_trad_p() (cpp_get_options (pfile)->traditional) +# define builtin_define(TXT) cpp_define (pfile, TXT) +# define builtin_assert(TXT) cpp_assert (pfile, TXT) + TARGET_CPU_CPP_BUILTINS (); + TARGET_OS_CPP_BUILTINS (); +} + +/* Pass an object-like macro. If it doesn't lie in the user's + namespace, defines it unconditionally. Otherwise define a version + with two leading underscores, and another version with two leading + and trailing underscores, and define the original only if an ISO + standard was not nominated. + + e.g. passing "unix" defines "__unix", "__unix__" and possibly + "unix". Passing "_mips" defines "__mips", "__mips__" and possibly + "_mips". */ +void +builtin_define_std (macro) + const char *macro; +{ + size_t len = strlen (macro); + char *buff = alloca (len + 5); + char *p = buff + 2; + char *q = p + len; + + /* prepend __ (or maybe just _) if in user's namespace. */ + memcpy (p, macro, len + 1); + if (!( *p == '_' && (p[1] == '_' || ISUPPER (p[1])))) + { + if (*p != '_') + *--p = '_'; + if (p[1] != '_') + *--p = '_'; + } + cpp_define (parse_in, p); + + /* If it was in user's namespace... */ + if (p != buff + 2) + { + /* Define the macro with leading and following __. */ + if (q[-1] != '_') + *q++ = '_'; + if (q[-2] != '_') + *q++ = '_'; + *q = '\0'; + cpp_define (parse_in, p); + + /* Finally, define the original macro if permitted. */ + if (!flag_iso) + cpp_define (parse_in, macro); + } +} + +/* Pass an object-like macro and a value to define it to. The third + parameter says whether or not to turn the value into a string + constant. */ +static void +builtin_define_with_value (macro, expansion, is_str) + const char *macro; + const char *expansion; + int is_str; +{ + char *buf; + size_t mlen = strlen (macro); + size_t elen = strlen (expansion); + size_t extra = 2; /* space for an = and a NUL */ + + if (is_str) + extra += 2; /* space for two quote marks */ + + buf = alloca (mlen + elen + extra); + if (is_str) + sprintf (buf, "%s=\"%s\"", macro, expansion); + else + sprintf (buf, "%s=%s", macro, expansion); + + cpp_define (parse_in, buf); +} + +/* Pass an object-like macro and an integer value to define it to. */ +static void +builtin_define_with_int_value (macro, value) + const char *macro; + HOST_WIDE_INT value; +{ + char *buf; + size_t mlen = strlen (macro); + size_t vlen = 18; + size_t extra = 2; /* space for = and NUL. */ + + buf = alloca (mlen + vlen + extra); + memcpy (buf, macro, mlen); + buf[mlen] = '='; + sprintf (buf + mlen + 1, HOST_WIDE_INT_PRINT_DEC, value); + + cpp_define (parse_in, buf); +} + +/* Pass an object-like macro a hexadecimal floating-point value. */ +static void +builtin_define_with_hex_fp_value (macro, type, digits, hex_str, fp_suffix) + const char *macro; + tree type ATTRIBUTE_UNUSED; + int digits; + const char *hex_str; + const char *fp_suffix; +{ + REAL_VALUE_TYPE real; + char dec_str[64], buf[256]; + + /* Hex values are really cool and convenient, except that they're + not supported in strict ISO C90 mode. First, the "p-" sequence + is not valid as part of a preprocessor number. Second, we get a + pedwarn from the preprocessor, which has no context, so we can't + suppress the warning with __extension__. + + So instead what we do is construct the number in hex (because + it's easy to get the exact correct value), parse it as a real, + then print it back out as decimal. */ + + real_from_string (&real, hex_str); + real_to_decimal (dec_str, &real, sizeof (dec_str), digits, 0); + + sprintf (buf, "%s=%s%s", macro, dec_str, fp_suffix); + cpp_define (parse_in, buf); +} + +/* Define MAX for TYPE based on the precision of the type. IS_LONG is + 1 for type "long" and 2 for "long long". We have to handle + unsigned types, since wchar_t might be unsigned. */ + +static void +builtin_define_type_max (macro, type, is_long) + const char *macro; + tree type; + int is_long; +{ + static const char *const values[] + = { "127", "255", + "32767", "65535", + "2147483647", "4294967295", + "9223372036854775807", "18446744073709551615", + "170141183460469231731687303715884105727", + "340282366920938463463374607431768211455" }; + static const char *const suffixes[] = { "", "U", "L", "UL", "LL", "ULL" }; + + const char *value, *suffix; + char *buf; + size_t idx; + + /* Pre-rendering the values mean we don't have to futz with printing a + multi-word decimal value. There are also a very limited number of + precisions that we support, so it's really a waste of time. */ + switch (TYPE_PRECISION (type)) + { + case 8: idx = 0; break; + case 16: idx = 2; break; + case 32: idx = 4; break; + case 64: idx = 6; break; + case 128: idx = 8; break; + default: abort (); } - /* If still "unspecified", make it match -fbounded-pointers. */ - if (flag_bounds_check == -1) - flag_bounds_check = flag_bounded_pointers; + value = values[idx + TREE_UNSIGNED (type)]; + suffix = suffixes[is_long * 2 + TREE_UNSIGNED (type)]; - /* 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"); + buf = alloca (strlen (macro) + 1 + strlen (value) + strlen (suffix) + 1); + sprintf (buf, "%s=%s%s", macro, value, suffix); - /* If an error has occurred in cpplib, note it so we fail - immediately. */ - errorcount += cpp_errors (parse_in); -} - -/* Front end initialization common to C, ObjC and C++. */ -const char * -c_common_init (filename) - const char *filename; -{ - /* Do this before initializing pragmas, as then cpplib's hash table - has been set up. */ - filename = init_c_lex (filename); - - init_pragma (); - - if (!c_attrs_initialized) - c_init_attributes (); - - return filename; -} - -/* Common finish hook for the C, ObjC and C++ front ends. */ -void -c_common_finish () -{ - cpp_finish (parse_in); - - /* For performance, avoid tearing down cpplib's internal structures. - Call cpp_errors () instead of cpp_destroy (). */ - errorcount += cpp_errors (parse_in); + 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 7ad9e385229a..802238a65a2c 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 f5e46593b726..1f59ebd7d829 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; +/* C/ObjC language option variables. */ -/* Warn about functions which might be candidates for format attributes. */ -extern int warn_missing_format_attribute; +/* Nonzero means message about use of implicit function declarations; + 1 means warning; 2 means error. */ -/* Nonzero means warn about sizeof (function) or addition/subtraction - of function pointers. */ +extern int mesg_implicit_function_declaration; -extern int warn_pointer_arith; +/* Nonzero means allow type mismatches in conditional expressions; + just make their values `void'. */ -/* Nonzero means to warn about compile-time division by zero. */ -extern int warn_div_by_zero; - -/* Nonzero means do some things the same way PCC does. */ - -extern int flag_traditional; +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 000000000000..c0a786f53fdf --- /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 947c79bcadb3..3634bbe44eaf 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 2c8857fc4964..37b22a71ac3f 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) { - error ("unnamed fields of type other than struct or union are not allowed"); + if (flag_ms_extensions) + ; /* ok */ + else if (flag_iso) + goto warn_unnamed_field; + else if (TYPE_NAME (type) == NULL) + ; /* ok */ + else + goto warn_unnamed_field; + } + else + { + warn_unnamed_field: + warning ("declaration does not declare anything"); return NULL_TREE; } } @@ -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 000000000000..65407a507d5c --- /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 3f030f9a255f..1bd52a8ed6fd 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 658ca30f29d2..083e91278f86 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 2b7d4733f66f..8614e2500e5e 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 48b087e538e7..a60fbb0937e7 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) @@ -298,16 +290,6 @@ cb_file_change (pfile, new_map) warning ("badly nested C headers from preprocessor"); --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 (); @@ -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) + enum integer_type_kind itk; + + if ((flags & CPP_N_WIDTH) == CPP_N_SMALL) + itk = itk_unsigned_int; + else if ((flags & CPP_N_WIDTH) == CPP_N_MEDIUM) + itk = itk_unsigned_long; + else + itk = itk_unsigned_long_long; + + /* int_fits_type_p must think the type of its first argument is + wider than its second argument, or it won't do the proper check. */ + TREE_TYPE (value) = widest_unsigned_literal_type_node; + + for (; itk < itk_none; itk += 2 /* skip unsigned types */) + if (int_fits_type_p (value, integer_types[itk])) + return itk; + + return itk_none; +} + +/* Ditto, but narrowest signed type. */ +static enum integer_type_kind +narrowest_signed_type (value, flags) + tree value; + unsigned int flags; +{ + enum integer_type_kind itk; + + if ((flags & CPP_N_WIDTH) == CPP_N_SMALL) + itk = itk_int; + else if ((flags & CPP_N_WIDTH) == CPP_N_MEDIUM) + itk = itk_long; + else + itk = itk_long_long; + + /* int_fits_type_p must think the type of its first argument is + wider than its second argument, or it won't do the proper check. */ + TREE_TYPE (value) = widest_unsigned_literal_type_node; + + for (; itk < itk_none; itk += 2 /* skip signed types */) + if (int_fits_type_p (value, integer_types[itk])) + return itk; + + return itk_none; +} + +/* Interpret TOKEN, an integer with FLAGS as classified by cpplib. */ +static tree +interpret_integer (token, flags) + const cpp_token *token; + unsigned int flags; +{ + tree value, type; + enum integer_type_kind itk; + cpp_num integer; + cpp_options *options = cpp_get_options (parse_in); + + integer = cpp_interpret_integer (parse_in, token, flags); + integer = cpp_num_sign_extend (integer, options->precision); + value = build_int_2_wide (integer.low, integer.high); + + /* The type of a constant with a U suffix is straightforward. */ + if (flags & CPP_N_UNSIGNED) + itk = narrowest_unsigned_type (value, flags); + else { - if (*str == '0') - return integer_zero_node; - else if (*str == '1') - return integer_one_node; - else - return build_int_2 (*str - '0', 0); - } + /* 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); - 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"); + /* 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 { - int n; - /* It is not a decimal point. - It should be a digit (perhaps a hex digit). */ + /* 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. */ - if (ISDIGIT (c) - || (base == 16 && ISXDIGIT (c))) + itk = itk_s; + if (itk_s > itk_u && itk_s > itk_long) { - 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) + if (!flag_isoc99) { - parts[count] - += (parts[count-1] >> HOST_BITS_PER_CHAR); - parts[count-1] - &= (1 << HOST_BITS_PER_CHAR) - 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"); } - 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; + else if (warn_traditional) + warning ("this decimal constant would be unsigned in ISO C90"); } } } - while (p < str + len); - /* This can happen on input like `int i = 0x;' */ - if (numdigits == 0) - ERROR ("numeric constant with no digits"); + if (itk == itk_none) + /* cpplib has already issued a warning for overflow. */ + type = ((flags & CPP_N_UNSIGNED) + ? widest_unsigned_literal_type_node + : widest_integer_literal_type_node); + else + type = integer_types[itk]; - if (largest_digit >= base) - ERROR ("numeric constant contains digits beyond the radix"); + 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 (floatflag != NOT_FLOAT) + TREE_TYPE (value) = type; + + /* Convert imaginary to a complex type. */ + if (flags & CPP_N_IMAGINARY) + value = build_complex (NULL_TREE, convert (type, integer_zero_node), value); + + return value; +} + +/* Interpret TOKEN, a floating point number with FLAGS as classified + by cpplib. */ +static tree +interpret_float (token, flags) + const cpp_token *token; + unsigned int flags; +{ + tree type; + tree value; + REAL_VALUE_TYPE real; + char *copy; + size_t copylen; + const char *typename; + + /* FIXME: make %T work in error/warning, then we don't need typename. */ + if ((flags & CPP_N_WIDTH) == CPP_N_LARGE) { - tree type; - int imag, fflag, lflag, conversion_errno; - REAL_VALUE_TYPE real; - struct pf_args args; - char *copy; - - if (base == 16 && pedantic && !flag_isoc99) - pedwarn ("floating constant may not be in radix 16"); - - if (base == 16 && floatflag != AFTER_EXPON) - ERROR ("hexadecimal floating constant has no exponent"); - - /* Read explicit exponent if any, and put it in tokenbuf. */ - if ((base == 10 && ((c == 'e') || (c == 'E'))) - || (base == 16 && (c == 'p' || c == 'P'))) - { - if (p < str + len) - c = *p++; - if (p < str + len && (c == '+' || c == '-')) - c = *p++; - /* Exponent is decimal, even if string is a hex float. */ - if (! ISDIGIT (c)) - ERROR ("floating constant exponent has no digits"); - while (p < str + len && ISDIGIT (c)) - c = *p++; - if (! ISDIGIT (c)) - p--; - } - - /* Copy the float constant now; we don't want any suffixes in the - string passed to parse_float. */ - copy = alloca (p - str + 1); - memcpy (copy, str, p - str); - copy[p - str] = '\0'; - - /* Now parse suffixes. */ - fflag = lflag = imag = 0; - while (p < str + len) - switch (*p++) - { - case 'f': case 'F': - if (fflag) - ERROR ("more than one 'f' suffix on floating constant"); - else if (warn_traditional && !in_system_header - && ! cpp_sys_macro_p (parse_in)) - warning ("traditional C rejects the 'f' suffix"); - - fflag = 1; - break; - - case 'l': case 'L': - if (lflag) - ERROR ("more than one 'l' suffix on floating constant"); - else if (warn_traditional && !in_system_header - && ! cpp_sys_macro_p (parse_in)) - warning ("traditional C rejects the 'l' suffix"); - - lflag = 1; - break; - - case 'i': case 'I': - case 'j': case 'J': - if (imag) - ERROR ("more than one 'i' or 'j' suffix on floating constant"); - else if (pedantic) - pedwarn ("ISO C forbids imaginary numeric constants"); - imag = 1; - break; - - default: - ERROR ("invalid suffix on floating constant"); - } - - /* Setup input for parse_float() */ - args.str = copy; - args.fflag = fflag; - args.lflag = lflag; - args.base = base; - - /* Convert string to a double, checking for overflow. */ - if (do_float_handler (parse_float, (PTR) &args)) - { - /* Receive output from parse_float() */ - real = args.value; - } - else - /* We got an exception from parse_float() */ - ERROR ("floating constant out of range"); - - /* Receive output from parse_float() */ - conversion_errno = args.conversion_errno; - type = args.type; - -#ifdef ERANGE - /* ERANGE is also reported for underflow, - so test the value to distinguish overflow from that. */ - if (conversion_errno == ERANGE && !flag_traditional && pedantic - && (REAL_VALUES_LESS (dconst1, real) - || REAL_VALUES_LESS (real, dconstm1))) - warning ("floating point number exceeds range of 'double'"); -#endif - - /* Create a node with determined type and value. */ - if (imag) - value = build_complex (NULL_TREE, convert (type, integer_zero_node), - build_real (type, real)); - else - value = build_real (type, real); + 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 { - tree trad_type, ansi_type, type; - HOST_WIDE_INT high, low; - int spec_unsigned = 0; - int spec_long = 0; - int spec_long_long = 0; - int spec_imag = 0; - int suffix_lu = 0; - int warn = 0, i; - - trad_type = ansi_type = type = NULL_TREE; - while (p < str + len) - { - c = *p++; - switch (c) - { - case 'u': case 'U': - if (spec_unsigned) - error ("two 'u' suffixes on integer constant"); - else if (warn_traditional && !in_system_header - && ! cpp_sys_macro_p (parse_in)) - warning ("traditional C rejects the 'u' suffix"); - - spec_unsigned = 1; - if (spec_long) - suffix_lu = 1; - break; - - case 'l': case 'L': - if (spec_long) - { - if (spec_long_long) - error ("three 'l' suffixes on integer constant"); - else if (suffix_lu) - error ("'lul' is not a valid integer suffix"); - else if (c != spec_long) - error ("'Ll' and 'lL' are not valid integer suffixes"); - else if (pedantic && ! flag_isoc99 - && ! in_system_header && warn_long_long) - pedwarn ("ISO C89 forbids long long integer constants"); - spec_long_long = 1; - } - spec_long = c; - break; - - case 'i': case 'I': case 'j': case 'J': - if (spec_imag) - error ("more than one 'i' or 'j' suffix on integer constant"); - else if (pedantic) - pedwarn ("ISO C forbids imaginary numeric constants"); - spec_imag = 1; - break; - - default: - ERROR ("invalid suffix on integer constant"); - } - } - - /* If the literal overflowed, pedwarn about it now. */ - if (overflow) - { - warn = 1; - pedwarn ("integer constant is too large for this configuration of the compiler - truncated to %d bits", HOST_BITS_PER_WIDE_INT * 2); - } - - /* This is simplified by the fact that our constant - is always positive. */ - - high = low = 0; - - for (i = 0; i < HOST_BITS_PER_WIDE_INT / HOST_BITS_PER_CHAR; i++) - { - high |= ((HOST_WIDE_INT) parts[i + (HOST_BITS_PER_WIDE_INT - / HOST_BITS_PER_CHAR)] - << (i * HOST_BITS_PER_CHAR)); - low |= (HOST_WIDE_INT) parts[i] << (i * HOST_BITS_PER_CHAR); - } - - value = build_int_2 (low, high); - TREE_TYPE (value) = long_long_unsigned_type_node; - - /* If warn_traditional, calculate both the ISO type and the - traditional type, then see if they disagree. - Otherwise, calculate only the type for the dialect in use. */ - if (warn_traditional || flag_traditional) - { - /* Calculate the traditional type. */ - /* Traditionally, any constant is signed; but if unsigned is - specified explicitly, obey that. Use the smallest size - with the right number of bits, except for one special - case with decimal constants. */ - if (! spec_long && base != 10 - && int_fits_type_p (value, unsigned_type_node)) - trad_type = spec_unsigned ? unsigned_type_node : integer_type_node; - /* A decimal constant must be long if it does not fit in - type int. I think this is independent of whether the - constant is signed. */ - else if (! spec_long && base == 10 - && int_fits_type_p (value, integer_type_node)) - trad_type = spec_unsigned ? unsigned_type_node : integer_type_node; - else if (! spec_long_long) - trad_type = (spec_unsigned - ? long_unsigned_type_node - : long_integer_type_node); - else if (int_fits_type_p (value, - spec_unsigned - ? long_long_unsigned_type_node - : long_long_integer_type_node)) - trad_type = (spec_unsigned - ? long_long_unsigned_type_node - : long_long_integer_type_node); - else - trad_type = (spec_unsigned - ? widest_unsigned_literal_type_node - : widest_integer_literal_type_node); - } - if (warn_traditional || ! flag_traditional) - { - /* Calculate the ISO type. */ - if (! spec_long && ! spec_unsigned - && int_fits_type_p (value, integer_type_node)) - ansi_type = integer_type_node; - else if (! spec_long && (base != 10 || spec_unsigned) - && int_fits_type_p (value, unsigned_type_node)) - ansi_type = unsigned_type_node; - else if (! spec_unsigned && !spec_long_long - && int_fits_type_p (value, long_integer_type_node)) - ansi_type = long_integer_type_node; - else if (! spec_long_long - && int_fits_type_p (value, long_unsigned_type_node)) - ansi_type = long_unsigned_type_node; - else if (! spec_unsigned - && int_fits_type_p (value, long_long_integer_type_node)) - ansi_type = long_long_integer_type_node; - else if (int_fits_type_p (value, long_long_unsigned_type_node)) - ansi_type = long_long_unsigned_type_node; - else if (! spec_unsigned - && int_fits_type_p (value, widest_integer_literal_type_node)) - ansi_type = widest_integer_literal_type_node; - else - ansi_type = widest_unsigned_literal_type_node; - } - - type = flag_traditional ? trad_type : ansi_type; - - /* We assume that constants specified in a non-decimal - base are bit patterns, and that the programmer really - meant what they wrote. */ - if (warn_traditional && !in_system_header - && base == 10 && trad_type != ansi_type) - { - if (TYPE_PRECISION (trad_type) != TYPE_PRECISION (ansi_type)) - warning ("width of integer constant changes with -traditional"); - else if (TREE_UNSIGNED (trad_type) != TREE_UNSIGNED (ansi_type)) - warning ("integer constant is unsigned in ISO C, signed with -traditional"); - else - warning ("width of integer constant may change on other systems with -traditional"); - } - - if (pedantic && !flag_traditional && (flag_isoc99 || !spec_long_long) - && !warn - && ((flag_isoc99 - ? TYPE_PRECISION (long_long_integer_type_node) - : TYPE_PRECISION (long_integer_type_node)) < TYPE_PRECISION (type))) - { - warn = 1; - pedwarn ("integer constant larger than the maximum value of %s", - (flag_isoc99 - ? (TREE_UNSIGNED (type) - ? _("an unsigned long long int") - : _("a long long int")) - : _("an unsigned long int"))); - } - - if (base == 10 && ! spec_unsigned && TREE_UNSIGNED (type)) - warning ("decimal constant is so large that it is unsigned"); - - if (spec_imag) - { - if (TYPE_PRECISION (type) - <= TYPE_PRECISION (integer_type_node)) - value = build_complex (NULL_TREE, integer_zero_node, - convert (integer_type_node, value)); - else - ERROR ("complex integer constant is too wide for 'complex int'"); - } - else if (flag_traditional && !int_fits_type_p (value, type)) - /* The traditional constant 0x80000000 is signed - but doesn't fit in the range of int. - This will change it to -0x80000000, which does fit. */ - { - TREE_TYPE (value) = unsigned_type (type); - value = convert (type, value); - TREE_OVERFLOW (value) = TREE_CONSTANT_OVERFLOW (value) = 0; - } - else - TREE_TYPE (value) = type; - - /* If it's still an integer (not a complex), and it doesn't - fit in the type we choose for it, then pedwarn. */ - - if (! warn - && TREE_CODE (TREE_TYPE (value)) == INTEGER_TYPE - && ! int_fits_type_p (value, TREE_TYPE (value))) - pedwarn ("integer constant is larger than the maximum value for its type"); + 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; - } + int unsignedp; + + result = cpp_interpret_charconst (parse_in, token, + &chars_seen, &unsignedp); + + /* Cast to cppchar_signed_t to get correct sign-extension of RESULT + before possibly widening to HOST_WIDE_INT for build_int_2. */ + if (unsignedp || (cppchar_signed_t) result >= 0) + value = build_int_2 (result, 0); else - { - 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; - } + value = build_int_2 ((cppchar_signed_t) result, -1); - /* cpp_interpret_charconst issues a warning if the constant - overflows, but if the number fits in HOST_WIDE_INT anyway, it - will return it un-truncated, which may cause problems down the - line. So set the type to widest_integer_literal_type, call - convert to truncate it to the proper type, then clear - TREE_OVERFLOW so we don't get a second warning. - - FIXME: cpplib's assessment of overflow may not be accurate on a - platform where the final type can change at (compiler's) runtime. */ - - TREE_TYPE (value) = widest_integer_literal_type_node; - value = convert (type, value); - TREE_OVERFLOW (value) = 0; + 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 d2bc5c1a391b..9f3847c3d69a 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 000000000000..77a468ab1847 --- /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 0b4bde33263f..59e399bc3b40 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 +/* 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. -/* Rename the "yyparse" function so that we can override it elsewhere. */ -#define yyparse yyparse_1 + 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 a0a99fdd9640..73c7d5ff5451 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 22e4f7a174df..7911c5a65028 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 000000000000..377018ed21ee --- /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 000000000000..0ab702e0a51a --- /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 eaa4452bb099..8559fa17a756 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 54208db58c0a..159c235224e2 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 17e314489ea7..21cc5109695a 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 87a13dc0fad6..b7e3ceac7b5d 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 9a059a0fb46d..b5a51236d672 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 73689c325d66..2d1158096086 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 -expunge_block_nocompact (b) +link_block (b, after) + basic_block b, after; +{ + b->next_bb = after->next_bb; + b->prev_bb = after; + after->next_bb = b; + b->next_bb->prev_bb = b; +} + +/* Unlink block B from chain. */ +void +unlink_block (b) basic_block b; { + b->next_bb->prev_bb = b->prev_bb; + b->prev_bb->next_bb = b->next_bb; +} + +/* Sequentially order blocks and compact the arrays. */ +void +compact_blocks () +{ + int i; + basic_block bb; + + i = 0; + FOR_EACH_BB (bb) + { + BASIC_BLOCK (i) = bb; + bb->index = i; + i++; + } + + if (i != n_basic_blocks) + abort (); + + last_basic_block = n_basic_blocks; +} + + +/* Remove block B from the basic block array. */ + +void +expunge_block (b) + basic_block b; +{ + unlink_block (b); + BASIC_BLOCK (b->index) = NULL; + n_basic_blocks--; + /* Invalidate data to make bughunting easier. */ memset (b, 0, sizeof *b); b->index = -3; b->succ = (edge) first_deleted_block; first_deleted_block = (basic_block) b; } - -void -expunge_block (b) - basic_block b; -{ - int i, n = n_basic_blocks; - - for (i = b->index; i + 1 < n; ++i) - { - basic_block x = BASIC_BLOCK (i + 1); - BASIC_BLOCK (i) = x; - x->index = i; - } - - n_basic_blocks--; - basic_block_info->num_elements--; - - expunge_block_nocompact (b); -} +/* Create an edge connecting SRC and DEST with flags FLAGS. Return newly + created edge. Use this only if you are sure that this edge can't + possibly already exist. */ + +edge +unchecked_make_edge (src, dst, flags) + basic_block src, dst; + int flags; +{ + edge e; + + if (first_deleted_edge) + { + e = first_deleted_edge; + first_deleted_edge = e->succ_next; + } + else + { + e = (edge) obstack_alloc (&flow_obstack, sizeof *e); + memset (e, 0, sizeof *e); + } + n_edges++; + + e->succ_next = src->succ; + e->pred_next = dst->pred; + e->src = src; + e->dest = dst; + e->flags = flags; + + src->succ = e; + dst->pred = e; + + return e; +} /* Create an edge connecting SRC and DST with FLAGS optionally using edge cache CACHE. Return the new edge, NULL if already exist. */ @@ -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; + basic_block bb; - for (i = 0; i < n_basic_blocks; i++) - alloc_aux_for_block (BASIC_BLOCK (i), size); - - alloc_aux_for_block (ENTRY_BLOCK_PTR, size); - alloc_aux_for_block (EXIT_BLOCK_PTR, size); + 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; + basic_block bb; - for (i = 0; i < n_basic_blocks; i++) - BASIC_BLOCK (i)->aux = NULL; - - 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,16 +804,11 @@ 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; - edge e; + basic_block bb; - if (i >= 0) - bb = BASIC_BLOCK (i); - else - bb = ENTRY_BLOCK_PTR; + FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR, next_bb) + { + edge e; for (e = bb->succ; e; e = e->succ_next) alloc_aux_for_edge (e, size); @@ -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 f0ca224e1be7..3831c5f4768a 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; + basic_block bb; - for (x = 0; x < n_basic_blocks; x++) - remove_fake_successors (BASIC_BLOCK (x)); - - /* We've handled all successors except the entry block's. */ - remove_fake_successors (ENTRY_BLOCK_PTR); + 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 3a5af2dd2b29..795ae1719dca 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 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 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 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 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; + 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 (); + 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 9589d1f6a43f..008c8da9e577 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; + 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; + 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 (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 (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 329e9f80b18c..ca5f4751a418 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)); +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); -/* Map insn uid to lexical block. */ -static varray_type insn_scopes; + 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. */ -/* The block falling through to exit must be the last one in the reordered - chain. Ensure it is. */ +static void +cleanup_unconditional_jumps () +{ + basic_block bb; + FOR_EACH_BB (bb) + { + if (!bb->succ) + continue; + if (bb->succ->flags & EDGE_FALLTHRU) + continue; + if (!bb->succ->succ_next) + { + rtx insn; + if (GET_CODE (bb->head) != CODE_LABEL && forwarder_block_p (bb) + && bb->prev_bb != ENTRY_BLOCK_PTR) + { + basic_block prev = bb->prev_bb; + + if (rtl_dump_file) + fprintf (rtl_dump_file, "Removing forwarder BB %i\n", + bb->index); + + redirect_edge_succ_nodup (bb->pred, bb->succ->dest); + flow_delete_block (bb); + bb = prev; + } + else if (simplejump_p (bb->end)) + { + rtx jump = bb->end; + + if (rtl_dump_file) + fprintf (rtl_dump_file, "Removing jump %i in BB %i\n", + INSN_UID (jump), bb->index); + delete_insn (jump); + bb->succ->flags |= EDGE_FALLTHRU; + } + else + continue; + + insn = NEXT_INSN (bb->end); + while (insn + && (GET_CODE (insn) != NOTE + || NOTE_LINE_NUMBER (insn) != NOTE_INSN_BASIC_BLOCK)) + { + rtx next = NEXT_INSN (insn); + + if (GET_CODE (insn) == BARRIER) + delete_barrier (insn); + + insn = next; + } + } + } +} + +/* The block falling through to exit must be the last one in the + reordered chain. Ensure that this condition is met. */ static void fixup_fallthru_exit_predecessor () { @@ -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 3b12e505f65f..e4e27d00ed44 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 2bd0d4c44bf7..0a2829f5c185 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]; + + if (!loop) + continue; flow_loop_dump (loop, file, loop_dump_aux, verbose); - if (loop->shared) - for (j = 0; j < i; j++) - { - struct loop *oloop = &loops->array[j]; - - if (loop->header == oloop->header) - { - int disjoint; - int smaller; - - smaller = loop->num_nodes < oloop->num_nodes; - - /* If the union of LOOP and OLOOP is different than - the larger of LOOP and OLOOP then LOOP and OLOOP - must be disjoint. */ - disjoint = ! flow_loop_nested_p (smaller ? loop : oloop, - smaller ? oloop : loop); - fprintf (file, - ";; loop header %d shared by loops %d, %d %s\n", - loop->header->index, i, j, - disjoint ? "disjoint" : "nested"); - } - } } if (verbose) flow_loops_cfg_dump (loops, file); } +/* Free 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]; + struct loop *loop = loops->parray[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); + 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; { + loop->next = father->inner; + father->inner = loop; + loop->outer = father; - 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->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. */ - num_loops = 0; - for (b = 0; b < n_basic_blocks; b++) - { - basic_block header; + headers = sbitmap_alloc (last_basic_block); + sbitmap_zero (headers); - header = BASIC_BLOCK (b); + num_loops = 0; + FOR_EACH_BB (header) + { + int more_latches = 0; + header->loop_depth = 0; for (e = header->pred; e; e = e->pred_next) { basic_block latch = e->src; + if (e->flags & EDGE_ABNORMAL) + { + if (more_latches) + { + RESET_BIT (headers, header->index); + num_loops--; + } + break; + } + /* Look for back edges where a predecessor is dominated by this block. A natural loop has a single entry node (header) that dominates all the nodes in the loop. It also has single back edge to the header - from a latch node. 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) + header = BASIC_BLOCK (rc_order[b]); + + loop = loops->parray[num_loops] = xcalloc (1, sizeof (struct loop)); + + loop->header = header; + loop->num = num_loops; + num_loops++; + + /* Look for the latch for this header block. */ + for (e = header->pred; e; e = e->pred_next) { - basic_block header = e->dest; + basic_block latch = e->src; - /* 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)) + if (latch != ENTRY_BLOCK_PTR + && dominated_by_p (dom, latch, header)) { - struct loop *loop; - - loop = loops->array + num_loops; - - loop->header = header; loop->latch = latch; - loop->num = num_loops; - - num_loops++; + break; } } + + flow_loop_tree_node_add (header->loop_father, loop); + loop->num_nodes = flow_loop_nodes_find (loop->header, loop); } - for (i = 0; i < num_loops; i++) - { - struct loop *loop = &loops->array[i]; - - /* Keep track of blocks that are loop headers so - that we can tell which loops should be merged. */ - if (TEST_BIT (headers, loop->header->index)) - SET_BIT (loops->shared_headers, loop->header->index); - SET_BIT (headers, loop->header->index); - - /* Find nodes contained within the loop. */ - loop->nodes = sbitmap_alloc (n_basic_blocks); - loop->num_nodes - = flow_loop_nodes_find (loop->header, loop->latch, loop->nodes); - - /* Compute first and last blocks within the loop. - These are often the same as the loop header and - loop latch respectively, but this is not always - the case. */ - loop->first - = BASIC_BLOCK (sbitmap_first_set_bit (loop->nodes)); - loop->last - = BASIC_BLOCK (sbitmap_last_set_bit (loop->nodes)); - - flow_loop_scan (loops, loop, flags); - } - - /* Natural loops with shared headers may either be disjoint or - nested. Disjoint loops with shared headers cannot be inner - loops and should be merged. For now just mark loops that share - headers. */ - for (i = 0; i < num_loops; i++) - if (TEST_BIT (loops->shared_headers, loops->array[i].header->index)) - loops->array[i].shared = 1; - sbitmap_free (headers); + + /* Assign the loop nesting depth and enclosed loop level for each + loop. */ + loops->levels = flow_loops_level_compute (loops); + + /* Scan the loops. */ + for (i = 1; i < num_loops; i++) + flow_loop_scan (loops, loops->parray[i], flags); + + loops->num = num_loops; } else - sbitmap_vector_free (dom); + { + loops->cfg.dom = NULL; + free_dominance_info (dom); + } +#ifdef ENABLE_CHECKING + verify_flow_info (); + verify_loop_structure (loops, 0); +#endif - loops->num = num_loops; - - /* Build the loop hierarchy tree. */ - flow_loops_tree_build (loops); - - /* Assign the loop nesting depth and enclosed loop level for each - loop. */ - loops->levels = flow_loops_level_compute (loops); - - return num_loops; + 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 (e->src == ENTRY_BLOCK_PTR) - || ! TEST_BIT (loop->nodes, e->src->index); + return !flow_bb_inside_loop_p (loop, e->src); } + +/* Enumeration predicate for get_loop_body. */ +static bool +glb_enum_p (bb, glb_header) + basic_block bb; + void *glb_header; +{ + return bb != (basic_block) glb_header; +} + +/* Gets basic blocks of a loop. */ +basic_block * +get_loop_body (loop) + const struct loop *loop; +{ + basic_block *tovisit, bb; + int tv = 0; + + if (!loop->num_nodes) + abort (); + + tovisit = xcalloc (loop->num_nodes, sizeof (basic_block)); + tovisit[tv++] = loop->header; + + if (loop->latch == EXIT_BLOCK_PTR) + { + /* There may be blocks unreachable from EXIT_BLOCK. */ + if (loop->num_nodes != n_basic_blocks + 2) + abort (); + FOR_EACH_BB (bb) + tovisit[tv++] = bb; + tovisit[tv++] = EXIT_BLOCK_PTR; + } + else if (loop->latch != loop->header) + { + tv = dfs_enumerate_from (loop->latch, 1, glb_enum_p, + tovisit + 1, loop->num_nodes - 1, + loop->header) + 1; + } + + if (tv != loop->num_nodes) + abort (); + return tovisit; +} + +/* Adds basic block BB to LOOP. */ +void +add_bb_to_loop (bb, loop) + basic_block bb; + struct loop *loop; + { + int i; + + bb->loop_father = loop; + bb->loop_depth = loop->depth; + loop->num_nodes++; + for (i = 0; i < loop->depth; i++) + loop->pred[i]->num_nodes++; + } + +/* Remove basic block BB from loops. */ +void +remove_bb_from_loops (bb) + basic_block bb; + { + int i; + struct loop *loop = bb->loop_father; + + loop->num_nodes--; + for (i = 0; i < loop->depth; i++) + loop->pred[i]->num_nodes--; + bb->loop_father = NULL; + bb->loop_depth = 0; + } + +/* Finds nearest common ancestor in loop tree for given loops. */ +struct loop * +find_common_loop (loop_s, loop_d) + struct loop *loop_s; + struct loop *loop_d; +{ + if (!loop_s) return loop_d; + if (!loop_d) return loop_s; + + if (loop_s->depth < loop_d->depth) + loop_d = loop_d->pred[loop_s->depth]; + else if (loop_s->depth > loop_d->depth) + loop_s = loop_s->pred[loop_d->depth]; + + while (loop_s != loop_d) + { + loop_s = loop_s->outer; + loop_d = loop_d->outer; + } + return loop_s; +} + +/* Checks that LOOPS are allright: + -- sizes of loops are allright + -- results of get_loop_body really belong to the loop + -- loop header have just single entry edge and single latch edge + -- loop latches have only single successor that is header of their loop + */ +void +verify_loop_structure (loops, flags) + struct loops *loops; + int flags; +{ + int *sizes, i, j; + basic_block *bbs, bb; + struct loop *loop; + int err = 0; + + /* Check sizes. */ + sizes = xcalloc (loops->num, sizeof (int)); + sizes[0] = 2; + + FOR_EACH_BB (bb) + for (loop = bb->loop_father; loop; loop = loop->outer) + sizes[loop->num]++; + + for (i = 0; i < loops->num; i++) + { + if (!loops->parray[i]) + continue; + + if (loops->parray[i]->num_nodes != sizes[i]) + { + error ("Size of loop %d should be %d, not %d.", + i, sizes[i], loops->parray[i]->num_nodes); + err = 1; + } + } + + free (sizes); + + /* Check get_loop_body. */ + for (i = 1; i < loops->num; i++) + { + loop = loops->parray[i]; + if (!loop) + continue; + bbs = get_loop_body (loop); + + for (j = 0; j < loop->num_nodes; j++) + if (!flow_bb_inside_loop_p (loop, bbs[j])) + { + error ("Bb %d do not belong to loop %d.", + bbs[j]->index, i); + err = 1; + } + free (bbs); + } + + /* Check headers and latches. */ + for (i = 1; i < loops->num; i++) + { + loop = loops->parray[i]; + if (!loop) + continue; + + if ((flags & VLS_EXPECT_PREHEADERS) + && (!loop->header->pred->pred_next + || loop->header->pred->pred_next->pred_next)) + { + error ("Loop %d's header does not have exactly 2 entries.", i); + err = 1; + } + if (flags & VLS_EXPECT_SIMPLE_LATCHES) + { + if (!loop->latch->succ + || loop->latch->succ->succ_next) + { + error ("Loop %d's latch does not have exactly 1 successor.", i); + err = 1; + } + if (loop->latch->succ->dest != loop->header) + { + error ("Loop %d's latch does not have header as successor.", i); + err = 1; + } + if (loop->latch->loop_father != loop) + { + error ("Loop %d's latch does not belong directly to it.", i); + err = 1; + } + } + if (loop->header->loop_father != loop) + { + error ("Loop %d's header does not belong directly to it.", i); + err = 1; + } + } + + if (err) + abort (); +} + +/* Returns latch edge of LOOP. */ +edge +loop_latch_edge (loop) + struct loop *loop; +{ + edge e; + + for (e = loop->header->pred; e->src != loop->latch; e = e->pred_next) + continue; + + return e; +} + +/* Returns preheader edge of LOOP. */ +edge +loop_preheader_edge (loop) + struct loop *loop; +{ + edge e; + + for (e = loop->header->pred; e->src == loop->latch; e = e->pred_next) + continue; + + return e; +} + diff --git a/contrib/gcc/cfgrtl.c b/contrib/gcc/cfgrtl.c index e2cb773379a1..7780ca5940c9 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); + n_basic_blocks++; - BASIC_BLOCK (i) = tmp; - tmp->index = i; - } - - 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; + basic_block bb; - if (basic_block_for_insn) - VARRAY_FREE (basic_block_for_insn); - - VARRAY_BB_INIT (basic_block_for_insn, max, "basic_block_for_insn"); - - for (i = 0; i < n_basic_blocks; ++i) + 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) { + rtx next = next_nonnote_insn (e->src->end); + + after = e->dest->head; + /* The first insn after the call may be a stack pop, skip it. */ + while (next + && keep_with_call_p (next)) + { + after = next; + next = next_nonnote_insn (next); + } bb = e->dest; - - /* Get the location correct wrt a code label, and "nice" wrt - a basic block note, and before everything else. */ - tmp = bb->head; - if (GET_CODE (tmp) == CODE_LABEL) - tmp = NEXT_INSN (tmp); - if (NOTE_INSN_BASIC_BLOCK_P (tmp)) - tmp = NEXT_INSN (tmp); - if (tmp == bb->head) - before = tmp; - else - after = PREV_INSN (tmp); } - - /* If the source has one successor and the edge is not abnormal, - insert there. Except for the entry block. */ - else if ((e->flags & EDGE_ABNORMAL) == 0 - && e->src->succ->succ_next == NULL - && e->src != ENTRY_BLOCK_PTR) + if (!before && !after) { - bb = e->src; + /* 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; - /* 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. + /* 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 (); + } - 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)) - ; + /* If the source has one successor and the edge is not abnormal, + insert there. Except for the entry block. */ + else if ((e->flags & EDGE_ABNORMAL) == 0 + && e->src->succ->succ_next == NULL + && e->src != ENTRY_BLOCK_PTR) + { + bb = e->src; + + /* It is possible to have a non-simple jump here. Consider a target + where some forms of unconditional jumps clobber a register. This + happens on the fr30 for example. + + We know this block has a single successor, so we can just emit + the queued insns before the jump. */ + if (GET_CODE (bb->end) == JUMP_INSN) + for (before = bb->end; + GET_CODE (PREV_INSN (before)) == NOTE + && NOTE_LINE_NUMBER (PREV_INSN (before)) == + NOTE_INSN_LOOP_BEG; before = PREV_INSN (before)) + ; + else + { + /* We'd better be fallthru, or we've lost track of what's what. */ + if ((e->flags & EDGE_FALLTHRU) == 0) + abort (); + + after = bb->end; + } + } + /* Otherwise we must split the edge. */ else { - /* We'd better be fallthru, or we've lost track of what's what. */ - if ((e->flags & EDGE_FALLTHRU) == 0) - abort (); - + 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 933a2777f7f4..81a2bf32d64f 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 2a65836fd8d1..f67882025391 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 5e8ad1ac3a28..03d0dffa6baf 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)); + next = 0; - /* Try this insn with each insn it links back to. */ + if (GET_CODE (insn) == CODE_LABEL) + label_tick++; - 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)) + 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. */ + /* 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; + 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) + for (nextlinks = LOG_LINKS (prev); nextlinks; + nextlinks = XEXP (nextlinks, 1)) + if ((next = try_combine (insn, prev, + XEXP (nextlinks, 0), + &new_direct_jump_p)) != 0) + goto retry; + } + + /* Do the same for an insn that explicitly references CC0. */ + if (GET_CODE (insn) == INSN + && (prev = prev_nonnote_insn (insn)) != 0 + && GET_CODE (prev) == INSN + && sets_cc0_p (PATTERN (prev)) + && GET_CODE (PATTERN (insn)) == SET + && reg_mentioned_p (cc0_rtx, SET_SRC (PATTERN (insn)))) + { + if ((next = try_combine (insn, prev, + NULL_RTX, &new_direct_jump_p)) != 0) + goto retry; + + for (nextlinks = LOG_LINKS (prev); nextlinks; + nextlinks = XEXP (nextlinks, 1)) + if ((next = try_combine (insn, prev, + XEXP (nextlinks, 0), + &new_direct_jump_p)) != 0) + goto retry; + } + + /* Finally, see if any of the insns that this insn links to + explicitly references CC0. If so, try this insn, that insn, + and its predecessor if it sets CC0. */ + for (links = LOG_LINKS (insn); links; links = XEXP (links, 1)) + if (GET_CODE (XEXP (links, 0)) == INSN + && GET_CODE (PATTERN (XEXP (links, 0))) == SET + && reg_mentioned_p (cc0_rtx, SET_SRC (PATTERN (XEXP (links, 0)))) + && (prev = prev_nonnote_insn (XEXP (links, 0))) != 0 + && GET_CODE (prev) == INSN + && sets_cc0_p (PATTERN (prev)) + && (next = try_combine (insn, XEXP (links, 0), + prev, &new_direct_jump_p)) != 0) goto retry; - } - - /* Do the same for an insn that explicitly references CC0. */ - if (GET_CODE (insn) == INSN - && (prev = prev_nonnote_insn (insn)) != 0 - && GET_CODE (prev) == INSN - && sets_cc0_p (PATTERN (prev)) - && GET_CODE (PATTERN (insn)) == SET - && reg_mentioned_p (cc0_rtx, SET_SRC (PATTERN (insn)))) - { - if ((next = try_combine (insn, prev, - NULL_RTX, &new_direct_jump_p)) != 0) - goto retry; - - for (nextlinks = LOG_LINKS (prev); nextlinks; - nextlinks = XEXP (nextlinks, 1)) - if ((next = try_combine (insn, prev, - XEXP (nextlinks, 0), - &new_direct_jump_p)) != 0) - goto retry; - } - - /* Finally, see if any of the insns that this insn links to - explicitly references CC0. If so, try this insn, that insn, - and its predecessor if it sets CC0. */ - for (links = LOG_LINKS (insn); links; links = XEXP (links, 1)) - if (GET_CODE (XEXP (links, 0)) == INSN - && GET_CODE (PATTERN (XEXP (links, 0))) == SET - && reg_mentioned_p (cc0_rtx, SET_SRC (PATTERN (XEXP (links, 0)))) - && (prev = prev_nonnote_insn (XEXP (links, 0))) != 0 - && GET_CODE (prev) == INSN - && sets_cc0_p (PATTERN (prev)) - && (next = try_combine (insn, XEXP (links, 0), - prev, &new_direct_jump_p)) != 0) - goto retry; #endif - /* Try combining an insn with two different insns whose results it - uses. */ - for (links = LOG_LINKS (insn); links; links = XEXP (links, 1)) - for (nextlinks = XEXP (links, 1); nextlinks; - nextlinks = XEXP (nextlinks, 1)) - if ((next = try_combine (insn, XEXP (links, 0), - XEXP (nextlinks, 0), - &new_direct_jump_p)) != 0) - goto retry; + /* 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 bb71f51a3ec9..6493ccf5fe18 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 + tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h dbxcoff.h i386/i386-coff.h" ;; -i[34567]86-*-isc*) # 80386 running ISC system - xm_defines=POSIX - if test x$gas = xyes -a x$stabs = xyes - then - tm_file=i386/iscdbx.h - tmake_file=i386/t-svr3dbx - extra_parts="svr3.ifile svr3z.ifile" - else - tm_file=i386/isccoff.h - tmake_file=i386/t-crtstuff - extra_parts="crtbegin.o crtend.o" - fi - install_headers_dir=install-headers-cpio - ;; -i[34567]86-*-linux*oldld*) # Intel 80386's running GNU/Linux - # with a.out format using - # pre BFD linkers - tmake_file="t-linux-aout i386/t-crtstuff" - tm_file=i386/linux-oldld.h - gnu_ld=yes - float_format=i386 +i[34567]86-*-linux*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* | i[34567]86-*-rtemscoff*) + # would otherwise be caught by i?86-*-rtems* + echo "*** Configuration $machine not supported" 1>&2 + exit 1 ;; -i[34567]86-go32-rtems*) +i[34567]86-*-rtems*) xm_defines=POSIX - tm_file="i386/djgpp.h i386/djgpp-rtems.h rtems.h" - tmake_file=t-rtems - if test x$enable_threads = xyes; then - thread_file='rtems' - fi - ;; -i[34567]86-*-rtemscoff*) - xm_defines=POSIX - tm_file="i386/i386-coff.h i386/rtems.h rtems.h" - tmake_file=t-rtems - if test x$enable_threads = xyes; then - thread_file='rtems' - fi - ;; -i[34567]86-*-rtems*|i[34567]86-*-rtemself*) - xm_defines=POSIX - tm_file="${tm_file} i386/att.h dbxelf.h elfos.h i386/i386elf.h i386/rtemself.h rtems.h" + 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,53 +1650,10 @@ 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 - then - tm_file=m68k/news3gas.h - else - tm_file=m68k/news3.h - fi - use_collect2=yes - float_format=m68k - ;; -m68k-sony-bsd* | m68k-sony-newsos*) - if test x$gas = xyes - then - tm_file=m68k/newsgas.h - else - tm_file=m68k/news.h - fi - use_collect2=yes - float_format=m68k - ;; -m68k-next-nextstep2*) - tm_p_file="${tm_p_file} nextstep-protos.h" - tm_file=m68k/next21.h - tmake_file=m68k/t-next - xmake_file=m68k/x-next - extra_objs=nextstep.o - use_collect2=yes - float_format=m68k - ;; -m68k-next-nextstep[34]*) - tm_p_file="${tm_p_file} nextstep-protos.h" - tm_file=m68k/next.h - tmake_file=m68k/t-next - xmake_file=m68k/x-next - extra_objs=nextstep.o - extra_parts="crtbegin.o crtend.o" - float_format=m68k - if test x$enable_threads = xyes; then - thread_file='mach' - fi ;; m68k-sun-sunos3*) if test x$with_fp = xno @@ -1986,7 +1661,6 @@ m68k-sun-sunos3*) tm_file=m68k/sun3n3.h else tm_file=m68k/sun3o3.h - float_format=m68k fi use_collect2=yes ;; @@ -1996,7 +1670,6 @@ m68k-sun-sunos*) # For SunOS 4 (the default). tm_file=m68k/sun3n.h else tm_file=m68k/sun3.h - float_format=m68k 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-*) # would otherwise be caught by mips-*-elf* + echo "*** Configuration $machine not supported" 1>&2 + exit 1 ;; -mips-sgi-irix4*) # Mostly like a MIPS. - tm_file="mips/iris3.h ${tm_file} mips/iris4.h" - if test x$stabs = xyes; then - tm_file="${tm_file} dbx.h" - fi - tmake_file=mips/t-iris - xm_defines=POSIX - if test x$gas = xyes - then : - else - extra_passes="mips-tfile mips-tdump" - fi - if test x$gnu_ld != xyes - then - use_collect2=yes - fi -# if test x$enable_threads = xyes; then -# thread_file='irix' -# fi - ;; -mips-sgi-*) # Mostly like a MIPS. - tm_file="mips/iris3.h ${tm_file}" - if test x$stabs = xyes; then - tm_file="${tm_file} dbx.h" - fi - xm_defines=POSIX - if test x$gas = xyes - then : - else - extra_passes="mips-tfile mips-tdump" - fi - if test x$gnu_ld != xyes - then - use_collect2=yes - fi - ;; -mips-dec-osfrose*) # Decstation running OSF/1 reference port with OSF/rose. - tm_file="mips/osfrose.h ${tm_file}" - extra_objs=halfpic.o - use_collect2=yes - ;; -mips-dec-osf*) # Decstation running OSF/1 as shipped by DIGITAL - tm_file=mips/dec-osf1.h - if test x$stabs = xyes; then - tm_file="${tm_file} dbx.h" - fi - if test x$gas = xyes - then : - else - tmake_file=mips/t-ultrix - extra_passes="mips-tfile mips-tdump" - fi - if test x$gnu_ld != xyes - then - use_collect2=yes - fi - ;; -mips-dec-bsd*) # Decstation running 4.4 BSD - tm_file=mips/dec-bsd.h - if test x$gas = xyes - then : - else - tmake_file=mips/t-ultrix - extra_passes="mips-tfile mips-tdump" - fi - if test x$gnu_ld != xyes - then - use_collect2=yes - fi - ;; mips*-*-netbsd*) # NetBSD/mips, either endian. - tm_file="elfos.h mips/netbsd.h" - case $machine in - mips*el-*) - tm_file="mips/little.h $tm_file" - ;; - esac + 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" + tm_defines="MIPS_ISA_DEFAULT=32 MIPS_ABI_DEFAULT=ABI_MEABI" ;; -mipsel-*-elf*) - tm_file="mips/elfl.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" + ;; +mips-*-elf* | mipsel-*-elf*) + tm_file="${tm_file} mips/elf.h" tmake_file=mips/t-elf ;; -mips-*-elf*) - tm_file="mips/elf.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" ;; -mips64el-*-elf*) - tm_file="mips/elfl64.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 - ;; -mips64orionel-*-elf*) - tm_file="mips/elforion.h mips/elfl64.h" - tmake_file=mips/t-elf - ;; -mips64-*-elf*) - tm_file="mips/elf64.h" - tmake_file=mips/t-elf - ;; -mips64orion-*-elf*) - tm_file="mips/elforion.h mips/elf64.h" tmake_file=mips/t-elf + 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-aix5.1.* | powerpc-ibm-aix5.1.*) + xm_defines=POSIX + tm_file="${tm_file} rs6000/aix.h rs6000/aix51.h rs6000/xcoff.h" + tmake_file=rs6000/t-aix43 use_collect2=yes thread_file='aix' extra_headers= ;; rs6000-ibm-aix[56789].* | powerpc-ibm-aix[56789].*) xm_defines=POSIX - tm_file="${tm_file} rs6000/aix.h rs6000/aix51.h rs6000/xcoff.h" - tmake_file=rs6000/t-aix43 - float_format=none + 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 - ;; - -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 + case $machine in + hppa1* | parisc1*) + tm_defines="TARGET_SCHED_DEFAULT=\\\"7100LC\\\"" + ;; + esac ;; mips*-*-*) - if test x$gas = xyes + case $machine in + mips*-*-ecoff* | mips*-*-elf*) + if test x$gas = xyes + then + if test x$gnu_ld = xyes + then + target_cpu_default2="MASK_GAS|MASK_SPLIT_ADDR" + else + target_cpu_default2="MASK_GAS" + fi + fi + ;; + mips*-*-*) + if test x$gas = xyes + then + target_cpu_default2="MASK_GAS" + fi + ;; + esac + case $machine in + mips*el-*-*) + tm_defines="TARGET_ENDIAN_DEFAULT=0 $tm_defines" + ;; + esac + case $tm_file in + *mips/elf.h* | *mips/elf64.h*) + tm_defines="OBJECT_FORMAT_ELF $tm_defines" + ;; + esac + if test "x$enable_gofast" = xyes then - 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 ec5be9569578..bc52d3634e3b 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. */ -#undef HAVE_MMAP_DEV_ZERO - -/* Define if mmap can get us zeroed pages using MAP_ANON(YMOUS). */ -#undef HAVE_MMAP_ANON - /* 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 with MAP_ANON(YMOUS) works. */ +#undef HAVE_MMAP_ANON + /* Define if you have the iconv() function. */ #undef HAVE_ICONV @@ -429,6 +450,9 @@ /* Define to 1 if we found this declaration otherwise define to 0. */ #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 @@ -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 4dc21868dd45..3f1580d05c65 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 c6fdd042242e..fe4943bfeb87 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 +#ifdef RTX_CODE +extern rtx alpha_emit_conditional_branch PARAMS ((enum rtx_code)); +extern rtx alpha_emit_setcc PARAMS ((enum rtx_code)); +extern int alpha_split_conditional_move PARAMS ((enum rtx_code, rtx, rtx, + rtx, rtx)); +extern void alpha_emit_xfloating_arith PARAMS ((enum rtx_code, rtx[])); +extern void alpha_emit_xfloating_cvt PARAMS ((enum rtx_code, rtx[])); +#endif + +extern rtx alpha_need_linkage PARAMS ((const char *, int)); +extern rtx alpha_use_linkage PARAMS ((rtx, tree, int, int)); + #if TARGET_ABI_OPEN_VMS #ifdef HAVE_MACHINE_MODES extern enum avms_arg_type alpha_arg_type PARAMS ((enum machine_mode)); #endif -#ifdef RTX_CODE extern rtx alpha_arg_info_reg_val PARAMS ((CUMULATIVE_ARGS)); -#endif -#ifdef BUFSIZ -extern void alpha_write_linkage PARAMS ((FILE *)); -#endif #endif /* TARGET_ABI_OPEN_VMS */ -#ifdef RTX_CODE -extern rtx alpha_need_linkage PARAMS ((const char *, int)); -#endif - -#ifdef TREE_CODE -extern tree alpha_build_va_list PARAMS ((void)); -#ifdef RTX_CODE -extern void alpha_va_start PARAMS ((int, tree, rtx)); -extern rtx alpha_va_arg PARAMS ((tree, tree)); -extern rtx function_arg PARAMS ((CUMULATIVE_ARGS, enum machine_mode, - tree, int)); -#endif -extern void alpha_start_function PARAMS ((FILE *, const char *, tree)); -extern void alpha_end_function PARAMS ((FILE *, const char *, tree)); -extern void alpha_output_mi_thunk_osf PARAMS ((FILE *, tree, - HOST_WIDE_INT, tree)); -extern void alpha_encode_section_info PARAMS ((tree)); -#endif /* TREE CODE */ - -#ifdef RTX_CODE extern rtx unicosmk_add_call_info_word PARAMS ((rtx)); -#endif #if TARGET_ABI_UNICOSMK -#ifdef RTX_CODE extern void unicosmk_defer_case_vector PARAMS ((rtx, rtx)); -#endif -#ifdef TREE_CODE -extern void unicosmk_unique_section PARAMS ((tree, int)); -#endif extern void unicosmk_add_extern PARAMS ((const char *)); extern void unicosmk_output_align PARAMS ((FILE *, int)); extern char * unicosmk_text_section PARAMS ((void)); diff --git a/contrib/gcc/config/alpha/alpha.c b/contrib/gcc/config/alpha/alpha.c index 3bc8e4ded81c..9657e56bf430 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. */ + /* Everything else handled in DFA bypasses now. */ - if ((insn_type == TYPE_IST || insn_type == TYPE_FST) - && (set = single_set (dep_insn)) != 0 - && GET_CODE (PATTERN (insn)) == SET - && rtx_equal_p (SET_DEST (set), SET_SRC (PATTERN (insn)))) - { - switch (dep_insn_type) - { - case TYPE_ILD: - case TYPE_FLD: - /* No savings here. */ - return cost; - - case TYPE_IMUL: - /* In these cases, we save one cycle. */ - return cost - 1; - - default: - /* In all other cases, we save two cycles. */ - return MAX (0, cost - 2); - } - } - - /* Another case that needs adjustment is an arithmetic or logical - operation. It's cost is usually one cycle, but we default it to - two in the MD file. The only case that it is actually two is - for the address in loads, stores, and jumps. */ - - if (dep_insn_type == TYPE_IADD || dep_insn_type == TYPE_ILOG) - { - switch (insn_type) - { - case TYPE_ILD: - case TYPE_IST: - case TYPE_FLD: - case TYPE_FST: - case TYPE_JSR: - return cost; - default: - return 1; - } - } - - /* The final case is when a compare feeds into an integer branch; - the cost is only one cycle in that case. */ - - if (dep_insn_type == TYPE_ICMP && insn_type == TYPE_IBR) - return 1; - break; - - case PROCESSOR_EV5: - /* And the lord DEC saith: "A special bypass provides an effective - latency of 0 cycles for an ICMP or ILOG insn producing the test - operand of an IBR or ICMOV insn." */ - - if ((dep_insn_type == TYPE_ICMP || dep_insn_type == TYPE_ILOG) - && (set = single_set (dep_insn)) != 0) - { - /* A branch only has one input. This must be it. */ - if (insn_type == TYPE_IBR) - return 0; - /* A conditional move has three, make sure it is the test. */ - if (insn_type == TYPE_ICMOV - && GET_CODE (set_src = PATTERN (insn)) == SET - && GET_CODE (set_src = SET_SRC (set_src)) == IF_THEN_ELSE - && rtx_equal_p (SET_DEST (set), XEXP (set_src, 0))) - return 0; - } - - /* "The multiplier is unable to receive data from IEU bypass paths. - The instruction issues at the expected time, but its latency is - increased by the time it takes for the input data to become - available to the multiplier" -- which happens in pipeline stage - six, when results are comitted to the register file. */ - - if (insn_type == TYPE_IMUL) - { - switch (dep_insn_type) - { - /* These insns produce their results in pipeline stage five. */ - case TYPE_ILD: - case TYPE_ICMOV: - case TYPE_IMUL: - case TYPE_MVI: - return cost + 1; - - /* Other integer insns produce results in pipeline stage four. */ - default: - return cost + 2; - } - } - break; - - case PROCESSOR_EV6: - /* There is additional latency to move the result of (most) FP - operations anywhere but the FP register file. */ - - if ((insn_type == TYPE_FST || insn_type == TYPE_FTOI) - && (dep_insn_type == TYPE_FADD || - dep_insn_type == TYPE_FMUL || - dep_insn_type == TYPE_FCMOV)) - return cost + 2; - - break; - } - - /* Otherwise, return the default cost. */ return cost; } -/* Function to initialize the issue rate used by the scheduler. */ +/* The number of instructions that can be issued per cycle. */ + static int alpha_issue_rate () { @@ -4964,58 +5321,51 @@ 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; } +/* How many alternative schedules to try. This should be as wide as the + scheduling freedom in the DFA, but no wider. Making this value too + large results extra work for the scheduler. + + For EV4, loads can be issued to either IB0 or IB1, thus we have 2 + alternative schedules. For EV5, we can choose between E0/E1 and + FA/FM. For EV6, an arithmatic insn can be issued to U0/U1/L0/L1. */ + +static int +alpha_multipass_dfa_lookahead () +{ + return (alpha_cpu == PROCESSOR_EV6 ? 4 : 2); +} -/* Register global variables and machine-specific functions with the - garbage collector. */ +/* Machine-specific function data. */ -#if TARGET_ABI_UNICOSMK -static void -alpha_init_machine_status (p) - struct function *p; +struct machine_function GTY(()) { - p->machine = - (struct machine_function *) xcalloc (1, sizeof (struct machine_function)); + /* 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; - p->machine->first_ciw = NULL_RTX; - p->machine->last_ciw = NULL_RTX; - p->machine->ciw_count = 0; - p->machine->addr_list = NULL_RTX; -} + /* List of deferred case vectors. */ + struct rtx_def *addr_list; -static void -alpha_mark_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 () { - struct machine_function *machine = p->machine; - - if (machine) - { - ggc_mark_rtx (machine->first_ciw); - ggc_mark_rtx (machine->addr_list); - } + return ((struct machine_function *) + ggc_alloc_cleared (sizeof (struct machine_function))); } -static void -alpha_free_machine_status (p) - struct function *p; -{ - free (p->machine); - p->machine = NULL; -} -#endif /* TARGET_ABI_UNICOSMK */ - /* Functions to save and restore alpha_return_addr_rtx. */ /* Start the ball rolling with 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 - 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. + /* Show that we know this function if it is called again. + + Do this only for functions whose symbols bind locally. Don't do this for functions not defined in the .text section, as otherwise it's not unlikely that the destination is out of range for a direct branch. */ - if (!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. */ +#ifdef OBJECT_FORMAT_ELF -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", -}; +/* Switch to the section to which we should output X. The only thing + special we do here is to honor small data. */ -static REAL_VALUE_TYPE float_values[8]; -static int inited_float_values = 0; - -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 4410a86ad7dd..b933ea316252 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) -/* 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) \ -" +#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 -/* 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. */ +/* Return the class of registers that cannot change mode from FROM to TO. */ -#define CLASS_CANNOT_CHANGE_MODE FLOAT_REGS - -/* Defines illegal mode changes for CLASS_CANNOT_CHANGE_MODE. */ - -#define CLASS_CANNOT_CHANGE_MODE_P(FROM,TO) \ - (GET_MODE_SIZE (FROM) != GET_MODE_SIZE (TO)) +#define 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 1875b808a0ff..a4c0ae6904dc 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,314 +142,24 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" (define_attr "length" "" (const_int 4)) + +;; The USEGP attribute marks instructions that have relocations that use +;; the GP. + +(define_attr "usegp" "no,yes" + (cond [(eq_attr "type" "ldsym,jsr") + (const_string "yes") + (eq_attr "type" "ild,fld,ist,fst") + (symbol_ref "alpha_find_lo_sum_using_gp(insn)") + ] + (const_string "no"))) + -;; 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. - +;; 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,7 +7026,687 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" else return ".align %0 #realign"; }) + +;; Instructions to be emitted from __builtins. +(define_insn "builtin_cmpbge" + [(set (match_operand:DI 0 "register_operand" "=r") + (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "rJ") + (match_operand:DI 2 "reg_or_8bit_operand" "rI")] + UNSPEC_CMPBGE))] + "" + "cmpbge %r1,%2,%0" + ;; The EV6 data sheets list this as ILOG. OTOH, EV6 doesn't + ;; actually differentiate between ILOG and ICMP in the schedule. + [(set_attr "type" "icmp")]) + +(define_expand "builtin_extbl" + [(match_operand:DI 0 "register_operand" "") + (match_operand:DI 1 "reg_or_0_operand" "") + (match_operand:DI 2 "reg_or_8bit_operand" "")] + "" +{ + rtx (*gen) PARAMS ((rtx, rtx, rtx, rtx)); + if (WORDS_BIG_ENDIAN) + gen = gen_extxl_be; + else + gen = gen_extxl_le; + emit_insn ((*gen) (operands[0], operands[1], GEN_INT (8), operands[2])); + DONE; +}) + +(define_expand "builtin_extwl" + [(match_operand:DI 0 "register_operand" "") + (match_operand:DI 1 "reg_or_0_operand" "") + (match_operand:DI 2 "reg_or_8bit_operand" "")] + "" +{ + rtx (*gen) PARAMS ((rtx, rtx, rtx, rtx)); + if (WORDS_BIG_ENDIAN) + gen = gen_extxl_be; + else + gen = gen_extxl_le; + emit_insn ((*gen) (operands[0], operands[1], GEN_INT (16), operands[2])); + DONE; +}) + +(define_expand "builtin_extll" + [(match_operand:DI 0 "register_operand" "") + (match_operand:DI 1 "reg_or_0_operand" "") + (match_operand:DI 2 "reg_or_8bit_operand" "")] + "" +{ + rtx (*gen) PARAMS ((rtx, rtx, rtx, rtx)); + if (WORDS_BIG_ENDIAN) + gen = gen_extxl_be; + else + gen = gen_extxl_le; + emit_insn ((*gen) (operands[0], operands[1], GEN_INT (32), operands[2])); + DONE; +}) + +(define_expand "builtin_extql" + [(match_operand:DI 0 "register_operand" "") + (match_operand:DI 1 "reg_or_0_operand" "") + (match_operand:DI 2 "reg_or_8bit_operand" "")] + "" +{ + rtx (*gen) PARAMS ((rtx, rtx, rtx, rtx)); + if (WORDS_BIG_ENDIAN) + gen = gen_extxl_be; + else + gen = gen_extxl_le; + emit_insn ((*gen) (operands[0], operands[1], GEN_INT (64), operands[2])); + DONE; +}) + +(define_expand "builtin_extwh" + [(match_operand:DI 0 "register_operand" "") + (match_operand:DI 1 "reg_or_0_operand" "") + (match_operand:DI 2 "reg_or_8bit_operand" "")] + "" +{ + rtx (*gen) PARAMS ((rtx, rtx, rtx)); + if (WORDS_BIG_ENDIAN) + gen = gen_extwh_be; + else + gen = gen_extwh_le; + emit_insn ((*gen) (operands[0], operands[1], operands[2])); + DONE; +}) + +(define_expand "builtin_extlh" + [(match_operand:DI 0 "register_operand" "") + (match_operand:DI 1 "reg_or_0_operand" "") + (match_operand:DI 2 "reg_or_8bit_operand" "")] + "" +{ + rtx (*gen) PARAMS ((rtx, rtx, rtx)); + if (WORDS_BIG_ENDIAN) + gen = gen_extlh_be; + else + gen = gen_extlh_le; + emit_insn ((*gen) (operands[0], operands[1], operands[2])); + DONE; +}) + +(define_expand "builtin_extqh" + [(match_operand:DI 0 "register_operand" "") + (match_operand:DI 1 "reg_or_0_operand" "") + (match_operand:DI 2 "reg_or_8bit_operand" "")] + "" +{ + rtx (*gen) PARAMS ((rtx, rtx, rtx)); + if (WORDS_BIG_ENDIAN) + gen = gen_extqh_be; + else + gen = gen_extqh_le; + emit_insn ((*gen) (operands[0], operands[1], operands[2])); + DONE; +}) + +(define_expand "builtin_insbl" + [(match_operand:DI 0 "register_operand" "") + (match_operand:DI 1 "reg_or_0_operand" "") + (match_operand:DI 2 "reg_or_8bit_operand" "")] + "" +{ + rtx (*gen) PARAMS ((rtx, rtx, rtx)); + if (WORDS_BIG_ENDIAN) + gen = gen_insbl_be; + else + gen = gen_insbl_le; + operands[1] = gen_lowpart (QImode, operands[1]); + emit_insn ((*gen) (operands[0], operands[1], operands[2])); + DONE; +}) + +(define_expand "builtin_inswl" + [(match_operand:DI 0 "register_operand" "") + (match_operand:DI 1 "reg_or_0_operand" "") + (match_operand:DI 2 "reg_or_8bit_operand" "")] + "" +{ + rtx (*gen) PARAMS ((rtx, rtx, rtx)); + if (WORDS_BIG_ENDIAN) + gen = gen_inswl_be; + else + gen = gen_inswl_le; + operands[1] = gen_lowpart (HImode, operands[1]); + emit_insn ((*gen) (operands[0], operands[1], operands[2])); + DONE; +}) + +(define_expand "builtin_insll" + [(match_operand:DI 0 "register_operand" "") + (match_operand:DI 1 "reg_or_0_operand" "") + (match_operand:DI 2 "reg_or_8bit_operand" "")] + "" +{ + rtx (*gen) PARAMS ((rtx, rtx, rtx)); + if (WORDS_BIG_ENDIAN) + gen = gen_insll_be; + else + gen = gen_insll_le; + operands[1] = gen_lowpart (SImode, operands[1]); + emit_insn ((*gen) (operands[0], operands[1], operands[2])); + emit_insn ((*gen) (operands[0], operands[1], operands[2])); + DONE; +}) + +(define_expand "builtin_insql" + [(match_operand:DI 0 "register_operand" "") + (match_operand:DI 1 "reg_or_0_operand" "") + (match_operand:DI 2 "reg_or_8bit_operand" "")] + "" +{ + rtx (*gen) PARAMS ((rtx, rtx, rtx)); + if (WORDS_BIG_ENDIAN) + gen = gen_insql_be; + else + gen = gen_insql_le; + emit_insn ((*gen) (operands[0], operands[1], operands[2])); + DONE; +}) + +(define_expand "builtin_inswh" + [(match_operand:DI 0 "register_operand" "") + (match_operand:DI 1 "register_operand" "") + (match_operand:DI 2 "reg_or_8bit_operand" "")] + "" +{ + emit_insn (gen_insxh (operands[0], operands[1], GEN_INT (16), operands[2])); + DONE; +}) + +(define_expand "builtin_inslh" + [(match_operand:DI 0 "register_operand" "") + (match_operand:DI 1 "register_operand" "") + (match_operand:DI 2 "reg_or_8bit_operand" "")] + "" +{ + emit_insn (gen_insxh (operands[0], operands[1], GEN_INT (32), operands[2])); + DONE; +}) + +(define_expand "builtin_insqh" + [(match_operand:DI 0 "register_operand" "") + (match_operand:DI 1 "register_operand" "") + (match_operand:DI 2 "reg_or_8bit_operand" "")] + "" +{ + emit_insn (gen_insxh (operands[0], operands[1], GEN_INT (64), operands[2])); + DONE; +}) + +(define_expand "builtin_mskbl" + [(match_operand:DI 0 "register_operand" "") + (match_operand:DI 1 "reg_or_0_operand" "") + (match_operand:DI 2 "reg_or_8bit_operand" "")] + "" +{ + rtx (*gen) PARAMS ((rtx, rtx, rtx, rtx)); + rtx mask; + if (WORDS_BIG_ENDIAN) + gen = gen_mskxl_be; + else + gen = gen_mskxl_le; + mask = GEN_INT (0xff); + emit_insn ((*gen) (operands[0], operands[1], mask, operands[2])); + DONE; +}) + +(define_expand "builtin_mskwl" + [(match_operand:DI 0 "register_operand" "") + (match_operand:DI 1 "reg_or_0_operand" "") + (match_operand:DI 2 "reg_or_8bit_operand" "")] + "" +{ + rtx (*gen) PARAMS ((rtx, rtx, rtx, rtx)); + rtx mask; + if (WORDS_BIG_ENDIAN) + gen = gen_mskxl_be; + else + gen = gen_mskxl_le; + mask = GEN_INT (0xffff); + emit_insn ((*gen) (operands[0], operands[1], mask, operands[2])); + DONE; +}) + +(define_expand "builtin_mskll" + [(match_operand:DI 0 "register_operand" "") + (match_operand:DI 1 "reg_or_0_operand" "") + (match_operand:DI 2 "reg_or_8bit_operand" "")] + "" +{ + rtx (*gen) PARAMS ((rtx, rtx, rtx, rtx)); + rtx mask; + if (WORDS_BIG_ENDIAN) + gen = gen_mskxl_be; + else + gen = gen_mskxl_le; + mask = immed_double_const (0xffffffff, 0, DImode); + emit_insn ((*gen) (operands[0], operands[1], mask, operands[2])); + DONE; +}) + +(define_expand "builtin_mskql" + [(match_operand:DI 0 "register_operand" "") + (match_operand:DI 1 "reg_or_0_operand" "") + (match_operand:DI 2 "reg_or_8bit_operand" "")] + "" +{ + rtx (*gen) PARAMS ((rtx, rtx, rtx, rtx)); + rtx mask; + if (WORDS_BIG_ENDIAN) + gen = gen_mskxl_be; + else + gen = gen_mskxl_le; + mask = constm1_rtx; + emit_insn ((*gen) (operands[0], operands[1], mask, operands[2])); + DONE; +}) + +(define_expand "builtin_mskwh" + [(match_operand:DI 0 "register_operand" "") + (match_operand:DI 1 "register_operand" "") + (match_operand:DI 2 "reg_or_8bit_operand" "")] + "" +{ + emit_insn (gen_mskxh (operands[0], operands[1], GEN_INT (16), operands[2])); + DONE; +}) + +(define_expand "builtin_msklh" + [(match_operand:DI 0 "register_operand" "") + (match_operand:DI 1 "register_operand" "") + (match_operand:DI 2 "reg_or_8bit_operand" "")] + "" +{ + emit_insn (gen_mskxh (operands[0], operands[1], GEN_INT (32), operands[2])); + DONE; +}) + +(define_expand "builtin_mskqh" + [(match_operand:DI 0 "register_operand" "") + (match_operand:DI 1 "register_operand" "") + (match_operand:DI 2 "reg_or_8bit_operand" "")] + "" +{ + emit_insn (gen_mskxh (operands[0], operands[1], GEN_INT (64), operands[2])); + DONE; +}) + +(define_expand "builtin_zap" + [(set (match_operand:DI 0 "register_operand" "") + (and:DI (unspec:DI + [(match_operand:DI 2 "reg_or_const_int_operand" "")] + UNSPEC_ZAP) + (match_operand:DI 1 "reg_or_const_int_operand" "")))] + "" +{ + if (GET_CODE (operands[2]) == CONST_INT) + { + rtx mask = alpha_expand_zap_mask (INTVAL (operands[2])); + + if (mask == const0_rtx) + { + emit_move_insn (operands[0], const0_rtx); + DONE; + } + if (mask == constm1_rtx) + { + emit_move_insn (operands[0], operands[1]); + DONE; + } + + operands[1] = force_reg (DImode, operands[1]); + emit_insn (gen_anddi3 (operands[0], operands[1], mask)); + DONE; + } + + operands[1] = force_reg (DImode, operands[1]); + operands[2] = gen_lowpart (QImode, operands[2]); +}) + +(define_insn "*builtin_zap_1" + [(set (match_operand:DI 0 "register_operand" "=r,r,r,r") + (and:DI (unspec:DI + [(match_operand:QI 2 "reg_or_const_int_operand" "n,n,r,r")] + UNSPEC_ZAP) + (match_operand:DI 1 "reg_or_const_int_operand" "n,r,J,r")))] + "" + "@ + # + # + bis $31,$31,%0 + zap %r1,%2,%0" + [(set_attr "type" "shift,shift,ilog,shift")]) + +(define_split + [(set (match_operand:DI 0 "register_operand" "") + (and:DI (unspec:DI + [(match_operand:QI 2 "const_int_operand" "")] + UNSPEC_ZAP) + (match_operand:DI 1 "const_int_operand" "")))] + "" + [(const_int 0)] +{ + rtx mask = alpha_expand_zap_mask (INTVAL (operands[2])); + if (HOST_BITS_PER_WIDE_INT >= 64 || GET_CODE (mask) == CONST_INT) + operands[1] = gen_int_mode (INTVAL (operands[1]) & INTVAL (mask), DImode); + else + { + HOST_WIDE_INT c_lo = INTVAL (operands[1]); + HOST_WIDE_INT c_hi = (c_lo < 0 ? -1 : 0); + operands[1] = immed_double_const (c_lo & CONST_DOUBLE_LOW (mask), + c_hi & CONST_DOUBLE_HIGH (mask), + DImode); + } + emit_move_insn (operands[0], operands[1]); + DONE; +}) + +(define_split + [(set (match_operand:DI 0 "register_operand" "") + (and:DI (unspec:DI + [(match_operand:QI 2 "const_int_operand" "")] + UNSPEC_ZAP) + (match_operand:DI 1 "register_operand" "")))] + "" + [(set (match_dup 0) + (and:DI (match_dup 1) (match_dup 2)))] +{ + operands[2] = alpha_expand_zap_mask (INTVAL (operands[2])); + if (operands[2] == const0_rtx) + { + emit_move_insn (operands[0], const0_rtx); + DONE; + } + if (operands[2] == constm1_rtx) + { + emit_move_insn (operands[0], operands[1]); + DONE; + } +}) + +(define_expand "builtin_zapnot" + [(set (match_operand:DI 0 "register_operand" "") + (and:DI (unspec:DI + [(not:QI (match_operand:DI 2 "reg_or_const_int_operand" ""))] + UNSPEC_ZAP) + (match_operand:DI 1 "reg_or_const_int_operand" "")))] + "" +{ + if (GET_CODE (operands[2]) == CONST_INT) + { + rtx mask = alpha_expand_zap_mask (~ INTVAL (operands[2])); + + if (mask == const0_rtx) + { + emit_move_insn (operands[0], const0_rtx); + DONE; + } + if (mask == constm1_rtx) + { + emit_move_insn (operands[0], operands[1]); + DONE; + } + + operands[1] = force_reg (DImode, operands[1]); + emit_insn (gen_anddi3 (operands[0], operands[1], mask)); + DONE; + } + + operands[1] = force_reg (DImode, operands[1]); + operands[2] = gen_lowpart (QImode, operands[2]); +}) + +(define_insn "*builtin_zapnot_1" + [(set (match_operand:DI 0 "register_operand" "=r") + (and:DI (unspec:DI + [(not:QI (match_operand:QI 2 "register_operand" "r"))] + UNSPEC_ZAP) + (match_operand:DI 1 "reg_or_0_operand" "rJ")))] + "" + "zapnot %r1,%2,%0" + [(set_attr "type" "shift")]) + +(define_insn "builtin_amask" + [(set (match_operand:DI 0 "register_operand" "=r") + (unspec:DI [(match_operand:DI 1 "reg_or_8bit_operand" "rI")] + UNSPEC_AMASK))] + "" + "amask %1,%0" + [(set_attr "type" "ilog")]) + +(define_insn "builtin_implver" + [(set (match_operand:DI 0 "register_operand" "=r") + (unspec:DI [(const_int 0)] UNSPEC_IMPLVER))] + "" + "implver %0" + [(set_attr "type" "ilog")]) + +(define_insn "builtin_rpcc" + [(set (match_operand:DI 0 "register_operand" "=r") + (unspec_volatile:DI [(const_int 0)] UNSPECV_RPCC))] + "" + "rpcc %0" + [(set_attr "type" "ilog")]) + +(define_expand "builtin_minub8" + [(match_operand:DI 0 "register_operand" "") + (match_operand:DI 1 "reg_or_0_operand" "") + (match_operand:DI 2 "reg_or_0_operand" "")] + "TARGET_MAX" +{ + alpha_expand_builtin_vector_binop (gen_uminv8qi3, V8QImode, operands[0], + operands[1], operands[2]); + DONE; +}) + +(define_expand "builtin_minsb8" + [(match_operand:DI 0 "register_operand" "") + (match_operand:DI 1 "reg_or_0_operand" "") + (match_operand:DI 2 "reg_or_0_operand" "")] + "TARGET_MAX" +{ + alpha_expand_builtin_vector_binop (gen_sminv8qi3, V8QImode, operands[0], + operands[1], operands[2]); + DONE; +}) + +(define_expand "builtin_minuw4" + [(match_operand:DI 0 "register_operand" "") + (match_operand:DI 1 "reg_or_0_operand" "") + (match_operand:DI 2 "reg_or_0_operand" "")] + "TARGET_MAX" +{ + alpha_expand_builtin_vector_binop (gen_uminv4hi3, V4HImode, operands[0], + operands[1], operands[2]); + DONE; +}) + +(define_expand "builtin_minsw4" + [(match_operand:DI 0 "register_operand" "") + (match_operand:DI 1 "reg_or_0_operand" "") + (match_operand:DI 2 "reg_or_0_operand" "")] + "TARGET_MAX" +{ + alpha_expand_builtin_vector_binop (gen_sminv4hi3, V4HImode, operands[0], + operands[1], operands[2]); + DONE; +}) + +(define_expand "builtin_maxub8" + [(match_operand:DI 0 "register_operand" "") + (match_operand:DI 1 "reg_or_0_operand" "") + (match_operand:DI 2 "reg_or_0_operand" "")] + "TARGET_MAX" +{ + alpha_expand_builtin_vector_binop (gen_umaxv8qi3, V8QImode, operands[0], + operands[1], operands[2]); + DONE; +}) + +(define_expand "builtin_maxsb8" + [(match_operand:DI 0 "register_operand" "") + (match_operand:DI 1 "reg_or_0_operand" "") + (match_operand:DI 2 "reg_or_0_operand" "")] + "TARGET_MAX" +{ + alpha_expand_builtin_vector_binop (gen_smaxv8qi3, V8QImode, operands[0], + operands[1], operands[2]); + DONE; +}) + +(define_expand "builtin_maxuw4" + [(match_operand:DI 0 "register_operand" "") + (match_operand:DI 1 "reg_or_0_operand" "") + (match_operand:DI 2 "reg_or_0_operand" "")] + "TARGET_MAX" +{ + alpha_expand_builtin_vector_binop (gen_umaxv4hi3, V4HImode, operands[0], + operands[1], operands[2]); + DONE; +}) + +(define_expand "builtin_maxsw4" + [(match_operand:DI 0 "register_operand" "") + (match_operand:DI 1 "reg_or_0_operand" "") + (match_operand:DI 2 "reg_or_0_operand" "")] + "TARGET_MAX" +{ + alpha_expand_builtin_vector_binop (gen_smaxv4hi3, V4HImode, operands[0], + operands[1], operands[2]); + DONE; +}) + +(define_insn "builtin_perr" + [(set (match_operand:DI 0 "register_operand" "=r") + (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "%rJ") + (match_operand:DI 2 "reg_or_8bit_operand" "rJ")] + UNSPEC_PERR))] + "TARGET_MAX" + "perr %r1,%r2,%0" + [(set_attr "type" "mvi")]) + +(define_expand "builtin_pklb" + [(set (match_operand:DI 0 "register_operand" "") + (vec_concat:V8QI + (vec_concat:V4QI + (truncate:V2QI (match_operand:DI 1 "register_operand" "")) + (match_dup 2)) + (match_dup 3)))] + "TARGET_MAX" +{ + operands[0] = gen_lowpart (V8QImode, operands[0]); + operands[1] = gen_lowpart (V2SImode, operands[1]); + operands[2] = CONST0_RTX (V2QImode); + operands[3] = CONST0_RTX (V4QImode); +}) + +(define_insn "*pklb" + [(set (match_operand:V8QI 0 "register_operand" "=r") + (vec_concat:V8QI + (vec_concat:V4QI + (truncate:V2QI (match_operand:V2SI 1 "register_operand" "r")) + (match_operand:V2QI 2 "const0_operand" "")) + (match_operand:V4QI 3 "const0_operand" "")))] + "TARGET_MAX" + "pklb %r1,%0" + [(set_attr "type" "mvi")]) + +(define_expand "builtin_pkwb" + [(set (match_operand:DI 0 "register_operand" "") + (vec_concat:V8QI + (truncate:V4QI (match_operand:DI 1 "register_operand" "")) + (match_dup 2)))] + "TARGET_MAX" +{ + operands[0] = gen_lowpart (V8QImode, operands[0]); + operands[1] = gen_lowpart (V4HImode, operands[1]); + operands[2] = CONST0_RTX (V4QImode); +}) + +(define_insn "*pkwb" + [(set (match_operand:V8QI 0 "register_operand" "=r") + (vec_concat:V8QI + (truncate:V4QI (match_operand:V4HI 1 "register_operand" "r")) + (match_operand:V4QI 2 "const0_operand" "")))] + "TARGET_MAX" + "pkwb %r1,%0" + [(set_attr "type" "mvi")]) + +(define_expand "builtin_unpkbl" + [(set (match_operand:DI 0 "register_operand" "") + (zero_extend:V2SI + (vec_select:V2QI (match_operand:DI 1 "register_operand" "") + (parallel [(const_int 0) (const_int 1)]))))] + "TARGET_MAX" +{ + operands[0] = gen_lowpart (V2SImode, operands[0]); + operands[1] = gen_lowpart (V8QImode, operands[1]); +}) + +(define_insn "*unpkbl" + [(set (match_operand:V2SI 0 "register_operand" "=r") + (zero_extend:V2SI + (vec_select:V2QI (match_operand:V8QI 1 "reg_or_0_operand" "rW") + (parallel [(const_int 0) (const_int 1)]))))] + "TARGET_MAX" + "unpkbl %r1,%0" + [(set_attr "type" "mvi")]) + +(define_expand "builtin_unpkbw" + [(set (match_operand:DI 0 "register_operand" "") + (zero_extend:V4HI + (vec_select:V4QI (match_operand:DI 1 "register_operand" "") + (parallel [(const_int 0) + (const_int 1) + (const_int 2) + (const_int 3)]))))] + "TARGET_MAX" +{ + operands[0] = gen_lowpart (V4HImode, operands[0]); + operands[1] = gen_lowpart (V8QImode, operands[1]); +}) + +(define_insn "*unpkbw" + [(set (match_operand:V4HI 0 "register_operand" "=r") + (zero_extend:V4HI + (vec_select:V4QI (match_operand:V8QI 1 "reg_or_0_operand" "rW") + (parallel [(const_int 0) + (const_int 1) + (const_int 2) + (const_int 3)]))))] + "TARGET_MAX" + "unpkbw %r1,%0" + [(set_attr "type" "mvi")]) + +(define_expand "builtin_cttz" + [(set (match_operand:DI 0 "register_operand" "") + (unspec:DI [(match_operand:DI 1 "register_operand" "")] + UNSPEC_CTTZ))] + "TARGET_CIX" + "") + +(define_insn "builtin_ctlz" + [(set (match_operand:DI 0 "register_operand" "=r") + (unspec:DI [(match_operand:DI 1 "register_operand" "r")] + UNSPEC_CTLZ))] + "TARGET_CIX" + "ctlz %1,%0" + [(set_attr "type" "mvi")]) + +(define_insn "builtin_ctpop" + [(set (match_operand:DI 0 "register_operand" "=r") + (unspec:DI [(match_operand:DI 1 "register_operand" "r")] + UNSPEC_CTPOP))] + "TARGET_CIX" + "ctpop %1,%0" + [(set_attr "type" "mvi")]) + ;; The call patterns are at the end of the file because their ;; wildcard operand0 interferes with nice recognition. @@ -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 9f8d808f4c7f..dbe926386641 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 000000000000..41e1efd4cd78 --- /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 000000000000..832cf6be8f36 --- /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 000000000000..12204b69d6a7 --- /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 35a9e659de62..f809c62012e3 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 CPP_SPEC -#define CPP_SPEC "%(cpp_cpu) %(cpp_subtarget) -D__ELF__ \ - %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} \ - %{posix:-D_POSIX_SOURCE} \ - %{mieee:-D_IEEE_FP} \ - %{mieee-with-inexact:-D_IEEE_FP -D_IEEE_FP_INEXACT}" +#undef FBSD_TARGET_CPU_CPP_BUILTINS +#define FBSD_TARGET_CPU_CPP_BUILTINS() \ + do \ + { \ + if (flag_pic) \ + { \ + builtin_define ("__PIC__"); \ + builtin_define ("__pic__"); \ + } \ + } \ + while (0) + +#undef CPP_SPEC +#define CPP_SPEC "%(cpp_subtarget) %{posix:-D_POSIX_SOURCE}" -#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 000000000000..9b25daff6a54 --- /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 643005970bdc..49f518137e16 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 912d7b268041..0c533449e8b2 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 9a54c3a84acc..e1da9cfe188a 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 3424112cab6b..b82b66df3c8c 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 efb0a16d7fd0..2be2a424d359 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 c832c5741886..e483124691e7 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 7076b5178610..5ca8c3f747da 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 6dbe1a383bbd..8f7b53db0718 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 a171b1c71983..26c3ae3b1ffc 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 4120a6b4c0ff..82ba3229772c 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 e75bc02ce74c..b7665f9fcb4e 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 83ceaf9b031c..e5688d89d535 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 be3e70d6414f..b16e8b4ae8d9 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 cdf5ced843a0..c4140b4f8b52 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 ffc32751ce0b..8df61564e722 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 2f711ce26210..a27c6452116f 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 46b76c992425..de8b27841b24 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 f110ea215d13..965337cf7006 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 868eee0c7c86..8f4a6056f989 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 000000000000..48f9ddfb0bd1 --- /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 b42da823869a..cae9bea4ce8e 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 8c696c6fd8e7..7422f1d03aff 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; +static struct machine_function * +arm_init_machine_status () { - machine_function *machine = p->machine; + struct machine_function *machine; + machine = (machine_function *) ggc_alloc_cleared (sizeof (machine_function)); - if (machine) - ggc_mark_rtx (machine->eh_epilogue_sp_ofs); -} - -static void -arm_init_machine_status (p) - struct function * p; -{ - p->machine = - (machine_function *) xcalloc (1, sizeof (machine_function)); - -#if ARM_FT_UNKNOWWN != 0 - ((machine_function *) p->machine)->func_type = ARM_FT_UNKNOWN; +#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 c5431b537d5c..eda2d47feff7 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 5180c75933a2..0e6071295b90 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 c9f0d9277ab2..0a78268949e2 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 b74afdfc006d..4a137d61b958 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 f3741db2bed3..ac58e44838df 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 a7f0e9e2c713..2f4b5422eb24 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 1cab2c4e144f..0ad23f8f5d03 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 a9b268c0a48e..0d417a22ded0 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 f1c86d28110b..c6d14e769f1a 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 b4e346dd9ef3..5e8ddf91ca28 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 000000000000..0d5b7984914b --- /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 2be49d8f0717..38ccc3f171d7 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 8360f85c44ca..ee3da8fd4110 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 1182aac12c4d..38727dad8ed9 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 312c96fc3e31..27928db54896 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 54ea0e8b0371..2e1abd40d24a 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 7ca68bc95c25..6ee17ef01ce6 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 d94b5d2ccbc0..0011b2a8d025 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 4de366521c06..f559bd20cff9 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 cc58f3ae2bed..91f18c0b802c 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 0741884ee120..7f9211b18c0a 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 755936450c88..473362e4332d 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 51fe6932e6d7..d8fee7de3d85 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 b1ce04e103e2..8ea35885b6d1 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 10ffaf099350..c04c2b576076 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 000000000000..1ea2413c8097 --- /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 0bff1308d013..5fea152eeb91 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 6864f0c82883..3722950f6343 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; @@ -1108,6 +1085,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; @@ -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 05ca85bdb8c9..90d959c0f7ef 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. */ +/* 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. -#undef WARN_FOUR_CHAR_CONSTANTS -#define WARN_FOUR_CHAR_CONSTANTS 0 + Do not expand a linker option to "-Xlinker -